In Limits from Both Sides we saw that the limit at $a$ and the value at $a$ can differ. When they agree, the graph has no break there. That is continuity. It combines One-Sided Limits with the Limit Laws.
Key idea
$f$ is continuous at $a$ when three things hold: $f(a)$ is defined, $\lim_{x \to a} f(x)$ exists, and they are equal: $\lim_{x \to a} f(x) = f(a)$. Polynomials, rational functions, roots, sine, cosine, exponentials and logarithms are continuous everywhere in their domains.
Three ways to break
| Type | What happens | Example at $x = a$ |
|---|---|---|
| Removable | the limit exists, but $f(a)$ is missing or wrong | $\frac{x^2-1}{x-1}$ at $x = 1$ |
| Jump | both one-sided limits exist but differ | a piecewise rule that changes height at $a$ |
| Infinite | a one-sided limit is $pminfty$ | $\frac{1}{x}$ at $x = 0$ |
Why it works
Continuity is what lets us substitute. If $f$ is continuous at $a$, then $\lim_{x \to a} f(x) = f(a)$: the limit can be computed by plugging in. The limit laws then show that sums, products, quotients (with nonzero bottoms) and compositions of continuous functions are continuous, which is why so many familiar functions qualify at once.
Worked example: Choose a constant to close a gap
Find $k$ so that $$f(x) = \begin{cases} kx + 1 & x < 2 \\ x^2 - 1 & x \ge 2 \end{cases}$$ is continuous at $x = 2$.
- Right side and value: $f(2) = 4 - 1 = 3$.
- Left limit: $2k + 1$.
- Continuity needs $2k + 1 = 3$, so $k = 1$.
Answer: $k = 1$
Worked example: Classify the breaks
Classify the discontinuities of $f(x) = \dfrac{x^2 - 1}{x^2 - 3x + 2}$.
- The bottom factors as $(x - 1)(x - 2)$, so $f$ is undefined at $x = 1$ and $x = 2$.
- The top is $(x - 1)(x + 1)$. For $x \ne 1$, $f(x) = \frac{x + 1}{x - 2}$, which tends to $\frac{2}{-1} = -2$ at $x = 1$: a removable discontinuity (a hole).
- At $x = 2$ the top of $\frac{x+1}{x-2}$ is 3 and the bottom goes to 0: an infinite discontinuity.
Answer: Removable at $x = 1$; infinite at $x = 2$.
Common mistake
"$f$ is defined everywhere, so it is continuous everywhere." A piecewise function can be defined at every point and still jump, like the first example with any $k \ne 1$. Check the meeting point of every piece: compute the left limit, the right limit and the value, and confirm all three agree.