TITLE: How to prove differentiability implies continuity with $\epsilon-\delta$ definition?
QUESTION [11 upvotes]: 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

REPLY [3 votes]: You don't need to add much to your own proof to finish it off.  You've shown that, given $\epsilon>0$, you can find $\delta>0$ such that $|f(x)-f(a)|<\epsilon+|f'(a)||x-a|$ whenever $|x-a|<\delta.$  This means $|f(x)-f(a)|<\epsilon+|f'(a)|\delta$ whenever $|x-a|<\delta$.  
Now, given any $\epsilon'>0$.  We want to show that there exists $\delta'>0$ such that $|f(x)-f(a)|<\epsilon'$ whenever $|x-a|<\delta'.$  If $f'(a)=0$ then, letting $\epsilon=\epsilon',$ we know there is a $\delta$ such that $|f(x)-f(a)|<\epsilon'$, so we take $\delta'=\delta$.  Otherwise, let $\epsilon=\frac{\epsilon'}{2}$ so that there exists $\delta$ such that $|f(x)-f(a)|<\frac{\epsilon'}{2}+|f'(a)|\delta$.  If $\delta\le\frac{\epsilon'}{2|f'(a)|}$, then the right side is less than or equal to $\epsilon'$, so we let $\delta'=\delta$.  Otherwise we let $\delta'=\frac{\epsilon'}{2|f'(a)|}$.