Verify that $\sqrt z$ is analytic using the Cauchy–Riemann equations For a Mathematical Methods class I am taking this year, we started off with Complex Analysis. In one of the problem sets we were tasked to show that the complex-valued function $ f(z)= \sqrt z  $ satisfies the Cauchy–Riemann equations and is thus analytic. I made good progress, but I couldn't see how it was satisfied.
Here is my approach:

*

*if we take $z=x+iy \in \mathbb{C}$, then $\sqrt{z}=\sqrt{x+iy}=a+ib$ (say) as $\mathbb{C}$ is a field we will have a complex number after taking the square root anyway.


*From there it was trivial to show that $a=\pm\sqrt{\frac{x+\sqrt{x^2+y^2}}{2}}$ and $b=\pm\sqrt{\frac{-x+\sqrt{x^2+y^2}}{2}}$, where we pick the signs such that $ab$ corresponds to sgn$(y)$. From this I have that my original function is thus: $$f(z)=\sqrt z=\pm\sqrt{\frac{x+\sqrt{x^2+y^2}}{2}}+i\cdot\pm\sqrt{\frac{-x+\sqrt{x^2+y^2}}{2}}$$
thus I can split the complex valued function into two parts:
$$f(z)=\sqrt z=u(x,y)+i(v(x,y));\\  u(x,y)=\pm\sqrt{\frac{x+\sqrt{x^2+y^2}}{2}},\; v(x,y)=\pm\sqrt{\frac{-x+\sqrt{x^2+y^2}}{2}}$$


*Now for the partial derivatives;
I went through the mechanics and found that:
$$\frac{\partial u}{\partial x}=\pm\frac{\sqrt{x+\sqrt{x^2+y^2}}}{2\sqrt{2}\sqrt{x^2+y^2}} ; \; \frac{\partial u}{\partial y}=\pm\frac{y}{2\sqrt{2}\sqrt{x+\sqrt{x^2+y^2}}\sqrt{x^2+y^2}} $$
&&
$$\frac{\partial v}{\partial x}=-(\pm)\frac{\sqrt{-x+\sqrt{x^2+y^2}}}{2\sqrt{2}\sqrt{x^2+y^2}} ; \; \frac{\partial v}{\partial y}=\pm\frac{y}{2\sqrt{2}\sqrt{-x+\sqrt{x^2+y^2}}\sqrt{x^2+y^2}}$$
Afterwards, I fail to see how this implies that $u_x=v_y, u_y=-v_x$ I dont think thusfar I have made any major mistakes, however, from this point on, how can I conclude that yes the CR-equations are satisfied? I also tried using the CR-equations in polar form applied to the polar form of $f(z)$ but to no avail.
 A: $\newcommand{\sgn}{\operatorname{sgn}}\newcommand{\del}{\partial}$I will only demonstrate that $\del_xu=\del_y v$ and leave the other verification as an exercise (it will be the same essentially but is good practice for you to do). I will consider the principal branch of the square root: this means I declare the square root of a number with positive imaginary part to have positive imaginary part, and a number with negative imaginary part to have a square root with negative imaginary part. This is taking the logarithmic-exponential square root with the declaration $-\pi\lt\mathrm{Arg}\le\pi$, if you know what I mean by that, and leaving a (logarithmic) branch cut along the nonpositive real axis. You already know how to solve the quadratic equations clearly ($x,y$ are any real numbers with $x+iy\notin(-\infty,0]$ because the sign term makes the expression there ambiguous): $$f:(x+iy)\mapsto\underset{u(x+iy)}{\underbrace{\sqrt{\frac{x+\sqrt{x^2+y^2}}{2}}}}+i\cdot\underset{v(x+iy)}{\underbrace{\sgn(y)\cdot\sqrt{\frac{-x+\sqrt{x^2+y^2}}{2}}}}$$Note that the sign term is very important!
It is a straightforward chain rule application to show that, when $x+iy\notin(-\infty,0]$ (this is our branch cut, so I won’t consider differentiability there - branching is important - see below): $$\begin{align}\frac{\partial u}{\partial x}&=\frac{1}{2\sqrt{2}\sqrt{x^2+y^2}}\cdot\sqrt{x+\sqrt{x^2+y^2}}\\\frac{\partial v}{\partial y}&=\frac{1}{2\sqrt{2}\sqrt{x^2+y^2}}\cdot\frac{\sgn(y)\cdot y}{\sqrt{-x+\sqrt{x^2+y^2}}},\quad y\neq0\end{align}$$
To show they are the same is equivalent to showing (when $y\neq0$): $$\begin{align}0&=\sqrt{x+\sqrt{x^2+y^2}}-\frac{\sgn(y)\cdot y}{\sqrt{-x+\sqrt{x^2+y^2}}}\\\iff0&=-\sgn(y)\cdot y+\sqrt{x^2+y^2-x^2}\\\iff0&=-\sgn(y)\cdot y+\sgn(y)\cdot y\end{align}$$Which is true. In the case $y=0$, note I have asserted $x\gt0$ for this branch and we see through L’Hôpital’s rule: $$\begin{align}\lim_{y\to0\\x\gt0}\partial_y v&=\frac{1}{2x\sqrt{2}}\lim_{y\to0}\sqrt{\frac{y^2}{-x+\sqrt{x^2+y^2}}}\\&=\frac{1}{2x\sqrt{2}}\lim_{y\to0}\sqrt{\frac{2y}{y(x^2+y^2)^{-1/2}}}\\&=\frac{1}{2x\sqrt{2}}\sqrt{2x}\end{align}$$And we recover equality of partial derivatives in this case. $\blacksquare$
You will see that even if we allow complex numbers on the branch cut, $\del_x u=\del_y v$ (except possibly at $0$, I haven’t checked this case yet) but when you do the other half, as an exercise, in showing $\del_y u=-\del_x v$ (for $x+iy$ not on the branch cut $(-\infty,0]$), you will notice that fixing an $x\lt0$ and letting $y\to0$ (i.e. approaching the branch cut) does not give equality of derivatives (indeed, both sides of the resulting equations do not even have a limit, as would be expected from the geometric intuition of the image of $f$ “shearing” at the branch cut). So, the square root function I defined is analytic everywhere except for that cut, which is one of a few reasons why the $\pm$ notation you were using is problematic since branching has implications for when and where a function is differentiable.
