# example of differentiable function which is not continuously differentiable

Let $f$ be defined in the following way:

$$f(x)=\{\begin{array}{cc}{x}^{2}\mathrm{sin}\left(\frac{1}{x}\right)\hfill & \text{if}x\ne 0\hfill \\ 0\hfill & \text{if}x=0.\hfill \end{array}$$ |

Then if $x\ne 0$, ${f}^{\prime}(x)=2x\mathrm{sin}\left(\frac{1}{x}\right)-\mathrm{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

$$\underset{\u03f5\to 0}{lim}\frac{f(\u03f5)-f(0)}{\u03f5}$$ |

which we can simplify to

$$\underset{\u03f5\to 0}{lim}\u03f5\mathrm{sin}\left(\frac{1}{\u03f5}\right).$$ |

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

$${f}^{\prime}(x)=\{\begin{array}{cc}2x\mathrm{sin}\left(\frac{1}{x}\right)-\mathrm{cos}\left(\frac{1}{x}\right)\hfill & \text{if}x\ne 0\hfill \\ 0\hfill & \text{if}x=0.\hfill \end{array}$$ |

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

$$\underset{x\to 0}{lim}{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 |
---|---|

Canonical name | ExampleOfDifferentiableFunctionWhichIsNotContinuouslyDifferentiable |

Date of creation | 2013-03-22 14:10:18 |

Last modified on | 2013-03-22 14:10:18 |

Owner | Koro (127) |

Last modified by | Koro (127) |

Numerical id | 8 |

Author | Koro (127) |

Entry type | Example |

Classification | msc 57R35 |

Classification | msc 26A24 |