# Harmonic function $u(x,y)=x^3-3xy^2-3x^2y+y^3+x^2-y^2+2xy$

Let $u(x,y)=x^3-3xy^2-3x^2y+y^3+x^2-y^2+2xy$. To prove that $u$ is harmonic, is showing that $\frac{\partial ^2u}{\partial x^2}+\frac{\partial ^2u}{\partial y^2}=0$ enough to show its harmonic?

Secondly, to find a harmonic function $v:\mathbb{R}^2\rightarrow \mathbb{R}$ such that $f(x+iy)=u(x,y)+iv(x,y)$ is differentiable on $\mathbb{C}$, is what I've done below correct? I'm using the cauchy-riemann equations below. Is there any other (better) way?

$\frac{\partial u}{\partial x}=3x^2-3y^2-6xy+2x+2y=\frac{\partial v}{\partial y}\Rightarrow v=3x^2y-y^3-3xy^2+2xy+y^2+h(x)\\ -\frac{\partial u}{\partial y}=3x^2-3y^2+6xy-2x+2y=\frac{\partial v}{\partial y}\Rightarrow v=3x^2y+x^3-3xy^2+2xy-x^2+\bar h(y) \\ \Rightarrow v(x,y)=3x^2y-3xy^2+2xy+x^3-x^2+y^2-y^3 + c$

-

There is another way, but it requires certain familiarity with complex polynomials. We see two parts in $u$, one cubic and one quadratic. So one expects $z^3$ and $z^2$ to be involved. Indeed, $z^3=(x^3-3xy^2)+i(3x^2y-y^3)$ and $z^2=(x^2-y^2)+i(2xy)$. Since $u$ is composed of these real and imaginary parts, it is harmonic. One can then piece the puzzle together into the function $f(z)=(1+i)z^3+(1-i)z^2$ of which $u$ is the real part. Then take imaginary part to get $v$.