Is this complex function differentiable at 0? I'm moving my first steps in Complex Analysis. I can't tell whether the function
$$f(x+iy) = 2|xy|+i(y^2-x^2)$$
is differentiable at $0$ or not.
I tried using the limit of the difference quotient:
$$\lim_{z\to 0}\frac{2|xy|+i(y^2-x^2)}{x+iy}$$
The limit is $0$ when $xy>0$ because $x=-iy$ is a root of the numerator, but I can't compute the limit in general...
 A: HINT:
$$\left|\frac{2|x||y|+i(y^2-x^2)}{x+iy}\right|=\sqrt{\frac{4x^2y^2+(y^2-x^2)^2}{x^2+y^2}}=\sqrt{x^2+y^2}$$
Can you prove that the limit exists?
A: A less miraculous argument somewhat like the other answer: If $z=x+iy$ then it's clear that $|x|\le|z|$ and $|y|\le|z|$, hence $$|f(z)|\le 2|z|^2+|z|^2+|z|^2.$$(So $$\left|\frac{f(z)-f(0)}z\right|\le\frac{4|z|^2}{|z|}=4|z|\to0\quad(z\to0).)$$
This seems preferable because for example it also applies to show the function $g(x+iy)=3|x||y|+x^2$ is differentiable at the origin, without the miraculous simplification.

Regarding the C-R equations, and some erroneous things that have been said in the comments: For this function we have $u_x=u_y=v_x=v_y=0$ at the origin, but the partials are not even defined in a neighborhood of the origin, so they are certainly not continuous at the origin, hence we cannot use the C-R equations to show $f$ is differentiable at the origin.
The theorem is this:


If $u_x,u_y,v_x$ and $v_y$ are continuous at $z$ then the C-R equations at $z$ are equivalent to differentiability at $z$.


Example showing that just knowing the C-R equations at a point does not imply differentiability at that point: Define $$f(x+iy)=\begin{cases}1,&(xy=0),
\\0,&(xy\ne0).\end{cases}$$
Then at the origin all four partials exist, and in fact $u_x=u_y=v_x=v_y=0$ at the origin, so the C-R equations are satisfied at the origin. But $f$ is not even continuous at the origin, so it's certainly not differentiable at the origin.
Ok, there is a "pointwise" version of the theorem that could be applied to the example in the question:


Suppose $f:\Bbb C\to\Bbb C$ is Frechet differentiable at $z$ (when regarded as a map from $\Bbb R^2$ to $\Bbb  R^2$) and satisfies the C-R equations at $z$. Then $f$ is complex differentiable at $z$.


The function in the question is Frechet differentiable at the origin. But this isn't really of any use, because verifying it's Frechet differentiable at $0$ is almost exactly the same as verifying directly that it's complex-differentiable at $0$.
