start with:

Get common denominator:

Simplify:

Use the equation that says to see that and substitute that into your equation:

Combine the fractions:

Multiply out the squared term:

Add like terms:

Factor out a 2:

1+cos(a) is in the numerator and the denominator so they cancel eachother out: