Example of a differentiable function that has right/left derivatives at endpoints not equal to right/left limits of $f'$

237 Views Asked by At

I was reviewing the notions of differentiability and limits at end points as I felt them a bit shaky for me. I was considering the example of the function $f(x)=x^2 \sin(\frac{1}{x})$ for $x \in ]0,1] $ and $f(0)=0$. This is an example of a function such that $f \in C^1(]0,1])$ but $f \notin C^1([0,1])$. We have $f'(0^+)=0$ but $\lim_{x\underset{> 0}{\rightarrow}}f'(x)$ doesn't exist. This lead me to thinking what is an example where the latter exists but does not equal to former? The precise statement:

I'm looking for a function $f:[0,1]$ such that:

-$f$ is continuous on $[0,1]$ and differentiable on $]0,1[$

-$f'$ is continous on $]0,1[$

-$\lim_{x\underset{> 0}{\rightarrow}}f'(x)$, $\lim_{\underset{< 1}{\rightarrow}}f'(x)$, $f'(0^+)$ and $f'(1^-)$ exist but $\lim_{x\underset{> 0}{\rightarrow}}f'(x)\neq f'(0^+)$ and $\lim_{\underset{< 1}{\rightarrow}}f'(x)\neq f'(1^-)$

1

There are 1 best solutions below

0
On

Ok I think I finally unravelled my confusion and I'm posting this answer in case someone might find it useful.

The definition of $f \in C^1([0,1])$ means the function $g$ defined by $g=f'$ on $]a,b[$, $g(0)=f'(0^+)$ and $g(1)=f'(1^-)$ is continuous.

But then if both $\lim_{x\underset{> 0}{\rightarrow}}f'(x)$ and $\lim_{\underset{< 1}{\rightarrow}}f'(x)$ exist then the function $h$ defined by $f'$ on $]0,1[$, $h(0)=\lim_{x\underset{> 0}{\rightarrow}}f'(x)$ and $h(1)=\lim_{\underset{< 1}{\rightarrow}}f'(x)$ is continuous on $[0,1]$ by definition. Therefore we take $g=h$ and we would have equality of respective limits.