Apply the difference of angles identity.

Factor out of .

Factor out of .

Factor out of .

Factor out of .

Rewrite as .

Apply the reference angle by finding the angle with equivalent trig values in the first quadrant. Make the expression negative because tangent is negative in the second quadrant.

The exact value of is .

Multiply by .

Multiply by .

Add and .

Apply the reference angle by finding the angle with equivalent trig values in the first quadrant. Make the expression negative because tangent is negative in the second quadrant.

The exact value of is .

Multiply by .

Multiply by .

Add and .

Divide by .

Expand tan(pi-x)