[Math] A function $f(x)$ not continuous at 0 such that $\left[f(x)\right]^3$ is continuous at 0.

continuityreal-analysis

The exercise 4.3.6 e) from Abbott's "Understanding Analysis 2nd edition" asks to provide an example of a real function $f(x)$ not continuous at 0 such that $\left[f(x)\right]^3$ is continuous at 0 or disproof the existence of such a function.

I would like to check if my reasoning is correct:

If $\left[f(x)\right]^3$ is continuous at $0$, then for every $\epsilon>0$ there exists a $\delta>0$ such that $|x-0|<\delta$ implies $|f^3(x)-f^3(0)|<\epsilon$.

Hence
$$
\epsilon>|f^3(x)-f^3(0)|=|f(x)-f(0)|\cdot |f^2(x)+f(x)f(0)+f^2(0)|\ge \\ \ge|f(x)-f(0)|\cdot |f^2(0)|
$$
and this would imply that $f$ is continuous at $0$ and the request is impossible to satisfy.

Note: I have used the identity $a^3-b^3=(a-b)(a^2+ab+b^2)$ and also the fact that if $x$ and $0$ are close enough $f(x)$ and $f(0)$ have the same sign.

Best Answer

For a different argument, the function $g(x)=x^{1/3}$ is continuous everywhere. So if $x\longmapsto f(x)^3$ is continuous, then so is $f(x)=g(f(x)^3)$. Thus, if $f$ is not continuous at $0$, neither is $f(x)^3$.