0

A question on a practice exam asks:

Provide an example of a function $f: \mathbb{R} \to \mathbb{R}$ which is not differentiable but $f^{2}$ is differentiable.

This confuses me because $f$ is differentiable when $f^2$ is differentiable seems to prove that any differentiable $f^2$ means that f would be differentiable.

kt046172
  • 545

3 Answers3

3

The function $f:x\rightarrow |x|$ is a possible answer.

  • 1
    Note that the page you've shared says that is $f^2$ is differentiable at a point $\textit{and}$ doesn't vanish at this point then $f$ is also differentiable at that point. In the case of $f:x\rightarrow |x|$, the function is not differentiable at 0 and vanishes at the same point. – Arthur Breton Dec 08 '19 at 02:37
1

Hint: let $f(x)=1$ when $x$ is rational and $f(x)=-1$ when $x$ is irrational.

Botond
  • 11,938
1

Continuity is needed as a premise.

Consider $f(0)=-1$ and $f(x)=1$ for $x\ne 0$ about its differentiability at zero.

user284331
  • 55,591