Expressing derivative as function plus remainder

Could you please give a proof of the following statement?

If $$f$$ is differentiable then $$f'(a) = \lim_{x\to a} \frac{f(x)-f(a)}{x-a}$$ exists. This can alternatively be written $$f'(a) = \frac{f(x)-f(a)}{x-a} + r(x-a)$$ where the remainder function $$r$$ has the property $$\lim_{x \to a} r(x-a)=0$$.

Why is that the case? If the limit of $$m(x)$$ is a constant $$z$$, then obviously calculating the limit of $$m(x) + n(x)$$ will also be $$z$$ assuming $$\lim n(x) = 0$$. In this case:

$$f'(a) = \lim_{x\to a} \left(\frac{f(x)-f(a)}{x-a} + r(x-a)\right)$$

however it doesn't explain why $$f'(a)$$ can be expressed as $$\frac{f(x)-f(a)}{x-a} + r(x-a)$$ where $$\lim_{x \to a} r(x-a)=0$$.

Let $$h=x-a$$. Then, we rewrite the given limit as $$\lim_{h\to0}\frac{f(a+h)-f(a)}h$$This is clearly just $$f'(a)$$! We define $$r(h)=f'(a)-\frac{f(a+h)-f(a)}h$$to express the difference between the derivative and this fraction (obviously defined for $$h\neq0$$). So, since$$f'(a)=\lim_{h\to0}\frac{f(a+h)-f(a)}h$$we have $$\lim\limits_{h\to0}r(h)=\lim\limits_{h\to0}\left(f'(a)-\frac{f(a+h)-f(a)}h\right)$$$$=f'(a)-\lim\limits_{h\to0}\frac{f(a+h)-f(a)}h$$$$=f'(a)-f'(a)=0$$
• And $r(h)$ is a different function for every point in the domain of $f$, right? The remainder, even though zero in the limit, can be bigger or smaller depending on which point we pick. Dec 20, 2019 at 18:31
• Ok, probably that's the source of my confusion, for some reason I assumed it is suggested that $r$ is the same for all points and I couldn't imagine how it might be true. Dec 20, 2019 at 18:36
$$r(x-a)$$ is not mysterious. We have $$r(x-a) =f'(a) - \frac{f(x) - f(a)}{x-a}$$ It is almost tautological that this goes to $$0$$ because that is the definition of the derivative.