How to prove differentiability implies continuity with $\epsilon-\delta$ definition?

I know that's a very common theorem in calculus but when I try to prove it with $\epsilon-\delta$ definition of continuity, I found that it is not so obvious.

Attempts: Let $f:\mathbb{R}\to\mathbb{R}$ be a function differentiable at point $a$ $\implies$ $\forall \epsilon>0, \exists \delta>0 \text{ s.t. } |\frac{f(x)-f(a)}{x-a}-f'(a)|<\epsilon$ for any $|x-a|<\delta$. So what we want to show is $\forall \epsilon>0$, we can find an $\delta>0$s.t. $|f(x)-f(a)|<\epsilon$ for any $|x-a|< \delta$. First of all, we can applies the triangular inequality$|f(x)-f(a)|\le |f(x)-f(a)-f'(a)(x-a)|+|f'(a)(x-a)|<\epsilon+|f'(a)(x-a)|$ but I found that $|f'(a)(x-a)|$ could be very large even $\epsilon$ can be any real number. Thx


Solution 1:

Fix $\varepsilon > 0$ and $a$.

From the definition of differentiation we have $$ \left|\frac{f(x)-f(a)}{x-a}-f'(a)\right| < \varepsilon $$

for an appropriately chosen $\delta > 0$.

Multiply both sides by $|x - a|$ to get: $$ \left|f(x) - f(a) - (x - a)f'(a)\right| < |x - a| \varepsilon $$

Using $\left||x|-|y|\right| \le |x - y|$ we have:

$$ \left|f(x) - f(a)\right| - |x - a| \cdot \left|f'(a)\right| < |x - a| \varepsilon $$

Rearrange to get: $$ \left|f(x) - f(a)\right| < (\left|f'(a)\right| + \varepsilon) \cdot |x - a| $$

Since $f'(a)$ and $\varepsilon$ are both fixed, you can make $|f(x) - f(a)|$ as small as you want by making $|x - a|$ smaller and smaller. Thus, the function is continuous at $a$.

To prove this formally, pick any $\hat{\varepsilon}$ (different from $\varepsilon$ fixed at the beginning and used with the differentiation definition). Pick $\hat{\delta} = \min\left(\delta, \frac{\hat{\varepsilon}}{\left|f'(a)\right| + \varepsilon}\right)$. Clearly:

$$ |x - a| < \hat{\delta} \Rightarrow \left|f(x) - f(a)\right| < \hat{\varepsilon} $$

Solution 2:

You want to show that $d(f(x),f(t))<\epsilon$ when $d(x,t)<\delta$.

$\displaystyle\lim_{x\to t}f(x)-f(t)= \lim_{x\to t}\frac{f(x)-f(t)}{x-t}(x-t)=f'(t)\cdot0=0$ which is what we wanted to show.