<s>[INST] Conver the Equation $r=a \sin x+b\cos x$ into Cartesian Form Hello :)) Wanted to convert the equation $r=a \sin x+b\cos x$, where $a, b \in \mathbb{R}$. Knowing that $x = r \cos x$ and $y= = r \sin x$, I can make $x = (a \sin x + b \cos x) \cos x$. But this is kinda a dead end because I can't simplify this further. Also, knowing that $r = \sqrt{x^2 + y ^2}$, I can make $\sqrt{x^2 + y^2}= a \sin x + b \cos x$. This also seems like a dead end...so, any suggestions?
 [/INST] If you need to solve fpr $x$ you can easily divide both side by $\sqrt{a^2+b^2}$. Then, we have:
$$\frac{r}{\sqrt{a^2+b^2}}=\frac{a}{\sqrt{a^2+b^2}}\sin(x)+\frac{b}{\sqrt{a^2+b^2}}\cos(x)$$
Let:
$$\theta=\cos^{-1}\left(\frac{a}{\sqrt{a^2+b^2}}\right)$$
We have:
$$\sin(x+\theta)=\frac{r}{\sqrt{a^2+b^2}}$$
Can you finish it now?
</s>