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.

Expand using the FOIL Method.

Apply the distributive property.

Apply the distributive property.

Apply the distributive property.

Simplify and combine like terms.

Simplify each term.

Multiply by .

Multiply by .

Multiply by .

Multiply .

Raise to the power of .

Raise to the power of .

Use the power rule to combine exponents.

Add and .

Add and .

Multiply .

Raise to the power of .

Raise to the power of .

Use the power rule to combine exponents.

Add and .

Rewrite in a factored form.

Apply pythagorean identity.

Add and .

Factor out of .

Factor out of .

Factor out of .

Cancel the common factor.

Rewrite the expression.

Separate fractions.

Convert from to .

Divide by .

Simplify (1+cos(x))/(sin(x))+(sin(x))/(1+cos(x))