By inspection, it is the imaginary part of a function of $z=r e^{i \phi}$. In polar coordnates we identify the radicand as the square of the half angle sine $$i \sqrt{\sqrt{x^2+y^2}-x}=i \sqrt{r-r \cos (\phi )}=i \sqrt{2 r \sin ^2\left(\frac{\phi }{2}\right)}=i \sqrt{2 r} \sin \left(\frac{\phi }{2}\right)=i \Im\left(\sqrt{2 r} e^{\frac{i \phi }{2}}\right)=i \Im\left(\sqrt{2 r e^{i \phi }}=i \Im\left(\sqrt{2 z}\right)\right)$$ Mathematica is not very good in irrational verifying. I Sqrt[-x + Sqrt[x^2 + y^2]] == I Sqrt[r - r Cos[\[Phi]]] == I Sqrt[2 r (Sin[\[Phi]/2]^2) ] == Sqrt[2 r] I Sin[\[Phi]/2] == I Im[Sqrt[2 r] E^(I \[Phi]/2)] == I Im [Sqrt[2 r E^(I \[Phi])] == I Im[Sqrt[2 z]] The Cauchy-Riemann equations can be integrated, but again without running into irrationals, only if one knows the result. It's therefore, I assume, that the result is given in advance- ((-Integrate[D[#, x], y] + I # )^2 &)[Sqrt[ x - Sqrt[x^2 + y^2]]] // Simplify -2 (x + I y)