Distance in polar coordinates

$s^2=(x_2-x_1)^2+(y_2-y_1)^2\\ =(r\cos\varphi_2-r\cos\varphi_1)^2+(r\sin\varphi_2-r\sin\varphi_1)^2\\ =2r^2(1-\cos\varphi_1\cos\varphi_2-\sin\varphi_1\sin\varphi_2)\\ =2r^2[1-\cos(\varphi_2-\varphi_1)]\\ =4r^2\sin^2\left(\frac{\varphi_2-\varphi_1}{2}\right)$