Using and collecting real and imaginary terms gives the complex cosine identity . Thus
The sign follows from the factors and in the two complex exponentials.
Use the exponential definitions of complex sine function and complex cosine. Multiplying the equation by gives , hence . Since exponentials never vanish, this is equivalent to . All branches of the complex logarithm give
The derivation does not divide by , so it introduces no lost zero-denominator cases.