I must rewrite the function $\displaystyle f$ in the form $\displaystyle f(z)=u(x,y)+iv(x,y)$ where $\displaystyle f(z)=z^3+z-1$.

What I did was to write $\displaystyle z$ as $\displaystyle x+iy$ and I found out that $\displaystyle f(z)=\overbrace{x^3-3xy^2+x-1}^{u(x,y)}+i\overbrace{(y-y^3+3x^2y)}^{v(x,y)}$.

Assuming I didn't do any arithmetic error, is my approach right?