# Why does ParametricPlot does not reach the values I expect?

I have these expressions:

vh[m_, γ_] :=
Sqrt[((γ^2 - 4 EllipticK[m]^2) (γ^2 -
4 m EllipticK[m]^2))/(-γ^2 EllipticK[m]^2 +
4 (1 + m) EllipticK[m]^4)](*Sqrt[ε0/
n]*)(EllipticK[m] -
EllipticPi[1 + m - γ^2/(4 EllipticK[m]^2), m])

hR[m_, γ_] := 2*Sinh[vh[m, γ]/2]

Areac[m_, γ_] := (
4 EllipticK[m] (-EllipticE[m] + EllipticK[m]))/ Sqrt[γ^2 -
4 (1 + m) EllipticK[m]^2]

FAc[γ_] := α /.
FindRoot[-4 (1 + Tan[α]) + γ^2/
EllipticK[Tan[α]]^2 == 0, {α, -.5},
PrecisionGoal -> 50, WorkingPrecision -> 30] // Quiet //
Chop(*divergence of the area*)

FBc[γ_] := α /.
FindRoot[(2/γ EllipticK[Tan[α]] ==
1), {α, -1.5}, PrecisionGoal -> 50,
WorkingPrecision -> 30] // Quiet // Chop(*x\[Equal]1*)


When I evaluate

γ = 0.172969;
{hR[Tan[FBc[γ]], γ], Areac[Tan[FBc[γ]], γ]}


I get

{0., -1.99877}


so I expect that value in the plot. But when I make a plot with:

ParametricPlot[{hR[Tan[α], γ], Areac[Tan[α], γ]},
{α, FBc[γ], FAc[γ]- 0.001 (* to avoid -∞ *)},
PlotRange -> {{0, 1.2}, {-10, -1}},
AxesOrigin -> {0.0, -5},
AspectRatio -> 0.7,
PlotStyle -> Red]


What happened? Why does ParametricPlot does not show the point I expect?

• Ah0 is not defined in your code. – MarcoB Jan 12 at 21:53
• @MarcoB Sorry, changed PlotRange, same problem – Patrick El Pollo Jan 12 at 21:56

The point you want corresponds to the very first lowest value of $$\alpha$$; playing around with the values of your expression shows that very small changes in the value of $$\alpha$$ in this region translate to huge changes in the abscissa of the parametric points you want plotted. In other words, it is extremely easy for the adaptive internal plotting routines ParametricPlot to "miss" that point, because it is so far from the others.

You could increase the number of PlotPoints, but even ridiculously high values (>1000) get you closer but not all the way there. I think you might be better off constructing your own list of points and plotting it:

data = Table[
{hR[Tan[α], γ], Areac[Tan[α], γ]},
{α, FBc[γ], FAc[γ], 1/1000}
];

ListLinePlot[data]


As an aside, you are using high precision for the rest of the calculations, so do not use 0.001 in your range specification, as this will degrade the precision. Whenever you can, specify any numbers in arbitrary precision (i.e. 1/1000) instead.

To expand a little on MarcoB's answer, if you want the plot to extend to the point {0., -1.99877}, you must tweak the plot options appropriately. Like so:

With[{γ = 0.172969},
ParametricPlot[{hR[Tan[α], γ], Areac[Tan[α], γ]}, {α, FBc[γ], FAc[γ] - 0.001},
PlotRange -> {{0, 1.2}, {-10, -1}},
PlotRangePadding -> {{.1, Automatic}, Automatic},
PlotPoints -> 200, (* this is what extends the curve *)
AxesOrigin -> {-.05, -5},
AspectRatio -> 0.7,
PlotStyle -> Red,
Epilog ->
{AbsolutePointSize[5], Point[{hR[Tan[FBc[γ]], γ], Areac[Tan[FBc[γ]], γ]}]}]]


Then you will get a plot that looks like this: