# example of differentiable function which is not continuously differentiable

Let $f$ be defined in the following way:

 $f(x)=\begin{cases}x^{2}\sin\left(\frac{1}{x}\right)&\text{if }x\neq 0\\ 0&\text{if }x=0.\end{cases}$

Then if $x\neq 0$, $f^{\prime}(x)=2x\sin\left(\frac{1}{x}\right)-\cos\left(\frac{1}{x}\right)$ using the usual rules for calculating derivatives. If $x=0$, we must compute the derivative by evaluating the limit

 $\lim_{\epsilon\to 0}\frac{f(\epsilon)-f(0)}{\epsilon}$

which we can simplify to

 $\lim_{\epsilon\to 0}\,\epsilon\sin\left(\frac{1}{\epsilon}\right).$

We know $\left|\sin(x)\right|\leq 1$ for every $x$, so this limit is just $0$. Combining this with our previous calculation, we see that

 $f^{\prime}(x)=\begin{cases}2x\sin\left(\frac{1}{x}\right)-\cos\left(\frac{1}{x% }\right)&\text{if }x\neq 0\\ 0&\text{if }x=0.\end{cases}$

This is just a slightly modified version of the topologist’s sine curve; in particular,

 $\lim_{x\to 0}f^{\prime}(x)$

diverges, so that $f^{\prime}(x)$ is not continuous, even though it is defined for every real number. Put another way, $f$ is differentiable but not $C^{1}$.

Title example of differentiable function which is not continuously differentiable ExampleOfDifferentiableFunctionWhichIsNotContinuouslyDifferentiable 2013-03-22 14:10:18 2013-03-22 14:10:18 Koro (127) Koro (127) 8 Koro (127) Example msc 57R35 msc 26A24