Does there exist an analytic function such that $|f(z)|=x$ for $z=x+iy \in D$? Does there exist an analytic function $f=u+iv$ in $D=\{z:|z|<1\}$ such that $|f(z)|=x$ for $z=x+iy \in D$? Prove your response.
I am pretty stuck on this.
I know that $f(z)=u(z)+iv(z)$ and
$$u_x=v_y \quad u_y=-v_x$$
Further, I want to know if it's possible for $u^2(z)+v^2(z)=x^2$ and that's about the place I stick.
Attempt
We are looking for a function of the $form f(z)=u(z)+v(z)$ such that
$$u^2+v^2=x^2$$
Differentiating with respect to $y$ we have
$$2uu_x+2vv_x=0$$
and so
$$uu_y=-vv_y$$
Supposing $f$ is analytic from the Cauchy-Riemann Equations we have 
$$uv_x=vu_x$$
and so
$$uv_x-vu_x=0=\frac{\partial}{\partial y}\left( \frac{u}{v}\right)$$
 What about $v^2$? Do we presume it is equal to $1$

Integrating gives
$$\frac{u}{v}=c \Rightarrow u=cv$$
where $c$ is some constant. We have
$$u^2+c^2u^2=x^2$$
or 
$$u=\frac{x}{\sqrt{1+c^2}}$$??
which says $v=\frac{cx}{\sqrt{1+c^2}}$ and since $v^2=1$ we have to have $c^2x^2=1+c^2$ or $x=\sqrt{\frac{1}{c^2}+1}$ which gives us $x$ constant which a contradiction of our assumption $z \in \{z:|z|<1\}$ and so this is not possible.

Consider $f$, restricted to the imaginary axis. However, if you mean $|f(z)| = |x|$ and only want to work with the Cauchy-Riemann differential equations (CRDE), derive $u^2 + v^2 = x^2$ with respect to $y$ and use CRDE to see that $u = cv$ for some $c$.
