Yes, Gareth, you are correct! Here's the correct derivation: To compute sqrt of z, z=r*(cos(2t)+i*sin(2t)): I claim that r+z = |z|+z is a real multiple of sqrt(z), i.e, |z|+z = r+z = m*sqrt(z), where m = 2*cos(t)*sqrt(r). Note that t here is the angle of the sqrt(z), not the angle of z itself, which is 2t. So m = sqrt(2 r (1+cos(2t)) = sqrt(2 (r + r*cos(2t))) = sqrt(2 Re(|z|+z)) Thus, as you correctly pointed out: sqrt(z) = (|z|+z) / sqrt(2*Re(|z|+z)) The reason for expressing the result like this is to better show the relationship with the quaternion case. At 05:13 AM 10/2/2020, Gareth McCaughan wrote:
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