<s>[INST] Converting polar equations to cartesian equations. Where $$r=\sin(3\theta)$$ and $$y=r\sin(\theta),~x=r\cos(\theta),~r^2=x^2+y^2$$ I have started by saying that $$ r=\sin (2\theta) \cos (\theta) +\sin (\theta) \cos (2\theta) \\  r=2\sin (\theta) \cos ^2 (\theta) +\sin (\theta) (1-2\sin ^2 (\theta)) \\r=2\sin (\theta) \cos ^2 (\theta) +\sin (\theta)-2\sin^3(\theta) $$ simply making the substitutions $$\sin(\theta)=\frac{y}{r},~\cos(\theta)=\frac{x}{r}$$ noting also that I can square both sides of the above to be substitutions we then can write down $$r=\dfrac{2yx}{r}\cdot \dfrac{x^2}{r^2}+\dfrac{y}{r}-\dfrac{2y^3}{r^3}$$ then multiplying through by $r^3$ we obtain $$r^4=2yx^3+yr^2-2y^3$$  then replacing $r^2$ with $x^2+y^2$ we get $$(x^2+y^2)^2=2xy^2+yx^2+y^3-2y^3 \\(x^2+y^2)^2=y(3x^2-y^2)$$
However I am unsure of where I have made a mistake as the true answer is$$(x^2+y^2)^2=4x^2y-(x^2+y^2)y$$ working backwards I've so far gotten to the point of asking how I would rearrange$$r=\sin (3\theta) \Rightarrow r=4\cos ^2 (\theta) \sin (\theta) -\sin (\theta)$$ so that $$\sin(3\theta)=4\cos ^2 (\theta) \sin (\theta) -\sin (\theta)$$ which I am afraid I'll have to ask help for the next steps. Thanks.
 [/INST] $$r=\sin (3t)=Im ((\cos (t)+i\sin (t))^3) $$
$$=3\cos^2 (t)\sin (t)-\sin^3 (t) $$
$$=3\sin (t)-4\sin^3 (t) $$
$$=3y/r-4y^3/r^3$$
thus
$$r^4=3yr^2-4y^3$$
now replace $r^2$ by $x^2+y^2$.
</s>