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

Simplify[r*Cos[θ]^2 == 
Sqrt[2]*Sin[θ + π/4] /. {r -> Sqrt[x^2 + y^2], 
z -> ArcTan[y/x]}]

enter image description here

  • 1
    $\begingroup$ why would you expect the z-> rule to do anything when there is no z in your expression? $\endgroup$
    – george2079
    Nov 1 '16 at 23:54

Perhaps this?

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

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

  • $\begingroup$ **(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 $\endgroup$ Nov 1 '16 at 23:29
  • $\begingroup$ @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. $\endgroup$
    – Michael E2
    Nov 1 '16 at 23:32
  • $\begingroup$ @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.). $\endgroup$
    – 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[2] 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][[1]], {x, -3, 3}],
  PolarPlot[Sqrt[2] 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\)]]\)"}]]

enter image description here

Note: y /. Solve[re, y][[1]] yields :-x+x^2


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.