# Sufficient condition for differentiability at endpoints.

Let $f:[a,b]\to \mathbb{R}$ be differentiable on $(a,b)$ with derivative $g=f^{\prime}$ there.

Assertion: If $\lim_{x\to b^{-}}g(x)$ exists and is a real number $\ell$ then $f$ is differentiable at $b$ and $f^{\prime}(b)=\ell$?

Is this assertion correct? If so provide hints for a formal $\epsilon-\delta$ argument. If not, can it be made true if we strengthen some conditions on $g$ (continuity in $(a,b)$ etc.)? Provide counter-examples.

I personally think that addition of the continuity of $g$ in the hypothesis won't change anything as for example $x\sin \frac{1}{x}$ has a continuous derivative in $(0,1)$ but its derivative oscillates near $0$. I also know that the converse of this is not true.

Also if that limit is infinite, then $f$ is not differentiable at $b$ right?

-
Where does your $g$ come from? How is it related to $f$? – xavierm02 Nov 19 '12 at 17:42
Then write $f'$ >_< – xavierm02 Nov 19 '12 at 17:48
Then write $\left.f'\right|_{(a,b)}$ – xavierm02 Nov 19 '12 at 17:54

Since $$f(b+h)-f(b)=f'(\xi)h$$ for some $\xi \in (b-h,h)$, you can let $h \to 0^{-}$ and conclude that $f'(b)=\lim_{x \to b-}f'(x)$. On the other hand, consider $f(x)=x^2 \sin \frac{1}{x}$. It is easy to check that $\lim_{x \to 0} f'(x)$ does not exist, and yet $f'(0)=0$.

Edit: this answer assumes tacitly that $f$ is continuous at $b$. The question does not contain this assumption, although I believe that it should be clear that a discontinuous function can't be differentiable at all.

-
If $\lim_{x\to b}f(x)=+\infty$ can I conclude $f$ is not differentiable there? – no-0-one-1 Nov 19 '12 at 17:57
In this case, $f$ must be discontinuous at $b$, so the necessary condition for differentiability is violated. – Siminore Nov 20 '12 at 8:47

This is clearly false as stated. For example, consider $f:[0,1] \to \mathbb{R}$, $f(1)=1, f(x)=0$ otherwise.

-
What's the fault in Siminore's answer? – no-0-one-1 Nov 19 '12 at 18:03
@no-0-one-1 I assumed (see my remark) that $f$ is continuous at $b$. It is meaningless to prove differentiability at points where the function is discontinuous. The answer by Chris Eagle is correct, but I suspect that you were thinking of a continuous function, since otherwise the answer would be trivial. – Siminore Nov 20 '12 at 8:47