[Math] How to find real and imaginary parts of complex function

complex numberscomplex-analysis

I am trying to find the real and imaginary parts of $$f(z)=z^2\cos z-e^{z^3-z}$$ AND directly verify that both are harmonic

and am having lots of trouble. I know f is holomorphic, and I know many identies such as $$\cos(z)=\cos(x)\cosh(y)-i\sin(x)\sinh(y)$$

but no matter how I try to reorganize, I get so many terms all containing different parts and then I am unable to proceed because I am confused. Is this the only way to find the real and imaginary parts? can anyone give advice/help for this?

Update: I have now gotten
$$Re(f(z))=x^2cosxcoshy+2xysinxsinhy-y^2cosxcoshy-e^{x^3-3xy^2-x}cos(3x^{2}y-y^3-y)$$

and

$$Im(f(z))=(-x^2sinxsinhy+2xycosxcoshy+y^2sinxsinhy)-e^{x^3-3xy^2-x}sin(3x^{2}y-y^3-y)$$

but when it comes to verifying harmonic I know I am supposed to check second partial deravatives, but I am having lots of trouble even calculating the first as I am getting so many terms

Best Answer

For the first part, $z^2 = (x^2 - y^2) + 2 i x y$ and $\cos(z)$ is as you say. Multiply these term-by-term and select the parts without and with $i$.

For the second part, write $z^3 - z = x^3 - 3 xy^2 - x + i (3x^2y - y^3 - y) = u + i v$. Then $e^{u+iv} = e^u \cos(v) + i e^u \sin(v)$.

Then put the two parts together. $\text{Re}(A-B) = \text{Re}(A) - \text{Re}(B)$, and similarly for $\text{Im}$.