How to find the analytic function $f=u(x,y)+iv(x,y)$ How to find $u$ and $v$ such that $f=u(x,y)+iv(x,y)$ is analytic, knowing that $\cfrac{v}{u}=\phi(y)$.
I tried writing $v(x,y)=u(x,y)\phi(y)$ and then calculating the partial derivatives with respect to $x$ and $y$:
a) $\cfrac{\partial{v}}{\partial{x}}=\cfrac{\partial{u}}{\partial{x}}\phi(y)$ ;
b) $\cfrac{\partial{v}}{\partial{y}}=\cfrac{\partial{u}}{\partial{y}}\phi(y)+u(x,y)\phi'(y)$
From the first equation, after replacing $\frac{\partial{v}}{\partial{x}}$ by $-\frac{\partial{u}}{\partial{y}}$ from the Cauchy-Riemann equations, I find that $$u(x,y)=-\int{\phi(y)\frac{\partial{u}}{\partial{x}}dy}$$
Now how should I calculate this integral?
Is there another way to find $u$ and $v$?
 A: Taking derivative of $$\frac v u =\phi(y)$$ with respect to $x$, one gets $$\Rightarrow \frac{v_xu-vu_x}{u^2}=0$$ $$\Rightarrow \frac{v_x}{u_x}=\frac v u,$$ which by C-R implies $$\frac{-u_y}{v_y}=\frac v u,$$ or $$uu_y+vv_y=0,$$ namely $$\frac{\partial }{\partial y}(u^2+v^2)=0$$ $$\Rightarrow \frac{\partial }{\partial y}\log(u^2+v^2)=0.$$Now $\log(u^2+v^2)$ being harmonic, this shows that $$\frac{\partial^2}{\partial x^2}(\log(u^2+v^2))=0$$ $$\Rightarrow \log(u^2+v^2)=a_1x+b_1,$$ or $$u^2+v^2=e^{a_1x+b_1},$$ where $a_1,b_1$ are constant. Applying the relation $v=\phi u$, one now has $$(1+\phi^2)u^2=e^{a_1x+b_1},$$ which shows that up to sign $$u=\frac {e^{ax+b}}{\sqrt{1+\phi^2}},$$ $$v=\frac {\phi e^{ax+b}}{\sqrt{1+\phi^2}},$$ where $a=\frac 12a_1,b=\frac 12b_1$. Applying C-R, i.e. $u_y=-v_x$, one gets after canceling factors that $\phi'=a(1+\phi^2)$. This is a separable equation, so after integration one has $$\tan^{-1}\phi=ay+C,$$ or $$\phi=\tan(ay +C),$$ where $C$ is a constant. Now by simple trig identities, one can express $u,v$ as $$u=\pm e^{ax+b}\cos(ay +C),$$ $$v=\pm e^{ax+b}\sin(ay +C),$$ which represent the general solutions and are easily checked to satisfy the C-R equations.
Example: $f(z)=e^z=e^x\cos(y)+i e^x\sin(y)$ with $\phi(y)=\tan(y).$
