2 Oct
2020
2 Oct
'20
6:13 a.m.
On 02/10/2020 01:17, Henry Baker wrote:
To compute the square root of a complex number z = r*(cos(t)+i*sin(t)):
Let sz = |z|+z = r*(1+cos(t)+i*sin(t)).
Then sz^2 = 2*(1+cos(t))*r^2*(cos(t)+i*sin(t)) = 2*(1+cos(t))*r*z
Thus sqrt(z) = sz/|sz| = sz/sqrt(2*r*(1+cos(t))).
Surely the "= sz/|sz|" bit is wrong: z is an arbitrary complex number but you say sqrt(z) = sz/|sz| which is always of modulus 1. So if I've done my algebra right, a square root of z is (z + |z|) / sqrt(2(|z| + Re(z)). (Which it seems like you can find about equally easily by doing the naive thing: let the square root be a+ib, write down the equations for real and imaginary part, solve them, simplify.) -- g