I am reading "Lectures on Complex Function Theory" by Takaaki Nomura.
There is the following example in this book:
Show that $u(x, y) = (x-y)(x^2+4xy+y^2)$ is a harmonic function.
Find all entire functions f(z) such that $\Re f(x + i y) = u(x, y)$.
the author's answer: $u_x = 3x^3+6xy-3y^2, u_y=3x^3-6xy-3y^2$. $u_{xx}=6x+6y=-u_{yy}$.
$\Delta u =0$. So, $u$ is a harmonic function.
Let $f = u+iv$. By Cauchy-Riemann equations, $$f(z) = u_x(x,y)+iv_x(x,y)=u_x(x,y)-iu_y(x,y)=3(1-i)x^2+6i(1-i)xy-3(1-i)y^2=3(1-i)z^2.$$
So, $f(z) = (1-i)z^3+iC$, $C \in \mathbb{R}$.
The author checked if there exists an entire function $f(z)$ such that $\Re f(x + i y) = u(x, y)$, then $f(z) = (1-i)z^3+iC$ must hold. But the author didn't check $\Re f(x + i y) = u(x, y)$ actually holds.
Is the above answer ok or not?
$f(z) = (1-i)z^3+iC = u_1(x,y)+iv_1(x,y)$, $C \in \mathbb{R}$.
$\frac{\partial u_1}{\partial x} = \frac{\partial u}{\partial x}$.
$\frac{\partial u_1}{\partial y} = \frac{\partial u}{\partial y}$.
So, $u_1 = u + \phi(y)$.
So, $\frac{\partial u_1}{\partial y} = \frac{\partial u}{\partial y} + \frac{d\phi}{dy}$.
So, $\frac{d\phi}{dy}=0$.
So, $\phi(y) = C_1$, where $C_1 \in \mathbb{R}$.
So, $u_1=u+C_1$.
$u_1(0, 0) = \Re ((1-i)0^3+iC) = 0$.
$u(0,0)+C_1=0+C_1=C_1$.
So, $C_1 = 0$.
So, $u_1(x, y) = u(x,y)$.