I have the following Mathematica code:
$Assumptions = {r \[Element] Reals, r >= 0, rh \[Element] Reals,
rh > 0, g \[Element] Reals, g > 0, l \[Element] Reals, l > 0};
M[rh_, g_] := (1 + rh^2/l^2) (rh^2 + g^2)^(3/2)/(2 rh^2)
f[r_, rh_, g_] := 1 - (2 M[rh, g] r^2)/(g^2 + r^2)^(3/2) + r^2/l^2
T[rh_, g_] := D[f[r, rh, g], r]/(4 \[Pi]) /. r -> rh
Veff[r_] := f[r, rh, g]*(L^2/r^2)
r0 = Solve[Veff'[r] == 0, r, Reals][[2]]
\[Lambda][rh_,
g_] = (Sqrt[-((r^2 f[r, rh, g])/L^2) Veff''[r]]) /. r0 //
Simplify;
l = 1;
(tp1 = {#[[1]], \[Lambda][rh1 = (rh /. #[[2]]), 0.02]} &@
Maximize[{T[rh, 0.02], 0.01 < rh < 1}, rh] // FullSimplify) // N;
(tp2 = {#[[1]], \[Lambda][rh2 = (rh /. #[[2]]), 0.02]} &@
Minimize[{T[rh, 0.02], rh1 < rh < 1}, rh] // FullSimplify) // N
pplt = ParametricPlot[{T[rh, 0.02], \[Lambda][rh, 0.02]}, {rh, 0.01,
8}, PlotRange -> {{0, 1}, {0, 10}}, AspectRatio -> 0.5,
PlotPoints -> 50, ImageSize -> 800,
PlotTheme -> {"Scientific", "BoldColor"},
FrameLabel -> {"Temperature \[Rule]", "Lyapunov Exponent \[Rule]"},
LabelStyle -> {Bold, Black, 22}, PlotStyle -> Thickness[0.004],
ColorFunction ->
Function[{T, \[Lambda], rh},
If[rh <= rh1, Blue, If[rh <= rh2, Red, Green]]],
ColorFunctionScaling -> False,
Prolog -> {{Gray, Dashing[0.008], Line[{tp1, {tp1[[1]], 0}}],
Line[{tp2, {tp2[[1]], 0}}]}, {Darker[Black],
Line[{{((tp1 + tp2)/2)[[1]], 0.5}, {((tp1 + tp2)/2)[[1]],
9}}]}, {Gray, Thick, Dashing[0.001], Circle[tp1, {0.01, .2}],
Circle[tp2, {0.01, .2}]}}];
P3 = Legended[pplt,
Placed[SwatchLegend[{Blue, Red, Green}, {"Small BH",
"Intermediate BH", "Large BH"}, LabelStyle -> {Bold, Black, 20},
LegendMarkers -> "SphereBubble", LegendMarkerSize -> 20,
LegendFunction -> (Framed[#, RoundingRadius -> 10,
FrameStyle -> None, Background -> GrayLevel[0.95]] &),
LegendLabel ->
Placed["Black Holes", Left,
Rotate[Style[#, 16], 90 Degree] &]], {0.2, .6}]]
which gives me the following result:
How can I find the area under Region 1 and Region 2 using Mesh functions ? I also wish to find the position of the line (Basically the value of T
) for which the Region 1 and Region 2 have equal areas. What approach should I use for that, without succumbing to trial-and-error methods?