5.16 Continuity And DifferentiabilityHL ONLY
1. Continuity
In paragraph 5.1 we saw that for $f(x) = 2x+3$, $\displaystyle\lim_{x\to 2}f(x) = 7$ and $f(2) = 7$.
For $f(x) = \dfrac{\sin x}{x}$, $\displaystyle\lim_{x\to 0}f(x) = 1$, but $f(0)$ is not defined.
If we observe the graph of $f(x) = \dfrac{\sin x}{x}$, we notice a "discontinuity" at $x=0$.
It is worthwhile to investigate another similar situation. Consider
The function is not defined at $x=2$. However, $x=2$ is not a vertical asymptote. It is interesting to evaluate what happens to $f(x)$ as $x \to 2$
| $x$ | $f(x)$ |
|---|---|
| 1.999 | 3.999 |
| 2.001 | 4.001 |
It indicates that $\displaystyle\lim_{x\to 2} f(x) = 4$. Indeed, look at the graph of $f(x)$
There is an "empty" point on it. When $x$ approaches 2, the value of $y$ approaches 4. Thus $\displaystyle\lim_{x \to 2} f(x) = 4$, but $f(2)$ is not defined. In fact, we can simplify the fractional function as
That is why we obtain the graph of the continuous straight line $y = x + 2$ with a "discontinuity" at $x = 2$. Moreover, $$ \lim_{x\to 2} \dfrac{x^2 - 4}{x - 2} = \lim_{x\to 2} (x + 2) = 4 $$
Definition of Continuity
We say that a function is continuous at a point $x=a$, when:
- The value $f(a)$ exists;
- The limit $\lim_{x\to a} f(x)$ exists;
- $\lim_{x\to a} f(x) = f(a)$
For verifying the continuity at any point we must check all three presuppositions.
Most known functions are continuous everywhere (since they look like uninterrupted curves!). For example, lines, quadratics, polynomials in general, and exponentials are continuous functions.
Remember that at some $x=a$ we may have different side limits $\lim_{x\to a^-} f(x)$ and $\lim_{x\to a^+} f(x)$. If they are equal, say
$$
\lim_{x\to a^-} f(x) = \lim_{x\to a^+} f(x) = b,
$$
then we can state that
$$
\lim_{x\to a} f(x) = b.
$$
It is worthwhile to evaluate the following examples of "step" functions to clarify the notions of limit and continuity.
EXAMPLE 1
Let $f(x) = \begin{cases} 2x+1, & \text{if } x \ne 2 \\ 7, & \text{if } x = 2 \end{cases}$
- $\lim_{x\to 2} f(x) = 5$ since when $x$ approaches 2, the value $f(x)$ approaches 5]
- But $f(2) = 7$
Thus $\displaystyle\lim_{x\to 2} f(x) \ne f(2)$. Therefore the function is not continuous at $x=2$.
EXAMPLE 2
Consider the step function $f(x) = \begin{cases} x^2, & \text{if } x \le 2 \\ 5, & \text{if } x > 2 \end{cases}$
We can see that $f(2) = 4$ but the limit $\lim_{x\to 2} f(x)$ does not exist. In fact, only separate side limits exist $$ \lim_{x\to 2^-} f(x) = 4 \neq \lim_{x\to 2^+} f(x) = 5 $$ Therefore, the function is not continuous at $x=2$.
EXAMPLE 3
Consider the function $f(x) = \begin{cases} x^2, & \text{if } x \le 2 \\ 4, & \text{if } x > 2 \end{cases}$
We can see that $f(2) = 4$ and also the limit $\lim_{x\to 2} f(x) = 4$.
Since $\lim_{x\to 2} f(x) = f(2)$ the function is continuous at $x=2$. (in fact the function is continuous everywhere).
2. The Formal Definition of the Derivative
Let $y=f(x)$ map a continuous curve and $A(x, f(x))$ represent a point on it.
We select a neighboring point $B$ with:
- x-coordinate = $x+h$ (where $h$ is very small)
- y-coordinate = $f(x+h)$
As we move from point A to point B, the rate of change is evaluated by:
If we let $h$ become very small, that is $h \to 0$, the result will be the rate of change at point A, that is the derivative $f'(x)$.
Let us apply this formula to verify the derivative for the quadratic function $f(x) = x^2$.
Therefore, the exact derivative evaluates to $f'(x) = 2x$.
If we apply the definition for the general term $f(x)=x^n$ we will find that
$$
f'(x) = \lim_{h\to 0} \dfrac{(x+h)^n - x^n}{h} = nx^{n-1}
$$
NOTICE: Differentiability vs Continuity
The opposite is not necessarily true: that is, the function may be continuous at some point $x$ but not differentiable at this point.
Indeed, let us analyze again the step function of Example 3 $$ f(x) = \begin{cases} x^2, & \text{if } x \le 2 \\ 4, & \text{if } x > 2 \end{cases} $$ The function is continuous at $x=2$ but it is not differentiable at $x=2$. This happens because there forms a "corner" at $x=2$: we cannot draw a single tangent line at $x=2$. In other words, the curve is continuous but not "smooth" at $x=2$.
At $x=2$ we evaluate the "side" derivatives $f'_-(2)$ and $f'_+(2)$:
- For $f'_-(2)$ we differentiate the expression $f(x)=x^2$ (active before $x=2$): $f'(x)=2x$, thus $f'_-(2)=4$
- For $f'_+(2)$ we differentiate the expression $f(x)=4$ (active after $x=2$): $f'(x)=0$, thus $f'_+(2)=0$
Since $f'_-(2) = 4$ and $f'_+(2) = 0$ (they diverge), the limit $f'(2)$ does not exist.
Let us modify this function to force differentiability:
EXAMPLE 4
$f(x) = \begin{cases} x^2, & \text{if } x \le 2 \\ 4x-4, & \text{if } x > 2 \end{cases}$
- $\lim_{x\to 2^-} f(x) = \lim_{x\to 2} (x^2) = 4$
- $\lim_{x\to 2^+} f(x) = \lim_{x\to 2} (4x-4) = 4$
- $f(2) = 4$
- For $f(x) = x^2$, we obtain $f'(x) = 2x$, thus $f'_-(2) = 4$
- For $f(x) = 4x-4$, we obtain $f'(x) = 4$, thus $f'_+(2) = 4$
EXAMPLE 5
We will investigate the same piecewise concept through a parameterized version $$ f(x) = \begin{cases} x^2, & \text{if } x < 2 \\ a, & \text{if } x = 2 \\ bx+c, & \text{if } x > 2 \end{cases} $$ Find constants $a$, $b$, and $c$, given that the function is continuous and differentiable.
Continuity:
- $\lim_{x\to 2^-} f(x) = \lim_{x\to 2} x^2 = 4$
- $\lim_{x\to 2^+} f(x) = \lim_{x\to 2} (bx+c) = 2b+c$
- $f(2) = a$
- For $f(x) = x^2$, the derivative evaluates to $f'(x) = 2x$, thus $f'_-(2) = 4$
- For $f(x) = bx+c$, the derivative evaluates to $f'(x) = b$, thus $f'_+(2) = b$