Rewrite in terms of sines and cosines.

To write as a fraction with a common denominator, multiply by .

To write as a fraction with a common denominator, multiply by .

Combine.

Combine.

Reorder the factors of .

Combine the numerators over the common denominator.

Multiply .

Raise to the power of .

Raise to the power of .

Use the power rule to combine exponents.

Add and .

Apply the distributive property.

Multiply by .

Multiply .

Multiply by .

Multiply by .

Raise to the power of .

Raise to the power of .

Use the power rule to combine exponents.

Add and .

Move .

Apply pythagorean identity.

Cancel the common factor.

Rewrite the expression.

Convert from to .

Simplify (cos(theta))/(1-sin(theta))-tan(theta)