<s>[INST] Splitting the square root of complex function into real and imaginary parts I have these functions below: $$\sqrt{(x+iy)^2-a^2}$$
$$\frac{b(x+iy)}{\sqrt{(x+iy)^2-a^2}}$$
How do I split these to get the real and imaginary parts of these functions?
If anyone could help me out, that really would be helpful!!!!
It will help me with the method of manufactured solutions for my fracture problem that has the Westergaard solution (as the analytical solution)!!!
Thank you very much,
Mousumi
 [/INST] Basically we need a complex number $A+ib$ such that its square equals $(x+iy)^2-a^2=(x^2-a^2-y^2)+i(2xy)$.
We have: $$(A+ib)^2=(A^2-b^2)+i(2Ab)=(x^2-a^2-y^2)+i(2xy)$$ giving us: $A^2-b^2=x^2-a^2-y^2$ and $Ab=xy$.
Now, we will get, $$A^2+b^2 = \sqrt{(A^2+b^2)^2} = \sqrt{(A^2-b^2)^2+4A^2b^2}=\sqrt{(x^2-a^2-y^2)^2+4x^2y^2}$$
Thus, $A^2=\frac{1}{2}[(x^2-a^2-y^2)+\sqrt{(x^2-a^2-y^2)^2+4x^2y^2}]$ and $b^2=\frac{1}{2}[\sqrt{(x^2-a^2-y^2)^2+4x^2y^2}-(x^2-a^2-y^2)]$.
Can you take it from here?
</s>