Is this case distinction correct

34 Views Asked by At

Let $f:\mathbb{R}\to\mathbb{R}$, $f(x)=x|x-1|=\begin{cases} -x(x-1) &x\leq1 \\ x(x-1) & x>1 \end{cases}$.

Is this case distinction correct? Thank you!