I have the following Mathematica code:
f[r_] :=
1 + r^2/(
2 α) (1 - Sqrt[1 + 4 α ((2 M)/r^3 - q^2/r^4 - 1/l^2)])
M = rh/2 + q^2/(2 rh) + rh^3/(2 l^2) + α/(2 rh);
T[rh_] := (rh^2 - q^2 - α + 3 rh^4 l^-2)/(
4 π rh (rh^2 + 2 α))
V[r_] := f[r] (En^2/f[r] + L^2/r^2 + 1)
q = 0.02; α = 0.0065; l = 1; En = 0; L = 20;
rhmin = SolveValues[T[rh] == 0, rh, Reals][[2]]
Plot3D[V[r], {rh, rhmin, 1}, {r, rh, 5}, PlotRange -> All,
PlotPoints -> 100]
which gives me the following 3DPlot:
Now I find the stationary points of $V(r)$, which include both the local maxima and minima:
rsolmax[rh_] = SolveValues[{V'[r] == 0, V''[r] < 0}, r][[{3, 4, 5}]];
rsolmin[rh_] = SolveValues[{V'[r] == 0, V''[r] > 0}, r][[{6, 7}]];
and get this 2D plot:
Plot[Evaluate[{rsolmax[rh], rsolmin[rh]}], {rh, rhmin, 0.8776235}]
Now I wish to project this plot of stationary points just below the 3DPlot, which should look something like this:
How to get the desired result? Any help in this regard would be truly beneficial!






PlotPointsin the Contour Plot. Just one doubt, how can I choose my colour function to distinguish between the local maxima and the minima? – codebpr Feb 06 '24 at 14:58