
which follows from the difference-of-squares identity,
, with
and
.

which is due to the Pythagorean identity.

by the distributive property;
.

by definition of cotangent,
.

due to the Pythagorean identity.

by factorization of the numerator as a difference of squares.

by cancellation of
(provided
).