Example of derivative function with limit

60 Views Asked by At

I tried to find a counterexample to show that the following is false:

If $f'(x)$ exists for all $x \neq 0$ and $\lim_{x \to 0}f'(x) = L$ then $f'(0)$ exists.

Can you tell me if this counterexample is correct: Let $f'(x) = x \sin ({1\over x})$. Then $f'(x)$ exists for all $x \neq 0$ and $\lim_{x \to 0} f'(x) = 0$ but $f'$ is not defined at $0$?

2

There are 2 best solutions below

0
On BEST ANSWER

For your function $f(x)$, if $x\ne 0$ then $f'(x)=-\frac{1}{x}\cos(1/x)+\sin(1/x)$.

If $1/x$ is of the form $2n\pi$, where $n$ is a non-zero integer, then $f'(x)=-2n\pi$. So there are $x$ near $0$ at which $|f'(x)|$ is very large. By looking at $1/x$ of the form $(2n+1/2)\pi$, we can find $x$ arbitrarily close to $0$ such that $f'(x)=0$.

Thus $\lim_{x\to 0}f'(x)$ does not exist.

Remark: For your problem as stated, we can cheat and let $f(x)$ be a function which is very well behaved at $x\ne 0$, but not continuous at $0$.

The situation becomes quite different if we ask that $f$ be continuous in an open interval that contains $0$.

0
On

I think you want a counterexample with more conditions that you wrote, but to help you with your question I give this counterexample $f(x)=0$ if $x\neq 0$ and $f(0)=1$. We have that $f'(x)=0$ for $x\neq 0$ and thus $\lim_{x\to 0} f'(x)=0$ and $f'(0)$ doesn't exist since $f$ is not continuous at 0.