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.

$$\begin{align}r&=\sin(3\theta)\\r&=\sin\theta\cos2\theta+\cos\theta\sin2\theta\\r^2&=r\sin\theta\cos2\theta+r\cos\theta\sin2\theta\\x^2+y^2&=y\cos2\theta+x\sin2\theta\\r^2(x^2+y^2)&=yr^2(1-2\sin^2\theta)+2xr^2\sin\theta\cos\theta\\(x^2+y^2)^2&=y(x^2+y^2)-2y^3+2x^2y\\(x^2+y^2)^2&=3x^2y-y^3\end{align}$$
I don't see a difference so far.
$$\begin{align}r&=\sin(3\theta)\\r&=3\sin\theta-4\sin^3\theta\\r^4&=3r^3\sin\theta-4r^3\sin^3\theta\\(x^2+y^2)^2&=3y(x^2+y^2)-4y^3\\(x^2+y^2)^2&=3x^2y-y^3\end{align}$$
No difference here either. Your answer looks good.
