Let $f(z)=u(x,y)+iv(x,v)$ be differentiable in $D$ and
$f(z)$ fulfills: $Re(f(z))^2=Im(f(z))$
Prove: $f(z)$ is constant
$$f(z)=u(x,y)+iv(x,v)=u(x,y)+i[u(x,y)]^2$$
$f(z)$ is analytic in $D$ so it fulfills $C-R$
$\begin{cases} u_x=2u\cdot u_y\\ u_y=-2u\cdot u_x \end{cases}$
So $$u_x=2u\cdot u_y=2u\cdot(-2u\cdot u_x)=-4u^2\cdot u_x$$ $$u_x=-4u^2\cdot u_x\iff u_x(4u^2+1)=0$$
So $u_x=0\rightarrow u=C$ or $u^2=-\frac{1}{4}\iff u=\pm \frac{i}{4}$
Can $u=\pm \frac{i}{4}?$
If u is the real part of f, then by definition, it is real, so it can't be $\frac{i}{4}$. And even if it were, that would make f a constant. (Note that if it were switching between $\frac{i}{4}$ and $-\frac{i}{4}$, then it wouldn't be continuous, and therefore not differentiable).