Hello, rwc123!
I don't see any difficulty . . . am I missing something?
Using the Law of Cosines
. . prove that the distance $\displaystyle d$ between 2 polar points $\displaystyle A(r_1,\:\theta_1)\text{ and }B(r_2,\:\theta_2)$
. . is given by:. . $\displaystyle d^2\;=\;r_1^2+ r_2^2 -2(r_1)(r_2)\cos(\theta_2-\theta_1)$ Code:
B
*
* *
* * d
* *
* *
r2 * * A
* *
* θ2 - θ1 *
* * r1
* *
* *
O *
We have: .$\displaystyle \begin{array}{ccccccc}
|\overrightarrow{OA}| &=& r_1 \\ \\[-4mm]
|\overrightarrow{OB}| &=& r_2 \\ \\[-4mm]
\angle O &=& \theta_2-\theta_1\end{array}$
Law of Cosines:
. . . $\displaystyle d^2\;=\;|AB|^2 \;=\;|OA|^2 + |OB|^2 - 2(|OA|)(|OB|)\cos(\angle O)$
Therefore: .$\displaystyle d^2 \;=\;r_1^2 + r_2^2 - 2(r_1)(r_2)\cos(\theta_2-\theta_1) $