Limit of derivative does not exist, while limit of difference quotient is infinite

Can anyone show an example of a function $f$ of a real variabile such that

• $f$ is differentiable on a neighborhood of a point $x_0 \in \mathbb{R}$, except at $x_0$ itself;
• $f$ is continuous at $x_0$;
• $\displaystyle \lim_{x \to x_0} f'(x)$ does not exist;
• $\displaystyle \lim_{x \to x_0} \frac{f(x) - f(x_0)}{x - x_0} = +\infty$ or $\displaystyle \lim_{x \to x_0} \frac{f(x) - f(x_0)}{x - x_0} = -\infty$ ?

$$f(x)=\sqrt{x}+x\sin\frac{1}{x}$$

defined on $(0,+\infty)$, that can be defined by continuity at $0$ with $f(0)=0$? (I let you check that it works, if I am not wrong)

If you don't like it because it is only $\mathbb{R}_+$, you can replace with

$$f(x)=\sqrt[3]{x}+x\sin\frac{1}{x},$$

graph

that can be defined on $\mathbb{R}$.

Using google, you get a fairly obvious drawing explaining what is happening (personally before having an explicit example, I had a fairly good drawing in my head to convince myself that such an example was possible, and then help me to produce a formula)

• Thanks for your answer. Can you explain a bit more how you convinced yourself that such an example was possible and how you ''produced'' it? Feb 9, 2016 at 11:17
• Ok; your last requirement was asking for a vertical tangent at 0. The previous one, about the limit of $f'$ near 0, is concerned with the behaviour of $f'$ near 0, namely, you expect that your curve is oscillating a lot (though the size of oscillations are small as $f$ is continuous), which is feasible and not in contradiction with the vertical tangent. Therefore, the solution is the sum of $\sqrt{x}$ which provides a vertical tangent and $x\sin(1/x)$ which is a classical oscillating continuous function Feb 9, 2016 at 21:45

How about $f(x)=\sqrt[3]{x}=x^{1/3}$ [Graph]?

$f'(x)=\dfrac{1}{3}x^{-2/3}$. Notice that $f'(x)$ exists everywhere except at $x=0$. Also, $f(x)=\sqrt[3]{x}$ is continuous everywhere.

However, $\lim\limits_{x \to 0} \dfrac{x^{1/3}-0^{1/3}}{x-0} = \lim\limits_{x \to 0} \dfrac{1}{x^{2/3}} = +\infty$.

While this curve is continuous, it has a vertical tangent at $x=0$ (resulting in the "infinite" derivative there).

[If you choose $f(x)=\sqrt[3]{x^2}=x^{2/3}$, you'll get a similar example where the limit definition of the derivative gives $\pm \infty$ as you approach $0$ from the left and right.]

• Well, the limit at 0 of $f'(x)$ when $x$ goes to 0 exists, to my understanding... it is $+\infty$! Feb 8, 2016 at 22:16
• Umm...no. Not in the usual sense of a limit existing. Limits = +/- infinity are just special kinds of divergence. Yes, in an extended sense, the derivative at zero is infinity. But in the standard accepted definition of differentiability this function isn't differentiable at zero because the limit doesn't exist (as a real number) there. Feb 8, 2016 at 22:39
• Well, it is a question of definition, but to my point of view, no existence of a limit, when dealing with real numbers, usually means doesn't exist in $\mathbb{R}\cup\{\pm\infty\}$. Similarly, the word "divergence" is never really clear... Of course, your definition makes sense too, but the notion of a "usual" definition is something vague to my point of view... only @Paolo knows what he meant (ps: I never said your function was differentiable at 0) Feb 8, 2016 at 22:42
• When I wrote $\lim_{x \to x_0} f'(x)$ does not exist, I meant that it is not finite and it is neither $+\infty$ nor $-\infty$. I'm afraid I wasn't very clear in my question. I'm sorry. Feb 9, 2016 at 9:01

Imagine two semicircles joining when $x=x_0$ such as

$$f(x) = \sqrt{1-(x_0+1-x)^2} \text{ when } x_0 \le x \le x_0+2$$ $$f(x) = -\sqrt{1-(x_0-1-x)^2} \text{ when } x_0-2 \le x \le x_0$$

Change the signs if you want alternative limits for the derivatives as $x \to x_0$