# How to use Polarplot instead of Contourplot?

ContourPlot[Power[x,1.5]-Power[1.65,0.5]*x+y^2==0,{x,-5,5},{y,-5,5},PlotPoints->100,MaxRecursion->1]


It's easy to get plot as below: Then, I use Polarplot to plot the same thing,

p=Power[x,1.5]+y^2==Power[1.65,0.5]*x/.{x->r Cos[t],y->r Sin[t]}
foo=r/.First@Solve[p,r,Reals];
PolarPlot[foo,{t,-Pi,4Pi}]


There's no plot when use Polarplot.
How to use PolarPlot(or ParametricPlot) for this plot?

• The "First" solution is simply useless. The second solution is more likely what you wanted. – 梁國淦 Mar 31 '18 at 12:59
• Or add the constraint r > 0 to Solve and there will only be only one solution. – Bob Hanlon Mar 31 '18 at 13:55
• If you take the second solution in your code, it is ok. p = Power[x, 1.5] + y^2 == Power[1.65, 0.5]*x /. {x -> r Cos[t], y -> r Sin[t]}; foo = r /. Solve[p, r, Reals][]; PolarPlot[foo, {t, -Pi, 4 Pi}]  – Akku14 Mar 31 '18 at 14:07
• @Akku14,why do you add [] after  Solve[p, r, Reals]? – kittygirl Mar 31 '18 at 14:21
• [] is second part of expression. See in Help Part function. – Mariusz Iwaniuk Mar 31 '18 at 14:28

trans = TransformedField["Cartesian" -> "Polar",
Power[x, 1.5] - Power[1.65, 0.5]*x + y^2, {x, y} -> {r, \[Theta]}]

(* -1.284523258 r Cos[\[Theta]] + (r Cos[\[Theta]])^1.5 + r^2 Sin[\[Theta]]^2*)

sol = r /. Solve[trans == 0, r][](*Second solution*)

(* 4.70073691*10^-16 Csc[\[Theta]]^4 (-1. Cos[\[Theta]] \
(-1.063663016*10^15 Cos[\[Theta]]^2 -
2.732599766*10^15 Sin[\[Theta]]^2) -
1. Sqrt[0. + 1.131379012*10^30 Cos[\[Theta]]^6 +
5.813130617*10^30 Cos[\[Theta]]^4 Sin[\[Theta]]^2])*)

PolarPlot[sol, {\[Theta], 10^-9, 4 Pi}, PlotRange -> {{0, 2}, {-1, 1}}]

• In PolarPlot[sol, {\[Theta], 10^-9, 4 Pi},why do you set 10^-9?why not 0? – kittygirl Mar 31 '18 at 14:02
• I don't understand Second solution in Solve[trans == 0, r][].What's the problem of my script? – kittygirl Mar 31 '18 at 14:03
• @kittygirl. if \[Theta] = 0 then is Indeterminate expression.Only for Second solution MMA give a nice plot. – Mariusz Iwaniuk Mar 31 '18 at 14:30