Re: 2002/III/Q8
Dadeyemi gave an excellent solution and SingaporeCantab had a point on the periodicity. Notice that the periodicity of complex numbers is 2n(pi) because of the specific signs for the real part and the imaginary part. Need extra care in using the tan function where the periodicity is n(pi), e.g cis(pi/4) is not equal to cis(pi/4 + pi) though tan(pi/4) = tan(pi/4+pi). I think the patch is not entirely correct.
My patch to the "patch": I think it is sufficient to say that (theta1 + theta2 - pi)/2 has a range (-3pi/2, pi/2). When (theta1 + theta2 - pi)/2 is in the range (-3pi/2, -pi], we need to add 2pi (i.e. n=1) to bring it back to the domain of (-pi,pi]. Otherwise n=0.