On @emilios's point, the quickest way to solve this is to use the fact that cos(x) and sin(x) are related to each other by shifting cos(x) to the right by 90 deg, i.e. cos(90-theta) = cos(theta-90) = sin(theta). And for the denominator, sin(90-theta) = cos(theta).
But this is stuff that you...