I'm attempting Chapter 1, Exercise 12 in Stein & Shakarchi's Complex Analysis, which is as follows:
Consider the function defined by $$f(x+iy) = \sqrt{|x||y|}$$ whenever $x, y \in \mathbb{R}$. Show that $f$ satisfies the Cauchy-Riemann equations at the origin, yet $f$ is not holomorphic at $0$.
I think that I have solved it, but since I don't have much experience with complex analysis, I'm not sure if my argument is valid/correct:
If, for $x, y \in \mathbb{R}$, we write $$f(x+iy) = \sqrt{|x||y|} = u(x,y)$$ and $v(x,y) = 0$, since $f$ is a real-valued function, then, for $h \in \mathbb{R}$, $$\frac{\partial u}{\partial x} = \lim_{h\rightarrow 0} \frac{u(x+h,y)-u(x,y)}{h} = \lim_{h\rightarrow 0}\frac{0}{h} = 0 = \frac{\partial v}{\partial y}$$ and similarly we find that $\partial u/\partial y = 0 = -\partial v/\partial x$, so this function satisfies the Cauchy-Riemann equations.
Now, for $h = h_1 + ih_2 \in \mathbb{C}$, $$\lim_{h\rightarrow 0} \frac{f(z+h)-f(z)}{h} = \lim_{h\rightarrow 0} \frac{\sqrt{|h_1||h_2|}}{h_1+ih_2}$$ at the origin.
Suppose that $h_1 = ab = h_2$ for real numbers $a,b > 0$. Then $$\lim_{h\rightarrow 0} \frac{f(z+h)-f(z)}{h} = \lim_{ab\rightarrow 0} \frac{ab}{ab + iab} = \frac{1}{1+i}.$$ But if instead $h_1 = -ab = -h_2$, then $$\lim_{h\rightarrow 0} \frac{f(z+h)-f(z)}{h} = \lim_{ab\rightarrow 0} \frac{ab}{-ab + iab} = \frac{1}{-1+i},$$ so the limit does not exist and hence $f$ is not holomorphic at the origin.
I would greatly appreciate if somebody could check the above for correctness. (In particular, can I just assume that the $ab$ factorization exists? And is it sufficient to show that the limit is not the same by approaching from different directions?)