I'm trying to determine the analytic functions $f = u + iv$ for which $u(x, y) = x^3 + xg(y)$, where $g$ is a twice continuously differentiable function.
What I've tried is to figure out what v must be in terms of $x$ and $y$, and then express the resulting $f$ in terms of $z$.
First I differentiated $u$ with respect to $x$ and then integrated the result with respect to $y$. Next I applied Cauchy-Riemann to get the differential equation $6xy + h'(x) = - x g'(y)$, where $h$ is an unknown real valued function of one real variable.
This differential equation seemed too complicated to handle, and as a desperate measure to come forward I just deleted h' to get the simpler differential equation $6xy = - x g' (y)$, which I could simplify further to $6y = - g'(y)$.
The obvious solution to this differential equation is $c - 3y^2$, which means that $u = x^3 +cx - 3xy^2$.
By a technique similar to what I had used earlier, I found that the harmonic conjugate $v = 3(x^2)y + cy - y^3$, and it was easy to see that $u + iv = cz + z^3$, where $z = x + iy$.
However according to a source, the general solution is $z^3 + iaz^2 + bz + ic$, where $a, b, c ∈ \mathbb R$. So apparently I've found only some of the holomorphic functions which satisfy the requirement and not all of them. What went wrong?
We know that if $f = u +iv$ is holomorphic, then $u$ and $v$ are harmonic, i.e. $u_{xx} + u_{yy} = 0$ and $v_{xx} + v_{yy} = 0$. This follows from Cauchy-Riemann equations.
In particular, you can calculate $u_{xx}=6x$ and $u_{yy} = xg''(y)$, so $u_{xx}+u_{yy} = 0$ implies that $g''(y) = -6$, which gives you $g(y) = -3y^2+ay+b$.