Showing $f$ is constant in $D$ if $v=u^2$. I am working on a group worksheet and none of us know how to approach this problem:
Suppose that $f = u+iv$ is analytic in the domain $D$ and $v=u^2$ in $D$.  Show that $f$ must be constant in $D$.
We know that because it is analytic, than the Cauchy reimann equations are true. But we are not sure how to move from there. Only looking for a hint in which direction to go.
 A: Let's apply Cauchy-Riemann:
$$\frac{\partial u}{\partial x} = \frac{\partial v}{\partial y}$$
says that
$$\frac{\partial u}{\partial x} = \frac{\partial u^2}{\partial y} = 2u\frac{\partial u}{\partial y}.\tag{1}$$
Likewise
$$\frac{\partial u}{\partial y} = -\frac{\partial v}{\partial x}$$
says that
$$\frac{\partial u}{\partial y} = -\frac{\partial u^2}{\partial x} = -2u\frac{\partial u}{\partial x}.\tag{2}$$
Putting $(1)$ and $(2)$ together gives
$$\frac{\partial u}{\partial x} = -4u^2\frac{\partial u}{\partial x} \Rightarrow (1+4u^2)\frac{\partial u}{\partial x} = 0.$$
Since this holds for all $x$, either $u = \pm\frac{1}{2}i$ (which cannot be the case - why?) or $\frac{\partial u}{\partial x} = 0$ which says $u$ is constant. Then since $v=u^2$, $v$ must be constant.
A: Hint: $$u_x = v_y = (u^2)_y = 2uu_y$$
Now use the other Cauchy-Riemann equation to represent $u_y$ in terms of $u$ and $u_x$, and rearrange.

Spoiler:

 You should arrive at $(1 + 4u^2) u_y = 0$, so $u_y$ is...?

A: Thanks to the Cauchy-Riemann equations we have:
$$
u_x=v_y=2uu_y,\ u_y=-v_x=-2uu_x.
$$
It follows that
$$
u_x=2uu_y=-4u^2u_x,\ u_y=-4u^2u_y,
$$
i.e.
$$
(1+4u^2)u_x=0=(1+4u^2)u_y.
$$
Hence
$$
u_x=u_y=v_x=v_y=0,
$$
and since $D$ is connected, it follows that $u$ and $v$ are constant. Thus $f$ is constant.
