Show the function $f: \mathbb{C}_{\pi}\to\mathbb{C}$ such that $(f(z))^2=z$ and $\text{re($f(z)$)$>0$}$ is continuous on $\mathbb{C}_{\pi}$ Suppose we have the domain (open, path connected set) $\mathbb{C}_\pi:=\mathbb{C}\setminus(-\infty,0]$ and the function $f:\mathbb{C}_{\pi}\to\mathbb{C}$ such that $(f(z))^2=z$ with $\text{re}(f(z))>0$.
We are supposed to prove $f$ is continuous on $\mathbb{C}_{\pi}$, "and hence show from first principles" that $f'(z)=1/\left(2f(z)\right)$.
The reason the title only contains the continuity portion of the question is because it seems as if the authors are implying showing continuity will imply differentiability, but to me it seems the other way around. I'm also unclear on the "first principles" request the authors have; I presume they mean the limit definition? $$$$
Algebraically, we may write for $z=x+iy, y\neq0:$ $$f(z)=f(x+iy)=\sqrt{\frac{\sqrt{x^2+y^2}+x}{2}}+i\frac{y}{|y|}\sqrt{\frac{\sqrt{x^2+y^2}-x}{2}}$$
Clearly then, $\text{re}(f(z))>0$ since $\sqrt{x^2+y^2}+x>0$ for all $z\in\mathbb{C}_{\pi}$ and the real-valued square root function is positive on its domain. $$$$
To show $f(z)$ is continuous, we use the fact that $f(z)=u(x,y)+iv(x,y)$ is continuous at $z_0=x_0+iy_0$ if and only if $u$ and $v$ are continuous at $(x_0,y_0)$.$$$$
Clearly then $u$ is continuous at $(x_0,y_0)$ since: \begin{equation} 
\begin{split}
\lim_{(x,y)\to(x_0,y_0)}u(x,y) &=\lim_{(x,y)\to(x_0,y_0)}\sqrt{\frac{\sqrt{x^2+y^2}+x}{2}}
\\ & = \sqrt{\frac{\sqrt{x_0^2+y_0^2}+x_0}{2}} 
\\& = u(x_0,y_0)
\end{split}
\end{equation}
and since real-valued square roots are continuous over the positive real numbers.
Note if $y=0$, then $f(z)=f(x+iy)=f(x+i0)=\sqrt{x}$, which is continuous on the domain, $\mathbb{C}_{\pi}$, of $f$. Thus for $v(x,y)$, we consider $y\neq0$.
First assume $y>0$. Then \begin{equation} 
\begin{split}
\lim_{(x,y)\to(x_0,y_0)}v(x,y) &=\lim_{(x,y)\to(x_0,y_0)}\frac{y}{|y|}\sqrt{\frac{\sqrt{x^2+y^2}-x}{2}}
\\ & = \sqrt{\frac{\sqrt{x_0^2+y_0^2}-x_0}{2}} 
\\& = v(x_0,y_0)\text{ when $y>0$}
\end{split}
\end{equation}
Similarly, if $y<0$, then we have:
\begin{equation} 
\begin{split}
\lim_{(x,y)\to(x_0,y_0)}v(x,y) &=\lim_{(x,y)\to(x_0,y_0)}\frac{y}{|y|}\sqrt{\frac{\sqrt{x^2+y^2}-x}{2}}
\\ & = -\sqrt{\frac{\sqrt{x_0^2+y_0^2}-x_0}{2}} 
\\& = v(x_0,y_0) \text{ when $y<0$}
\end{split}
\end{equation}
Therefore, $v$ is continuous at $(x_0,y_0)$ since real-valued square roots are continuous on $\mathbb{R}^+$.
We've shown $u,v$ are continuous at any $z=x+iy\in\mathbb{C}_{\pi}$; hence $f(z)$ is continuous on $\mathbb{C}_{\pi}$.
Finally then, \begin{equation} 
\begin{split}
f'(z_0) & = \lim_{z\to z_0} \frac{z^{1/2}-z_0^{1/2}}{z-z_0}
 \\ & = \lim_{z\to z_0} \frac{z^{1/2}-z_0^{1/2}}{(z^{1/2}-z_0^{1/2})(z^{1/2}+z_0^{1/2})}
 \\ & = \lim_{z\to z_0} \frac{1}{z^{1/2}+z_0^{1/2}}
 \\& = \frac{1}{z_0^{1/2}+z_0^{1/2}}
 \\& = \frac{1}{2z_0^{1/2}}
 \\& = \frac{1}{2f(z_0)}
\end{split}
\end{equation}
However, this "first principles" derivation of the derivative of the principal branch of the complex square root seems naive. How do we know $f(z)=z^{1/2}$ refers to this principal branch, for example?
It seems using the polar representation of the principal branch of $z^{1/2}$ and (the polar version of) Theorem $1$ of this paper When is a Function that Satisfies the Cauchy-Riemann Equations Analytic? would be a clean way to show $f'(z_0)=1/(2f(z_0))$ for any $z_0$ in the domain of definition of $f$.
More than anything, I am interested in knowing what method the authors likely had in mind when asking us to compute $f'(z)$, and if my showing of $f$'s continuity is correct.
Thank you in advance.
 A: That $f$ is continuous follows in fact from your explicit formula in terms of $x, y$.
But if we have any continuous function $f:\mathbb{C}_{\pi}\to\mathbb{C}$ such that $f(z)^2=z$, then we get for $z  \ne z_0$
$$\frac{f(z) - f(z_0)}{z-z_0} = \frac{f(z) - f(z_0)}{f(z)^2 - f(z_0)^2} = \frac{f(z) - f(z_0)}{(f(z) + f(z_0))(f(z) - f(z_0))} = \frac{1}{f(z) + f(z_0)}$$
which shows that
$$\lim_{z\to z_0} \frac{f(z) - f(z_0)}{z-z_0} = \frac{1}{2f(z_0)} .$$
Note that none of $f(z) + f(z_0)$ and $f(z) - f(z_0)$ can be $0$ because their product is $z - z_0$ which is $\ne 0$.
Als observe that this proof applies for any continuous function $f : U \to \mathbb C$ such that $f(z)^2 = z$ with an open $U \subset \mathbb C \setminus \{0\}$.
Update:
In a comment it is claimed that in the above argument we do not need the continuity of $f$ in $z_0$, but only that $\lim_{ z \to z_0} f(z)$ exists. It is moreover claimed that this limit may be distinct from $f(z_0)$. This is only partially true. We may in fact have $f(z_0) \ne w_0 = \lim_{ z \to z_0} f(z)$. But if that happens, we have $w_0^2 = \lim_{ z \to z_0} f(z)^2 = \lim_{ z \to z_0} z = z_0$, thus $w_0$ is a sqaure root of $z_0$ which is different from the square root $f(z_0)$. We conclude that $w_0 = - f(z_0)$. But then $\lim_{ z \to z_0} \frac{1}{f(z) + f(z_0)}$ does not exist.
Update:
A comment says that the proof of continuity of $f = u + iv$ given in the question is not correct. I must agree, in case $y_0=0$ it does not cover all possible cases. If $(x,y) \to (x_0,0)$, then $y \to 0$, but $y$ may be positive, negative or $0$. This "mixed" situation is not considered (only the limits $(x,y) \to (x_0,0)$ where all $y > 0$ or all $y < 0$). The problem arises earlier by giving a formula for $v(x,y)$ only for $y \ne 0$. But we also need $v(x,0) = 0$. The complete formula for $v(x,y)$ can therefore be written as
$$v(x,y) = \operatorname{sgn} y\sqrt{\frac{\sqrt{x^2+y^2}-x}{2}}.$$
Here $\operatorname{sgn} y = 1$ for $y > 0$, $\operatorname{sgn} y = -1$ for $y < 0$ and $\operatorname{sgn} y = 0$ for $y = 0$. But actually the value of $\operatorname{sgn} 0$ is irrelevant here because the second factor is $0$ in that case. The correct argument goes like this:

*

*$w(x,y) = \sqrt{\frac{\sqrt{x^2+y^2}-x}{2}}$ is continuous.


*$\operatorname{sgn} y$ is continuous in all $y_0 \ne 0$, thus $v(x,y) = \operatorname{sgn} y \cdot  w(x,y)$ is continuous in all $(x_0,y_0)$ with $y_0 \ne 0$.


*For $y_0 = 0$ we have $\lim_{(x,y) \to (x_0,0)}w(x,y) =w(x_0,0) =  0$. But $\operatorname{sgn} y$ is bounded, thus also $\lim_{(x,y) \to (x_0,0)}v(x,y) = 0 = v(x_0,0)$.
