<s>[INST] How do I get the tangent of a curve I have this curve in polar coordinates:
$$\left\{\begin{array}{c}
x=r_1\cos\theta+r_2\cos\tfrac\theta 2 \\
y=r_1\sin\theta+r_2\sin\tfrac\theta 2\end{array}
\right.$$
since this curve is some sort of a circle I know that simple derivation of the polar equations is incorrect. Can you please tell how to do this?
 [/INST] Note that $\theta$ is not the polar angle but parameter instead.
\begin{align*}
  x' &= -r_{1} \sin \theta-\frac{r_{2}}{2} \sin \frac{\theta}{2} \\
  y' &=  r_{1} \cos \theta+\frac{r_{2}}{2} \cos \frac{\theta}{2} \\
\end{align*}
Equation of tangent:
$$\frac{y-r_{1} \sin \theta-r_{2} \sin \frac{\theta}{2}}
       {x-r_{1} \cos \theta-r_{2} \cos \frac{\theta}{2}}
 =\frac{ r_{1} \cos \theta+\frac{r_{2}}{2} \cos \frac{\theta}{2}}
       {-r_{1} \sin \theta-\frac{r_{2}}{2} \sin \frac{\theta}{2}}$$
</s>