7

It has been along time since I did real analysis. Someone asked me this question and I could not respond. I am not sure if this is the right place to ask.

He said:

The function $f: [0, \infty)\mapsto [0, \infty)$ given by $f(x)=\sqrt{x}$ is not differentiable at $0$ because its derivative $f'(x)=1/(2\sqrt{x})$ is not continuous at $0$.

I said (what I could remember):

It is not differentiable at $0$ because $\lim_{x\to 0}(f(x)-f(0))/(x-0)=\infty$.

He said that I know that but what I told is it true?

layman
  • 20,191
Jarbou
  • 181

3 Answers3

16

The derivative $f'(x)$ of a differentiable function, $f(x)$, need not be continuous itself. A classical example is the function

$$f(x)=\begin{cases}x^2\sin(1/x)&,x\ne0\\\\0&,x=0\end{cases}$$

Then, we have

$$f'(x)=\begin{cases}2x\sin(1/x)-\cos(1/x)&,x\ne0\\\\0&,x=0\end{cases}$$

Clearly, $\lim_{x\to 0}f'(x)$ does not even exist while $f'(0)=0$ as shown by

$$f'(0)=\lim_{h\to 0}\frac{h^2\sin(1/h)-0}{h}=0$$

Hence, we have an example of a function that is differentiable at $x=0$ although it derivative is discontinuous at $x=0$.

Mark Viola
  • 179,405
9

Another counterexample, which has the additional property $\limsup\limits_{x\to 0^+} f'(x)=\infty$ and $\liminf\limits_{x\to 0^+} f'(x)=-\infty$ is $$f(x):=x^2\left( \sin\frac1x\right)\ln\lvert x\rvert$$ whose derivative (basically the same reason as DR.MV's answer) is $$f'(x)=\begin{cases}2x\left( \sin\frac1x\right)\ln\lvert x\rvert-\color{blue}{\left(\cos\frac1x\right)\ln\lvert x\rvert}+x\sin\frac1x&\text{if }x\ne0\\ 0&\text{if }x=0\end{cases}$$

However, there are restrictions on how a derivative can be discontinuous at a given point. For instance, an interesting question for the sake of your problem is:

Let $f$ be a differentiable function $[0,\varepsilon)\to \Bbb R$. Can $\lim\limits_{x\to0^+} f'(x)=\infty$ hold?

The answer is no: in fact, assume as a contradiction that this were the case. Then, by extending $f$ to $$\overline f(x):=\begin{cases} f(x)&\text{if }x\in[0,\varepsilon)\\ f'(0)x+f(0)&\text{if }x<0\end{cases}$$

we can assume that $f$ is a differentiable function on $(-\infty,\varepsilon)\ni 0$ with constant derivative for $x\le0$.

Now, due to Darboux's theorem, the image under $f'$ of any interval $(-\delta,\delta)$ must be an interval $I$ containing $f'(0)$. But this cannot be the case, because, since $\lim\limits_{x\to 0^+}f'(x)=\infty$, $\{f'(0)\}\subsetneqq f'(-\delta,\delta)\subseteqq \{f'(0)\}\cup [f'(0)+1,\infty)$ for $\delta$ sufficiently small. Absurd.

With the same idea, you can also prove that the derivative of a function, though it can be discontinuous, it cannot have jump discontinuities.

Added: To spill the beans, at each point $x$ it must hold $$\liminf_{t\to x^+} f'(t)\le f'(x) \le \limsup_{t\to x^+}f'(t)\\ \liminf_{t\to x^-} f'(t)\le f'(x) \le \limsup_{t\to x^-}f'(t)$$

  • 1
    For reference: Darboux's theorem states that if $f$ is a real-valued, differentiable function, then $f'$ has the intermediate value property. – Clement C. Aug 03 '16 at 19:51
  • 1
    I was going to point out both of your points. An example of a differentiable function with unbounded derivative that seems simpler to me is given by $x^2\sin(1/x^2)$. – David C. Ullrich Aug 03 '16 at 19:53
  • @DavidC.Ullrich In fact, while I was juggling with logarithms, I started wondering if I was overcomplicating. How could I not think of it? :D –  Aug 03 '16 at 19:55
  • What does the subset symbol with the equal/different sign below it mean? "$\subsetneqq$" – someonewithpc Aug 03 '16 at 23:09
  • @someonewithpc "$A\subsetneqq B$" (or "$A\subsetneq B$") means "$A\subseteq B$ but $A\neq B$". –  Aug 03 '16 at 23:15
  • @someonewithpc "$\subseteqq$", "$\subseteq$" and "$\subset$" are all symbols for subset, though some authors use $A\subset B$ when they additionally require $A\ne B$ (my high school maths book had the fetish of using "$A\subset B$" to indicate a proper and non-empty subset of $B$). As far as I know, "$A\subseteqq B$" and "$A\subseteq B$" are sheer synonimous which always indicate the fact that all the elements of $A$ are elements of $B$. I like being unambiguous. –  Aug 03 '16 at 23:22
  • In your discussion following the proposition in the shaded box, you define an extension, $\bar f$ of $f$ for $x<0$. Yet, $\bar f$ never appears thereafter. And I'm not sure of its relevance. Since $\lim_{x\to 0^+}f'(x)=\infty$, then for all $B>0$, there exists an $x_0$ such that $f'(x)>B$ whenever $0<x<x_0$. And since $f$ is differentiable at $0$, and $f'$ satisfies the intermediate value property on $[0,x_0]$, then there exists a number $0<\xi<x_0$ such that $f'(0)<f'(\xi)<f'(x_0)$. This is the desired contradiction and $\bar f$ was never implicated. Does this make sense? ;-)) – Mark Viola Aug 13 '16 at 16:58
  • @Dr.MV In the sentence after the definition I said "We can assume that $f$ is a differentiable function $(-\infty,\varepsilon)\to \Bbb R$ such with constant derivative for $x<0$" (it should have been $x\le 0$, now that I think about it, and I'll edit it).The reason for that assumption is replacing $f$ with $\overline f$. To be fair, at the time I did not bother checking if Darboux was valid "at the boundary" (and wikipedia does not mention it), so I opted to reduce explicitly to the case where $f$ was differentiable on a whole neighbourhood of $0$. –  Aug 13 '16 at 17:22
  • Well, I like your answer. So, +1 – Mark Viola Aug 13 '16 at 17:26
  • @Dr.MV In my proof "$f'(x)=f'(0)$ for $x\le0$" comes into play because, since I technically deal with the limit only on the right and consider a two-sided interval containing $0$ to apply Darboux, I want the function not to take intermediate values on the left: that would spoil the contradiction. –  Aug 13 '16 at 17:27
  • So, why not ignore the left? – Mark Viola Aug 13 '16 at 18:08
  • @Dr.MV Uhm... yeah, I guess I was overcomplicating things. Thank you. –  Aug 13 '16 at 20:03
3

Just to add a thought to what others already said.

As Dr MV pointed out, a function is differentiable at a point if the limit of the difference quotient exists and is finite. That's it. Continuity of the derivative is something more. Therefore your answer was correct.

However, continuity is required when we say that a function $f$ is in $\mathcal{C}^1(I)$ (here $I$ is an interval): $f$ is in $\mathcal{C}^1(I)$ if it is differentiable in $I$, and the derivative is also continuous in $I$.

In this context, the example given by Dr MV is an example of a function which is differentiable everywhere, but does not belong to $\mathcal{C}^1(\mathbb{R})$.

bartgol
  • 6,231