$$f(z)=\sin|z|^2$$
Where is this function complex differentiable and holomorphic?
Generally I have to use the Cauchy-Riemann teorem:
$$
\begin{split}
u_{x} &=v_{y}\\
u_{y}&=-v_{x}
\end{split}
$$
Solution
First attempt: $$ f(z)=\sin|z|^2=f(z)=\sin|x+iy|^2=\sin(x^2+2ixy-y^2)\ldots $$ This is not going anywhere...
Second attempt: $$f(z)=\sin|z|^2=\sin z\overline{z}=\sin(x^2+y^2), $$ which shouldn't be complex differential anywhere because it has no complex part => it's not holomorphic?
The real solution: $$ \begin{align} f(z) &=\sin|z|^2=\sin z\overline{z}\\ \frac{df}{d\overline{z}} &=z\cos z\overline{z}=0\\ z=0 &\implies\cos z\overline{z}=0\implies \cos z\overline{z}=0\implies|z|=\sqrt{\pm\pi/2+2K\pi}\ldots \end{align} $$ My question is can I solve this problem using some of my attemps(I need to use Cauchy-Riemann)?
In the real solution, why did we had to differentiate the function and make it equal to 0, where does this come from?
Is there a clear algorithmic way to decide if a function is holomorphic or I just have to use my imagination ?
You can use the Cauchy-Riemann conditions. Note that, from $$ f(z)=\sin|z|^2=\sin(x^2+y^2) $$ we have $$ f(z)=u+iv=\sin(x^2+y^2)+i\cdot 0 $$ so: $$ u_x=2x\cos|z|^2 \qquad u_y=2y\cos|z|^2 \qquad v_x=v_y=0 $$
so $u_x=v_y$ and $u_y=-v_x$ iff $ z=0 $ or $ \cos |z|^2=0$ that is $|z|^2=\pm\frac{\pi}{2}+2k\pi$.
The other solution is an application of the Wirtinger derivative that says that a complex function $f(z)$ is holomorphic iff $$ \frac{\partial f}{\partial \bar z}=0 $$