# How to show that $f(x) = x^2 \sin(1/x^2)$ with $f(0)=0$ is differentiable and $f'$ is unbounded on $[-1,1]$?

If the function $f$ is defined by $$f(x) = \begin{cases}x^2 \sin(\frac{1}{x^2}) & x \ne 0 \\ 0 & x = 0 \end{cases}$$ then $f$ is differentiable and $f'$ is unbounded on $[-1,1]$.

I know this is true. How should I go about proving this?

• Have you calculated $f'(x)$? Treat the case $x = 0$ separately and go back to the definition. – Simon S Dec 4 '14 at 21:11
• What have you tried? Can you compute the derivative for points $x \ne 0$? What about for $x = 0$ (you'll need to use the definition, or the squeeze lemma for limits)? – John Hughes Dec 4 '14 at 21:11

## 3 Answers

The cool point of the problem is that although for any positive value $M$ and positive $\epsilon$ we can find some value of $x$ with $|x|<\epsilon$ such that $|f'(x)| > M$, yet $f$ is differentiable at $x=0$.

In fact, $f'(0) = 0$, and we can see that by applying the definition of derivative: $$\left. \frac{df(x)}{dx} \right|_{x=0} = \lim_{h\rightarrow 0} \frac{h^2 \sin\frac{1}{h^2}-f(0)}{h} = \lim_{h\rightarrow 0} {h \sin\frac{1}{h^2}}-0 =0$$ since $|\sin\frac{1}{h^2}|$ is bounded by 1 and that is being multiplied by $h$.

On the other hand, look at the expression for $f'(x)$ when $x \neq 0$. At points where $\frac{1}{x^2} = (n+\frac{1}{2})\pi$,
$$|f'(x)| > \frac{2}{x} - 2x$$ and this is unbounded as $x$ approaches zero.

At x=0, we can't use the normal derivative rules. So a chain rule application isn't valid, as far as I know. When things like this come to question, the definition is where to look. In this case, the derivative is:

\begin{equation} \lim_{h\to 0} \frac{f(x+h)-f(x)}{h}=\lim_{h\to 0} \frac{h^{2}sin(1/h^{2})}{h}=\lim_{h\to 0} h sin(1/h^{2})=0 \end{equation}

The last step was by squeeze theorem, squeezed between $|h|$ and $-|h|$.

So $f'(0)=0$. Everywhere else it is differentiable, because by chain and product rule, compositions and products of diff. functions are diff, and by linearity of the derivative, sums of diff. functions are diff. as well.

So $f'(x)$ is diff on the interval. At 0, it is 1. Otherwise, it is equal to

$$f'(x) = 2x\sin(1/x^2)-2\frac{\cos(1/x^2)}{x}$$

as stated by JefLaga. 1/x is not bounded on the interval, though. So $f'(x)$ isn't bounded on [-1,1].

Using the product and chain rule, one gets that $$f'(x) = 2x\sin(1/x^2)-2\frac{\cos(1/x^2)}{x}$$ Notice that this function is unbounded on the given interval.

• That's not completely correct. You need to add that $f'(0) = 0$, rather than it being undefined (as it would be if the formula on the right were the whole answer). – John Hughes Dec 4 '14 at 21:42
• I agree, but I think this still implies that the derivative is unbounded, because it is unbounded on the interval $]0,1]$ – Jef L Dec 5 '14 at 7:39
• Agree completely -- this function, which agrees with the derivative except at zero, is indeed unbounded. But it doesn't answer the first bit of the question, which is to show that $f$ is differentiable (everywhere). – John Hughes Dec 5 '14 at 11:32