---
title: Limits, by zooming in on a curve
heading: Zoom in far enough, and a smooth curve turns straight
eyebrow: A5 · Lesson 2 · Limits
xp: 40
---

::: hook
Look at a smooth curve through a strong enough magnifying glass and it looks like a straight line. That's not an accident of drawing: it's the property that makes slopes at a point exist, and it's captured by the idea of a limit. Some curves never straighten, however close you look. Those are the ones where calculus needs care.

::: play
- The window shows the curve $f(x) = x^3 - 3x$ magnified around the point $x = a$: the width of the window in $x$ is $z$, and both axes are scaled by the same factor.
- Shrink $z$ (zoom in). What does the curve turn into? Compare its slope with $f'(a)$ in the strip.
- The dashed curve is $|x - a|$ magnified the same way. Does it ever straighten?
:::
:::

```sim plot
view: graph
x: u = -1..1
y: w = -2..2
slider: a = -2..2 step 0.1 = 1.5
slider: z = 0.001..2 = 2 log
plot: ((a + z*u)^3 - 3*(a + z*u) - (a^3 - 3*a))/z | label: f near a, magnified
plot: abs(z*u)/z | dashed | color: ch2 | label: |x − a| magnified
readout: f'(a) = 3*a^2 - 3
readout: zoom = 1/z | format: plain
```

::: predict
## Zoom far into the dashed curve $|x - a|$ at $x = a$. What do you see?

- [ ] A straight line
- [x] The same V shape at every zoom
- [ ] A flat line
- [ ] A smooth curve

::: reveal
The same V, at every zoom. Its two arms have slopes −1 and +1 no matter how close you look, so there's no single tangent line at the corner: $|x|$ has no derivative at 0. The smooth curve does the opposite: zoom in and it straightens into a line whose slope is $f'(a)$. A derivative exists exactly where the zoomed-in picture becomes a single straight line.
:::
:::

::: nameit
## What a limit says

$\displaystyle\lim_{x \to a} g(x) = L$, read "the limit of $g$ as $x$ approaches $a$ is $L$", means that $g(x)$ can be made as close to $L$ as you like by taking $x$ close enough to $a$, on either side, without ever needing $x$ to equal $a$.

That last part is the point. The difference quotient $\big(f(a + h) - f(a)\big)/h$ is meaningless at $h = 0$, a zero over zero, but its limit as $h \to 0$ can be perfectly definite. That limit is the derivative.

**Computing limits.** Often algebra removes the 0/0:

$$\lim_{x \to 3}\frac{x^2 - 9}{x - 3} = \lim_{x \to 3}\frac{(x - 3)(x + 3)}{x - 3} = \lim_{x \to 3}(x + 3) = 6$$

When algebra can't, the numbers show it. Two limits come up again and again:

| $h$ | 0.1 | 0.01 | 0.001 | limit |
|---|---|---|---|---|
| $\dfrac{\sin h}{h}$ (radians) | 0.99833 | 0.99998 | 0.9999998 | 1 |
| $\dfrac{e^h - 1}{h}$ | 1.0517 | 1.0050 | 1.0005 | 1 |

They're the reason the derivatives of $\sin$ and $e^x$ come out so cleanly in lesson 11.

**When limits fail.** A limit doesn't exist at a jump (a square wave's edge: different values from the left and right), at a blow-up ($1/x$ at 0), or where a function wobbles without settling. A **one-sided limit**, $x \to a^-$ or $x \to a^+$, approaches from one side only, which is how you describe the voltage just before and just after a switch closes.

A function is **continuous** at $a$ if $\lim_{x \to a} f(x) = f(a)$: no jump, no hole. A capacitor's voltage is always continuous; its current need not be.
:::

::: example
## Estimate $\displaystyle\lim_{x \to 2}\frac{x^2 - 4}{x - 2}$ from a table, then find it exactly.

::: solution
1. **Build a table.** Evaluate the fraction on both sides of 2:

| $x$ | 1.9 | 1.99 | 2.01 | 2.1 |
|---|---|---|---|---|
| value | 3.9 | 3.99 | 4.01 | 4.1 |

2. **Read the trend.** The values close in on 4 from both sides.
3. **Find it exactly.** For $x \ne 2$ the fraction simplifies:
   $$\frac{x^2 - 4}{x - 2} = x + 2$$
   which approaches 4.

**Answer:** the limit is 4.
:::
:::

::: example
## Estimate $\displaystyle\lim_{h \to 0}\frac{e^h - 1}{h}$.

::: solution
1. **Evaluate the ratio for shrinking $h$.**

| $h$ | 0.1 | 0.01 | 0.001 |
|---|---|---|---|
| ratio | 1.0517 | 1.0050 | 1.0005 |

2. **Read the limit.** The values close in on 1.
3. **What it means.** It's the slope of $e^x$ at $x = 0$, and it being exactly 1 is what makes $e$ special.

**Answer:** the limit is 1.
:::
:::

::: example
## Estimate $\displaystyle\lim_{x \to 0}\frac{1 - \cos x}{x^2}$ from a table.

::: solution
1. **Try $x = 0.1$.**
   $$\begin{aligned} \frac{1 - \cos 0.1}{0.01} &= \frac{1 - 0.995\,004}{0.01} \\ &= 0.499\,58 \end{aligned}$$
2. **Try $x = 0.01$.** The ratio is 0.499 999 6, so the values close in on 0.5.
3. **Why a table.** You can't just put in $x = 0$, which gives $0/0$.
4. **What it means.** The table shows the limit is $\tfrac12$, which is why $\cos x \approx 1 - x^2/2$ for small angles.
5. **A caution.** Don't take $x$ too small on a calculator, though: by $x = 10^{-8}$, $1 - \cos x$ rounds to zero and the table breaks down.

**Answer:** the limit is 0.5.
:::
:::

::: check
given: a = 2..9 int
answer: 2*a
tolerance: 0.001

## Find $\displaystyle\lim_{x \to \given{a}} \frac{x^2 - \given{a}^2}{x - \given{a}}$.

::: right
Right. Factor the top: $(x - \given{a})(x + \given{a})$. Cancel, and the limit is $\given{a} + \given{a}$ = {answer}.
:::

::: misses
- [0] Putting $x = \given{a}$ straight in gives 0/0, which isn't 0. Factor and cancel first.
- [a] Close: after cancelling, it's $x + \given{a}$, and at $x = \given{a}$ that's $2 \times \given{a}$.
- [any] Not yet. Factor $x^2 - \given{a}^2 = (x - \given{a})(x + \given{a})$ and cancel.
:::
:::

::: check
given: h = 0.05 | 0.02 | 0.005
answer: (exp(h) - 1)/h
tolerance: 0.001%

## Evaluate $\dfrac{e^h - 1}{h}$ at $h$ = {h}, to six significant figures.

::: right
Right. It's {answer}, already close to its limit of 1.
:::

::: misses
- [1] That's the limit. At $h$ = {h} it's a little more than 1.
- [any] Not yet. Compute $e^{\given{h}}$, subtract 1 and divide by {h}.
:::
:::

::: check
kind: choice

## Which of these has a derivative at $x = 0$?

- [ ] $|x|$
- [x] $x^2$
- [ ] A square wave that jumps at 0
- [ ] $1/x$

::: right
Right. Zoom into $x^2$ at 0 and it flattens into a straight line of slope 0.
:::

::: misses
- [1] At 0 it has a corner: slopes −1 and +1 on either side, so no single tangent.
- [3] A jump isn't even continuous, so no tangent line can touch it.
- [4] It isn't defined at 0 at all; it blows up.
:::
:::

::: check
kind: choice

## A switch connects a capacitor to a battery at $t = 0$. Which quantity must be continuous at $t = 0$?

- [x] The capacitor's voltage
- [ ] The capacitor's current
- [ ] Both
- [ ] Neither

::: right
Right. A jump in a capacitor's voltage would need an infinite current, so the voltage just after equals the voltage just before. The current can and does jump.
:::

::: misses
- [2] The current jumps from zero the instant the switch closes. It's the voltage that can't jump.
- [3] The current jumps; only the voltage has to be continuous.
- [4] The voltage can't jump: that would take infinite current.
:::
:::

::: check
kind: parts
given: k = 0.5 | 2 | 3

## Let $f(x) = \dfrac{e^{\given{k}x} - 1}{x}$, which is undefined at $x = 0$.

::: part
answer: (exp(0.1*k) - 1)/0.1
tolerance: 0.2%

### What is $f(0.1)$?

::: misses
- [any] Put $x = 0.1$ in.
:::
:::

::: part
answer: (exp(0.001*k) - 1)/0.001
tolerance: 0.01%

### What is $f(0.001)$, to five significant figures?

::: misses
- [any] Put $x = 0.001$ in.
:::
:::

::: part
answer: k
tolerance: 0.01%

### What value is $f$ closing in on as $x \to 0$?

::: misses
- [1] That's the limit for $k = 1$. Here the exponent is $\given{k}x$.
- [any] Look at the trend in your two values.
:::
:::
:::

::: check
kind: derivation
vars: c = 1..9, x = 0.5..12

## Find $\displaystyle\lim_{x \to c}\frac{\sqrt{x} - \sqrt{c}}{x - c}$ by rationalizing.

::: step
answer: 1/(sqrt(x) + sqrt(c))
form: simplified

### Multiply the top and bottom by $\sqrt{x} + \sqrt{c}$ and cancel. What's left?
:::

::: step
answer: 1/(2*sqrt(c))

### Now put $x = c$.
:::

::: right
Right. The limit is $\frac{1}{2\sqrt{c}}$, which is the slope of $\sqrt{x}$ at $c$.
:::
:::

::: explain
## Why is a 0/0 expression like $(x^2 - 9)/(x - 3)$ at $x = 3$ meaningless, while its limit as $x \to 3$ is perfectly definite?

::: model
At exactly $x = 3$ you'd be dividing zero by zero, which has no value. But the limit never uses $x = 3$ itself: it asks what the expression does as $x$ gets close to 3. For every $x \neq 3$ the expression equals $x + 3$, and as $x$ approaches 3 that approaches 6. So the expression has a hole at 3, but the values around the hole all point to 6.
:::
:::

::: practice

::: check
given: a = 2..9 int
answer: 3*a^2
tolerance: 0.001

## Find $\displaystyle\lim_{x \to \given{a}} \frac{x^3 - \given{a}^3}{x - \given{a}}$. (Use $x^3 - a^3 = (x - a)(x^2 + ax + a^2)$.)

::: misses
- [a^2] After cancelling, three terms remain: $x^2 + ax + a^2$ at $x = a$.
- [any] Cancel $(x - a)$, then put $x = a$ in.
:::
:::

::: check
given: k = 2..9 int
answer: k
tolerance: 0.001

## Find $\displaystyle\lim_{h \to 0} \frac{\sin(\given{k}h)}{h}$.

::: misses
- [1] Write it as $\given{k} \cdot \dfrac{\sin(\given{k}h)}{\given{k}h}$: the second factor goes to 1.
- [any] Multiply top and bottom by {k}.
:::
:::

::: check
given: a = 2..9 int; b = 2..9 int
answer: a + b
tolerance: 0.001

## Find $\displaystyle\lim_{x \to \given{a}} \frac{(x - \given{a})(x + \given{b})}{x - \given{a}}$.

::: misses
- [0] Cancel the common factor before putting $x = a$ in.
- [any] Cancel $(x - a)$, then evaluate.
:::
:::
:::
