Calculus · Functions and limits · Lesson 1

Zooming in: what a limit is

A limit asks where a function is heading, not where it is. That one shift is what makes all of calculus possible.

A function with a hole in it

Take $f(x) = \dfrac{x^2 - 1}{x - 1}$. Try to evaluate it at $x = 1$ and you get $\frac{0}{0}$, which is meaningless. The function simply isn’t defined there.

But at $x = 0.9$ or $x = 1.1$ it works fine. Drag the slider to walk $x$ toward 1 and watch what $f(x)$ does.

xf(x)

As $x$ gets closer and closer to 1 (from either side), what does $f(x)$ get close to?

It heads to 2. Factor the top: $x^2 - 1 = (x-1)(x+1)$, so for every $x \ne 1$, $f(x) = x + 1$. Near 1 that is near 2. The graph is the line $y = x+1$ with one point punched out.

The definition, in plain words

We write

$$\lim_{x \to 1} \frac{x^2-1}{x-1} = 2$$

and read it “the limit of $f(x)$ as $x$ approaches 1 is 2.”

The last clause is the whole trick. The limit only looks at the neighbourhood around $a$. What happens exactly at $a$ (a hole, a different value, nothing at all) is irrelevant.

Use the same factoring idea: what is $\displaystyle\lim_{x\to 3} \frac{x^2-9}{x-3}$?

$x^2 - 9 = (x-3)(x+3)$. Cancel the $(x-3)$ (allowed, because $x \ne 3$ in a limit) to get $x + 3$, which heads to $6$.

Define $g(x) = x + 1$ for every $x$ except $x = 1$, where we set $g(1) = 5$. What is $\lim_{x\to 1} g(x)$?

Still 2. The limit ignores the value at the point itself; near $x = 1$, $g$ is just $x+1$. (When the limit does equal the value, the function is called continuous there. That’s lesson 5.)

Zoom in until it’s boring

Here is a good mental test. Zoom in on the graph around the point. If the curve settles toward a single height, the limit exists. If it keeps doing something dramatic, it doesn’t.

Pick a function and drag the zoom.

Those are the three classic ways a limit fails:

Why anyone cares

Your speedometer shows speed at an instant. But speed is distance divided by time, and in an instant no time passes: $\frac{0}{0}$ again.

Limits rescue this. Measure average speed over a shrinking interval of time $h$, and ask where it’s heading as $h \to 0$:

$$\text{speed at } t = \lim_{h\to 0} \frac{\text{position}(t+h) - \text{position}(t)}{h}$$

Check

Five questions to finish. Tap ? on any question to copy it, then paste it to Claude with your question.

Find $\displaystyle\lim_{x\to 2} \frac{x^3-8}{x-2}$.

Plugging in gives $\frac{0}{0}$, so simplify. A difference of cubes factors as $a^3 - b^3 = (a-b)(a^2+ab+b^2)$:

$$\frac{x^3-8}{x-2} = \frac{(x-2)(x^2+2x+4)}{x-2} = x^2+2x+4 \quad (x\ne 2)$$

As $x \to 2$: $4 + 4 + 4 = 12$.

Which statement about $\lim_{x\to a} f(x)$ is true?

A limit describes the approach, not the arrival. $\frac{0}{0}$ just means “simplify first”; it says nothing about whether the limit exists. And the $g(x)$ example showed the limit can differ from $f(a)$.

As $x \to 0$, $\sin(1/x)$ has no limit. Why?

Undefined-at-the-point is never the reason (remember the hole). Here the values never settle: in every tiny interval around 0 the function hits both −1 and 1.

In one or two sentences, explain to a friend why $\lim_{x\to1}\frac{x^2-1}{x-1}$ exists even though the function is undefined at 1.

Something like: “The limit only cares about values near 1, never at 1. Near 1 the function equals $x + 1$, so its values crowd in on 2. The hole at exactly $x=1$ doesn’t matter.”

Stretch: $\displaystyle\lim_{x\to 2} \frac{\frac1x - \frac12}{x-2}$. (Hint: combine the fractions on top.)

1. Common denominator. $2x$ works for both fractions: $\frac1x = \frac{2}{2x}$ and $\frac12 = \frac{x}{2x}$, so $\frac1x - \frac12 = \frac{2-x}{2x}$.

2. Flip the sign. $2 - x = -(x-2)$, so the top is $-\frac{x-2}{2x}$.

3. Divide by $(x-2)$. Dividing is multiplying by $\frac{1}{x-2}$, and the $(x-2)$ cancels: $-\frac{x-2}{2x}\cdot\frac{1}{x-2} = -\frac{1}{2x}$ for $x \ne 2$.

As $x\to2$ that heads to $-\frac14 = -0.25$. (This exact computation is the slope of $1/x$ at $x=2$. You just did your first derivative.)