# Transform polar coordinates to rectangular

I am not satisfied, I'll be wrong? I used this

Simplify[r*Cos[θ]^2 ==
Sqrt*Sin[θ + π/4] /. {r -> Sqrt[x^2 + y^2],
z -> ArcTan[y/x]}] • why would you expect the z-> rule to do anything when there is no z in your expression? – george2079 Nov 1 '16 at 23:54

Perhaps this?

Simplify@TransformedField["Polar" -> "Cartesian",
r*Cos[θ]^2 == Sqrt*Sin[θ + Pi/4], {r, θ} -> {x, y}]


(Note Pi is spelled, like all Mathematica keywords, with an initial capital.)

• **(Note Pi is spelled, like all Mathematica keywords, with an initial capital.)**The latter do not understand, ah one more thing, what would be the reverse order of Cartesian to polar thank you very much for your attention – juan muñoz Nov 1 '16 at 23:29
• @juanmuñoz The reverse would be TransformedField["Cartesian" -> "Polar",...]. You can find other transformations in the documentation for TransformedField, which explains how the function works. – Michael E2 Nov 1 '16 at 23:32
• @juanmuñoz You wrote pi in your question. It should be Pi, with an initial capital P. Feyre has changed it to π for some unknown reason. (I would have thought it bad form to introduce fixes in someone else's question.) -- All Mathematica function names and other keywords use capital letters (Sin[], Cos[], E, etc.). – Michael E2 Nov 2 '16 at 2:13

Just a rule based way (I have voted for MichaelE2's answer which uses a built-in function):

eq = r Cos[t]^2 == Sqrt Sin[t + Pi/4];
den = Sqrt[x^2 + y^2];
re = Simplify[
TrigExpand[eq] /. {r -> den, Cos[t] -> x/den, Sin[t] -> y/den}];
Legended[Show[Plot[y /. Solve[re, y][], {x, -3, 3}],
PolarPlot[Sqrt Sin[t + Pi/4]/Cos[t]^2, {t, -Pi/3, Pi/4},
PlotStyle -> Red], Frame -> True],
LineLegend[{Blue, Red}, {"\!$$\*SuperscriptBox[\(x$$, $$2$$]\)-x",
"r= \!$$\*SqrtBox[\(2$$]\)\!$$\*FractionBox[\(\(\\\$$$$Sin[t + \ π/4]$$\), SuperscriptBox[$$Cos[t]$$, $$2$$]]\)"}]] Note: y /. Solve[re, y][] yields :-x+x^2