Question: I am working on the following complex analysis problem, but I have 0 idea on how to do it. I would appreciate any help with it. 

Let $f(z)$ be a complex-valued $C^{\infty}$ function defined on a connected open $\Omega$ of the complex plane. Assume that $f(z)$ and $f^2(z)$ are both harmonic (i.e. the real and imaginary parts of these functions are harmonic). Prove that either $f(z)$ or $\overline{f(z)}$ is analytc in $\Omega$.

I have absolutely no idea on how to attack this problem, so any help with it would be highly appreciated! Thanks!

Answer: 
For feedback:

Consider any two points $p = (x\_1,y\_1)$ and $q = (x\_2,y\_2).$

It is the case that $x\_1 \in \mathbb{I}$ is irrational or $y\_1 \in \mathbb{I}$ is irrational, and that $x\_2 \in \mathbb{I}$ is irrational or $y\_1 \in \mathbb{I}$ is irrational. Suppose without loss of generality that $x\_1$ is irrational. I will now consider the two cases: the case in which $x\_2$ is irrational and the case in which $y\_2$ is irrational. Suppose $x\_2$ is irrational. Then, there exists the line $\mathcal{L\_1} \in \mathbb{R}^2 \setminus \mathbb{Q}^2$ connecting $(x\_1,y\_1)$ to $(x\_1,i\_1),$ where $i\_1 \in \mathbb{I}.$ Moreover, there exists the line $\mathcal{L}\_2 \in \mathbb{R}^2 \setminus \mathbb{Q}^2$ connecting $(x\_1,i\_1)$ to $(x\_2,i\_1),$ where $i\_2 \in \mathbb{I}.$ And, there exists a line $\mathcal{L}\_3 \in \mathbb{R}^2 \setminus \mathbb{Q}^2$ connecting $(x\_2,i\_2)$ to $(x\_2,y\_2).$ So, the path $P = \mathcal{L}\_1 \cup \mathcal{L}\_2 \cup \mathcal{L}\_3 \in \mathbb{R}^2 \setminus \mathbb{Q}^2$ is a path connecting $(x\_1,y\_1)$ to $(x\_2,y\_2).$ The proof is almost identical when considering the case that $y\_2$ is irrational.

Is a proof like this even acceptable?
I was going to suggest a more direct argument.

> 
> Claim 1: Let $(a,b') \in \mathbb{R}^2 \setminus \mathbb{Q}^2$ (which we will write as $X$) s.t. $b'$ is irrational. Then for any $a'$ irrational there is a path $P$ from $(a,b')$ to $(a',b')$ in $X$.
> 
> 
> 

Indeed, let $P$ be the path $(\lambda a' + (1-\lambda) a, b')$; $\lambda \in [0,1]$. As $b'$ is irrational $P$ is in $X$.

Similarly, the following holds:

> 
> Claim 2: Let $(a',b) \in \mathbb{R}^2 \setminus \mathbb{Q}^2$ (which we will write as $X$) s.t. $a'$ is irrational. Then for any $b'$ irrational there is a path $P$ from $(a',b)$ to $(a',b')$ in $X$.
> 
> 
> 

Finally, we note the following: 

> 
> Claim 3: Let $(c',d'')$ and $(a',b')$ be s.t. $a',b',c'$ and $d'$ are all irrational. Then there is a path in $X$ from $(a',b')$ to $(c',d')$. 
> 
> 
> 

Indeed, let $P\_1$ be the path $(c'\lambda + a'(1-\lambda), b')$; $\lambda \in [0,1]$, and let $P\_2$ be the path $(c', d' \tau + b'(1-\tau))$; $\tau \in [0,1]$; concatonate $P\_1$ and $P\_2$

So now let $(a,b)$ and $(c,d)$ be points in $X$. Use Claims 1 and/or 2 to find $(a',b')$ and $(c',d')$; $a',b',c',d'$ all irrational, such that there is a path from $(a,b)$ to $(a',b')$ in $X$, and from $(c,d)$ to $(c',d')$ in $X$. Then finish using Claim 3.