I have an equation for effective potential (Veff). For SS=0, Mathematica gives output, if I take derivate of Veff with respect to r, then I take SS=0, Mathematica gives infinity (indeterminate form). Why I'm getting answer infinity? I'm posting here code, can anyone please help me?
VeffSpinP[
r_, \[Theta]_] := (((-2 + r) (-LL^2 (-3 + r) + r^3 - SS^2))/(
r^3 - (-2 + r) SS^2) + (
LL^2 (-2 +
r) (r^3 (-3 + 2 r) + (-6 +
r) SS^2) Sin[\[Theta]]^2)/(r^3 - (-2 + r) SS^2)^2 + (
LL (r^3 (-5 + 2 r) - (-2 + r) SS^2) Sin[\[Theta]] Sqrt[((-2 +
r) ((LL - SS) (LL + SS) (-r^3 + (-2 + r) SS^2) +
LL^2 (r^3 + 2 SS^2) Sin[\[Theta]]^2))/(r^3 - (-2 +
r) SS^2)^2])/(r^4 - (-2 + r) r SS^2))/(
Sqrt[-2 + r] Sqrt[r] Sqrt[
1 + ((LL r^2 Sin[\[Theta]])/(r^3 - (-2 + r) SS^2) +
Sqrt[((-2 + r) ((LL - SS) (LL + SS) (-r^3 + (-2 + r) SS^2) +
LL^2 (r^3 + 2 SS^2) Sin[\[Theta]]^2))/(r^3 - (-2 +
r) SS^2)^2])^2]);
DrVeffSpinP[r_,
SS_] := -((((LL r^2)/(r^3 - (-2 + r) SS^2) +
Sqrt[((-2 + r) SS^2 (LL^2 r + r^3 + 2 SS^2 -
r SS^2))/(r^3 + 2 SS^2 - r SS^2)^2]) ((
LL^2 (-2 +
r) (r^3 (-3 + 2 r) + (-6 + r) SS^2))/(r^3 - (-2 +
r) SS^2)^2 + ((-2 + r) (-LL^2 (-3 + r) + r^3 - SS^2))/(
r^3 - (-2 + r) SS^2) + (
LL (r^3 (-5 + 2 r) - (-2 + r) SS^2) Sqrt[((-2 +
r) SS^2 (LL^2 r + r^3 + 2 SS^2 - r SS^2))/(r^3 +
2 SS^2 - r SS^2)^2])/(
r^4 - (-2 + r) r SS^2)) (-(-3 + r) r^2 SS^2 (r^3 + 2 SS^2 -
r SS^2) + LL^2 SS^2 (5 r^3 - 2 r^4 - 2 SS^2 + r SS^2) +
LL r Sqrt[((-2 + r) SS^2 (LL^2 r + r^3 + 2 SS^2 -
r SS^2))/(r^3 + 2 SS^2 - r SS^2)^2] (-r^6 +
2 r^3 SS^2 + 8 SS^4 - 6 r SS^4 + r^2 SS^4)))/(Sqrt[-2 +
r] Sqrt[r] (r^3 + 2 SS^2 -
r SS^2)^3 Sqrt[((-2 + r) SS^2 (LL^2 r + r^3 + 2 SS^2 -
r SS^2))/(r^3 + 2 SS^2 -
r SS^2)^2] (1 + ((LL r^2)/(r^3 - (-2 + r) SS^2) +
Sqrt[((-2 + r) SS^2 (LL^2 r + r^3 + 2 SS^2 -
r SS^2))/(r^3 + 2 SS^2 - r SS^2)^2])^2)^(3/2))) - ((
LL^2 (-2 +
r) (r^3 (-3 + 2 r) + (-6 + r) SS^2))/(r^3 - (-2 +
r) SS^2)^2 + ((-2 + r) (-LL^2 (-3 + r) + r^3 - SS^2))/(
r^3 - (-2 + r) SS^2) + (
LL (r^3 (-5 + 2 r) - (-2 + r) SS^2) Sqrt[((-2 + r) SS^2 (LL^2 r +
r^3 + 2 SS^2 - r SS^2))/(r^3 + 2 SS^2 - r SS^2)^2])/(
r^4 - (-2 + r) r SS^2))/(
2 Sqrt[-2 + r] r^(3/2) Sqrt[
1 + ((LL r^2)/(r^3 - (-2 + r) SS^2) +
Sqrt[((-2 + r) SS^2 (LL^2 r + r^3 + 2 SS^2 - r SS^2))/(r^3 +
2 SS^2 - r SS^2)^2])^2]) - ((
LL^2 (-2 +
r) (r^3 (-3 + 2 r) + (-6 + r) SS^2))/(r^3 - (-2 +
r) SS^2)^2 + ((-2 + r) (-LL^2 (-3 + r) + r^3 - SS^2))/(
r^3 - (-2 + r) SS^2) + (
LL (r^3 (-5 + 2 r) - (-2 + r) SS^2) Sqrt[((-2 + r) SS^2 (LL^2 r +
r^3 + 2 SS^2 - r SS^2))/(r^3 + 2 SS^2 - r SS^2)^2])/(
r^4 - (-2 + r) r SS^2))/(
2 (-2 + r)^(3/2) Sqrt[r] Sqrt[
1 + ((LL r^2)/(r^3 - (-2 + r) SS^2) +
Sqrt[((-2 + r) SS^2 (LL^2 r + r^3 + 2 SS^2 - r SS^2))/(r^3 +
2 SS^2 - r SS^2)^2])^2]) + (-((
2 LL^2 (-2 + r) (3 r^2 -
SS^2) (r^3 (-3 + 2 r) + (-6 + r) SS^2))/(r^3 - (-2 +
r) SS^2)^3) - ((-2 + r) (3 r^2 - SS^2) (-LL^2 (-3 + r) +
r^3 - SS^2))/(r^3 - (-2 + r) SS^2)^2 + (
LL^2 (r^3 (-3 + 2 r) + (-6 + r) SS^2))/(r^3 - (-2 +
r) SS^2)^2 + ((-2 + r) (-LL^2 + 3 r^2))/(
r^3 - (-2 + r) SS^2) + (-LL^2 (-3 + r) + r^3 - SS^2)/(
r^3 - (-2 + r) SS^2) + (
LL^2 (-2 + r) (-9 r^2 + 8 r^3 + SS^2))/(r^3 + 2 SS^2 -
r SS^2)^2 - (
2 LL (r^3 (-5 + 2 r) - (-2 + r) SS^2) (2 r^3 + SS^2 -
r SS^2) Sqrt[((-2 + r) SS^2 (LL^2 r + r^3 + 2 SS^2 -
r SS^2))/(r^3 + 2 SS^2 -
r SS^2)^2])/(r^4 - (-2 + r) r SS^2)^2 + (
LL (-15 r^2 + 8 r^3 -
SS^2) Sqrt[((-2 + r) SS^2 (LL^2 r + r^3 + 2 SS^2 -
r SS^2))/(r^3 + 2 SS^2 - r SS^2)^2])/(
r^4 - (-2 + r) r SS^2) - (
LL SS^2 (-5 r^3 + 2 r^4 + 2 SS^2 -
r SS^2) ((-3 + r) r^2 (r^3 + 2 SS^2 - r SS^2) +
LL^2 (-5 r^3 + 2 r^4 + 2 SS^2 - r SS^2)))/(
r (r^3 + 2 SS^2 -
r SS^2)^4 Sqrt[((-2 + r) SS^2 (LL^2 r + r^3 + 2 SS^2 -
r SS^2))/(r^3 + 2 SS^2 - r SS^2)^2]))/(Sqrt[-2 + r] Sqrt[r]
Sqrt[1 + ((LL r^2)/(r^3 - (-2 + r) SS^2) +
Sqrt[((-2 + r) SS^2 (LL^2 r + r^3 + 2 SS^2 - r SS^2))/(r^3 +
2 SS^2 - r SS^2)^2])^2]);
Here, DrVeffSpinP is the first derivative of Veff with respect to r at \theta = pi/2.
Actually, I have obtained the equation for Veff after the simplification of
f=1-2/r; Mu=1; M=1; XCP = ArcSinh[(r LL \[Mu] Sin[\[Theta]])/(r^2 \[Mu]^2 - f SS^2) +
Sqrt[(r^2 LL^2 \[Mu]^2 Sin[\[Theta]]^2)/(r^2 \[Mu]^2 -
f SS^2)^2 - (
f (LL^2 - SS^2) + (2 M )/r LL^2 Sin[\[Theta]]^2)/(r^2 \[Mu]^2 -
f SS^2)]];
VeffP = Sqrt[f] \[Mu] Cosh[XCP] + (M \[Mu] Tanh[XCP])/(
Sqrt[f] r)*((LL Sin[\[Theta]] )/(\[Mu] r) - Sinh[XCP]);
FullSimplify[VeffP]
Limit[expr, SS -> 0]
instead of directly replacing SS with 0? $\endgroup$Piecewise[{(* limit expression *), SS == 0}, (* normal expression *)]
for further computations, where you should replace(* limit expression *)
and(* normal expression *)
appropriately. $\endgroup$D[VeffP, r] /. SS -> 0
does not returnindeterminate
$\endgroup$