Is this non monotonic function differentiable at $x=1$?

34 Views Asked by At

Let $f\colon \mathbb{R} \to\mathbb{R}$ be a function defined by:

$f\left(x\right) = \begin{cases} 2x-1 & x=1+\frac{1}{n}\quad n\in\mathbb{Z}\\ x^{2} & x\neq1+\frac{1}{n}\quad n\in\mathbb{Z} \end{cases}$

Is this function differentiable at $x=1$?

This is an attempt to construct a non-monotonic function that is differentiable. I saw already an example for this kind of function in a book of counterexamples, but i was wondering if the function mentioned above may be good too.

1

There are 1 best solutions below

0
On BEST ANSWER

Note that, if $x\neq1$,$$\frac{f(x)-f(1)}{x-1}=\begin{cases}2&\text{ if }x=1+\frac1n\text{ for some }n\in\mathbb Z\\x+1&\text{ otherwise.}\end{cases}$$Therefore,$$\lim_{x\to1}\frac{f(x)-f(1)}{x-1}=2.$$So, yes, $f$ is differentiable at $1$ (and $f'(1)=2$).