You have a function $f:\Bbb R\to\Bbb R$ such that $|f(y)|=|x^2-x^3|=x^2|1-x|$ for all $x\in\Bbb R$. There are many such functions: for each $x$ except $0$ and $1$ you can choose either $x^2|1-x|$ or $-x^2|1-x|$ to be the value of $f(x)$.
Suppose that $a\ne 0$ and $a\ne 1$, so that $f(a)\ne 0$. Then $f$ need not even be continuous at $a$: $\lim\limits_{x\to a}f(x)$ exists if and only if there is an $\epsilon>0$ such that $f(x)$ has the same algebraic sign for all $x\in(a-\epsilon,a)\cup(a,a+\epsilon)$, and that limit is $f(a)$ if and only if $f(a)$ also has that algebraic sign. To see what can go wrong, imagine that you set
$f(x)=\begin{cases} x^2|1-x|,&\text{if }x\text{ is rational}\\\\ -x^2|1-x|,&\text{if }x\text{ is irrational}\;; \end{cases}$
This function clearly can’t be continuous at any irrational.
Now what happens at $x=1$? It’s not hard to see that since $\lim\limits_{x\to 1}x^2|1-x|=0$, $f(x)$ is at least continuous at $x=1$, but must it have a derivative there? Must the limit
$\lim_{x\to 1}\frac{f(x)-f(1)}{x-1}=\lim_{x\to 1}\frac{f(x)}{x-1}$
exist? $\dfrac{f(x)}{x-1}=\dfrac{x^2|1-x|}{x-1}=\pm x^2$, depending on whether $f(x)$ is $x^2|1-x|$ or $-x^2|1-x|$. What if we chose to set $f(x)=x^2|1-x|$ for all $x$? Then $\lim_{x\to 1^-}\frac{f(x)}{x-1}=\lim_{x\to 1^-}\frac{x^2|1-x|}{x-1}=\lim_{x\to 1^-}\frac{x^2(1-x)}{x-1}=-1\;,$ but $\lim_{x\to 1^+}\frac{f(x)}{x-1}=\lim_{x\to 1^+}\frac{x^2|1-x|}{x-1}=\lim_{x\to 1^+}\frac{x^2(x-1)}{x-1}=1\;,$ and $f$ is not differentiable at $x=1$.
The only point that remains to be considered is $x=0$. As with $x=1$, it’s not hard to check that $f$ must at least be continuous at $x=0$. What about the derivative? That would be
$\lim_{x\to 0}\frac{f(x)-f(0)}{x-0}=\lim_{x\to 0}\frac{f(x)}x=\lim_{x\to 0}\frac{x^2|1-x|}x=\lim_{x\to 0}x|1-x|=0\;.$
In other words, such a function $f$ must be differentiable at $x=0$, where its derivative must be $0$.
(This is a cute problem; I like it.)