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: 
Expanding on Wojowu's comment, it is far easier to show that $\mathbb{R}^{2}$ less any countable set is path connected. From this connectedness is of course implied.

The argument ultimately comes down to the fact that the set of lines in the plane containing a particular point is uncountable. 

Let $A\subseteq\mathbb{R}^2$ be a countable set and let $x,y\in\mathbb{R}^{2}\setminus A$. Let $\mathcal{L}\_{x}$ be all lines in $\mathbb{R}^{2}$ that contain $x$. Then define $f:A\rightarrow\mathcal{L}\_{x}$ by defining $f(z)$ to be the unique line $L\in\mathcal{L}\_{x}$ that contains $z$. Then, because $A$ is countable and $\mathcal{L}\_{x}$ is uncountable we have that $\mathcal{L}\_{x}\setminus f(A)$ is uncountable. We can similarly define a set $\mathcal{L}\_{y}$ of lines containing $y$ and a function $g:A\rightarrow\mathcal{L}\_{y}$. Because $\mathcal{L}\_{x}\setminus f(A)$ and $\mathcal{L}\_{y}\setminus g(A)$ are uncountable we can choose nonparallel lines $L\_{1}\in\mathcal{L}\_{x}\setminus f(A)$ and $L\_{2}\in\mathcal{L}\_{y}\setminus g(A)$ which necessarily intersect. A path from $x$ to $y$ (or $y$ to $x$) in $\mathbb{R}^{2}\setminus A$ can be constructed using these lines.
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.