Harmonic functions the squares of which are harmonic as well I have been asked to determine all such complex-valued harmonic functions whose squares are also harmonic. Clearly the set of all such functions contains as a subset the set of analytic functions (which are themselves harmonic and their squares being analytic, are again harmonic), but is that all? Or are there non-analytic harmonic functions that have harmonic squares? I need some direction to proceed with.
 A: If $u$ is harmonic then $u^{2}$ is harmonic iff $u_x^{2}+u_y^{2}=0$. You can see this by computing the Laplacian. But I don't think  there is a simple description of all solutions of this equation.
A: $\partial_z u^2=2u\partial_z u$ so $0=\partial_{\bar z} (\partial_z u^2)=2(\partial_{\bar z}u)(\partial_z u)+2u\partial_{\bar z} (\partial_z u)=2(\partial_{\bar z}u)(\partial_z u)$
Hence $(\partial_{\bar z}u)(\partial_z u)=0$ for all $z\in \mathbb C$
But now if $A$ is the set where $\partial_zu=0$, $A$ is obviously closed, so assuming $u$ is not analytic and $A \ne \mathbb C$ it follows that $\partial_{\bar z}u=0$ contains a non-empty open set $B$ and from there it obviously follows $\partial_{\bar z}u=0$ for all $z \in \mathbb C$, so $u$ is conjugate analytic.
(edit - per comments to explicit the above - we note that if $u$ harmonic, $\partial_z u$ is always analytic and $\partial_{\bar z}u$ is always conjugate analytic, so in this case, we have a conjugate-analytic function $g=\partial_{\bar z}u$ zero on an open non-empty set, it then follows by the identity principle for conjugate-analytic functions that $g=0$ on the connected component containing $B$; the identity principle follows from the analytic case since $g$ is conjugate analytic iff $\bar g$ is analytic and similarly $g=0$ iff $\bar g=0$))
Hence $u$ must be either analytic or conjugate analytic (note that the proof applies to any domain, while in general, $u$ is analytic or conjugate analytic on any component of the open set where it is defined, if that is not connected)
