A function $f(x)$ not continuous at 0 such that $\left[f(x)\right]^3$ is continuous at 0. 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.
 A: 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$. 
A: Does it have to be a real function? Because defining:
$$
f(x) = (x+1) e^{\frac{2\pi i}{3}}, \, (x<0)
$$
$$
f(x) = (x+1) e^{\frac{4\pi i}{3}}, \, (x>0)
$$
Then $f(x)$ is not continuous at zero, but:
$$
f^3(x) = (x+1)^3 e^{2\pi i}= (x+1)^3 e^{4\pi i}
$$
A: This is the right idea but not quite complete.  First, how do you know that $f(x)$ and $f(0)$ have the same sign as long as $x$ and $0$ are close enough?  That would follow if you knew $f$ was continuous at $0$, but that's exactly what you're trying to prove!  This assertion is still correct (assuming that you consider $0$ to have the "same sign" as either positive or negative numbers in the case $f(0)=0$), but you should provide some justification for it.
Second, your argument does not work if $f(0)=0$, since then $|f(x)-f(0)|\cdot|f(0)^2|<\epsilon$ does not give you any bound on $|f(x)-f(0)|$.  So you will need to handle that case separately.
A: Hint: the function $g(x) = \sqrt[3]{x}$ is continuous and $f(x) = g(f(x)^3)$.
