I have to find $u(x,y)$ and $v(x,y)$ such that $f=u+iv$ is analytic. The textbook says that: $$2xyu+(y^2-x^2)v+2xy(x^2+y^2)^2=0$$
I've already tried to divide all the relation by $2xy$ (supposing $x$, $y$ non-zero) and then calculating the second order partial derivatives (to prove that $u$ or $v$ are harmonic). The computations got pretty complicated, so I was wondering, is there an easier way to find $u$ and $v$?
Dividing the whole constraint equation by $(x^2+y^2)^2$ we can write it as:
$$\frac{-2xyu+(x^2-y^2)v}{(x^2+y^2)^2}=2xy.$$
Next notice that
$$ g(z)=\frac{f(z)}{z^2}=\frac{f(z)(x-iy)^2}{(x^2+y^2)^2}=\frac{(u+iv)(x^2-y^2-i2xy)}{(x^2+y^2)^2}.$$
If $g(z)=\phi+i\psi$, this last equation implies that $\psi$, the imaginary part of g(z), is:
$$\psi(x,y) = \mathrm{Im}g(z)=\frac{-2xyu+(x^2-y^2)v}{(x^2+y^2)^2}=2xy.$$
But
$$g'(z) = \frac{\partial\psi}{\partial y}+i\frac{\partial\psi}{\partial x}=2(z+iy)=2z\;\Rightarrow\;g(z)=z^2+C,$$
where $C$ is a constant that has to be real for the imaginary part of $g(z)$ to be $2xy$. From the definition of $g(z)$ we get the general solution for $f(z)$:
$$ \bbox[5px,border:2px solid red] {f(z)=z^2(z^2+C)}\;\;\mathrm{with}\;\; C\;\mathrm{real}$$