Optics & Law of Cosines

I'm supposed to use law of cosines on $S_1S_2P$ in the following diagram that relates to a lens:

triangle diagram http://puu.sh/5zDtv.jpg

To arrive at the following equation:

$$\frac{r_2}{r_1} = [1 - 2(\frac{a}{r_1})sin(\theta) + (\frac{a}{r_1})^2]^\frac{1}{2}$$

I decided to work backwards from this equation, and got to:

$$r_2^2 = r_1^2 + a^2 - 2ar_1cos(\theta)$$

But I'm not sure how to proceed, or if I'm even on the right track, as I have no idea how to turn the sin into a cos.

Can anyone help point me in the right direction?

Thanks.

• Perhaps you should start with the law itself?? – Kyle Kanos Dec 2 '13 at 16:56
• I think this might be confusion regarding $\theta$ or $\theta_m$. I don't see $\theta$ in the diagram. Are you sure the formula is for a 90 degree $\theta$ and not for $\theta_m$. – Luke Burgess Dec 2 '13 at 16:56
• $\theta$ is assumed to be $\theta_m$ here, it was an ambiguity in the question. Also, ignore what I said about 90 degrees, I just corrected it - the 90 degree angle isn't part of the actual $S_1S_2P$ triangle. – Heisenberg Dec 2 '13 at 16:59
• Scratch that last comment, $\theta$ and $\theta_m$ are different. – Heisenberg Dec 2 '13 at 17:06
• Just to note, editing your question to remove the content is inappropriate on this site. We consider it vandalism. – David Z Dec 2 '13 at 20:44

Applying the law of cosines to the triangle $\triangle S_1S_2P$ will yield $$r_2^2=r_1^2+a^2-2ar_1\cos(\angle S_2S_1B).$$ The angle that appears is complementary to $\theta_m$, so you can either use $\angle S_2S_1B=\frac\pi2-\theta_m$ and trigonometric identities, or simply see that $$\cos(\angle S_2S_1B)=\frac{S_1B}{S_2B}=\sin(\theta).$$