Let $f(x)$ is a function such that $f(x)=x$ if $x\ge0$ and $f(x)=-x$ if $x<0$ then we can write $f(x)=|x|$.
How about $g(x)$ such that $g(x)=x^3$ if $x\ge0$ and $g(x)=x^2$ if $x<0$? Can we write $g(x)$ use one formula?
Let $f(x)$ is a function such that $f(x)=x$ if $x\ge0$ and $f(x)=-x$ if $x<0$ then we can write $f(x)=|x|$.
How about $g(x)$ such that $g(x)=x^3$ if $x\ge0$ and $g(x)=x^2$ if $x<0$? Can we write $g(x)$ use one formula?
Yes we can! Use $g(x)=x^{2.5+\frac{sgn(x)}{2}}$
(where $sgn(x)$ is the sign function)