How can I find all holomorphic functions $f:\mathbb C \to \mathbb C$ having $f=u+iv$ with $v(x,y)=u^2(x,y)$

From $$\begin{cases}u_x=2uu_y,\\u_y=-2uu_x\end{cases}$$ we draw

$$\begin{cases}u_x=-4u^2u_x,\\u_y=-4u^2u_y.\end{cases}$$

Hence $1+4u^2=0$ or $u_x,u_y=0$. In other words, $u$ must be constant, $c+ic^2$.


I think there is a fairly elegant argument for your question. Since $v$ is the imaginary part of a holomorphic function, it is a harmonic function, i.e., $$v_{xx}+v_{yy}=0.$$ Since $v=u^2$, we have in particular that $v(x,y)\geq 0$, i.e., $v$ is bounded from below. Then, by Liouville’s theorem, $v$ is constant. In particular, the gradient of $v$ is identically $0$. By the Cauchy-Riemann equations, the gradient of $u$ must be identically $0$ too, i.e., $u$ is constant. Hence, $f$ is constant. Then, it is a trivial check that $f$ must be of the form $f(x,y)=c+ic^2$ for some $c\geq 0$.