# How to remove complex infinity

I have an equation for the effective potential for a neutral particle (non-spinning), i.e.

VeffNonSPIN[r_, θ_] := (1 - 2/r)*(1 + LL^2/(r^2 Sin[θ]^2));


If I take double derivative with respect to θ, plug in a value, and simplify

Simplify[1/(r (r - 2))*D[D[VeffNonSPIN[r, θ], θ], θ] /. θ -> Pi/2]


I found the output

(2 LL^2)/r^4


This is OK.

Now, I have an equation for a spinning particle, which is a generalization of the above mentioned case, i.e.

VeffSpinP[r_, θ_] := ((((-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[θ]^2)/(r^3 - (-2 + r) SS^2)^2 + (
LL (r^3 (-5 + 2 r) - (-2 + r) SS^2) Sin[θ] Sqrt[((-2 +
r) ((LL - SS) (LL + SS) (-r^3 + (-2 + r) SS^2) +
LL^2 (r^3 + 2 SS^2) Sin[θ]^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[θ])/(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[θ]^2))/(r^3 - (-2 +
r) SS^2)^2])^2]))^2;


For

AA = Simplify[1/(r (r - 2))*D[D[VeffSpinP[r, θ], θ], θ] /. θ -> Pi/2]


After simplification, in the limiting case (SS->0) my results should be for the same as for the neutral (non-spinning case) above mentioned case. But I'm not able to find the correct results; instead I'm getting infinity.

I have tried using

Limit[AA, ss -> 0]


I got the following output

DirectedInfinity[-((Sign[LL]^3 Sign[-3 + r] Sign[-2 + r]^2)/(Sign[r]^4 Sqrt[Sign[(-2 + r) (LL^2 + r^2)]/Sign[r]^5]))]/((-2 +  r)^2 r^2)


Here I want to remove DirectedInfinity and Sign. Can anyone help me please?

I also tried using

 SS=0; Simplify[AA]


but again found indeterminate form (infinity).

• Have you double-checked your spinning model equations? There is nothing obviously wrong with your MMA code that I can see. As a note, the double derivative can be written as D[VeffNonSPIN[r, θ], {θ, 2}] which is more compact. – MarcoB Jan 3 at 20:10
• Yes, I have checked, I'm getting infinity answer for Limit[AA, ss -> 0], instead answer should be (2 LL^2)/r^4 as I mentioned in the question. Actually after calculating double derivatives I want to take limit for SS->0 – MMS Jan 4 at 5:14
• For Limit[A, SS -> 0], I'm getting this answer DirectedInfinity[-((Sign[LL]^3 Sign[-3 + r] Sign[-2 + r]^2)/(Sign[r]^4 Sqrt[Sign[(-2 + r) (LL^2 + r^2)]/Sign[r]^5]))]/((-2 + r)^2 r^2) , If I use the command Simplify[Limit[A, SS -> 0], r > 3 && LL > 0] then I have - infinity. but my answer should be (2 LL^2)/r^4 – MMS Jan 4 at 5:29
• In the general case $\lim_{x\to a} f(x) \neq f(a)$ (see textbooks on calculus). – user64494 Jan 4 at 10:00
• I’m voting to close this question because the issue seems to be with the underlying math, rather than with the MMA code. – MarcoB Jan 4 at 22:04

If you try

Normal[Series[
D[VeffSpinP[r, \[Theta]] /. SS -> 0, {\[Theta], 2}] /. \[Theta] ->
Pi/2 - \[Epsilon], {\[Epsilon], 0, 0}]]


the result is an expression without spin. If your spinning model is correct this should equal the non spinning result. Does it?

Edit:

Well I looked at the paper and the correct Potential is:

VeffSpinP[r_, \[Theta]_] := (((LL*Sin[\[Theta]])/
r - (LL*r*Sin[\[Theta]])/(r^2 - (1 - 2/r)*SS^2) -
Sqrt[(LL^2*r^2*
Sin[\[Theta]]^2)/(r^2 - (1 - 2/r)*
SS^2)^2 - ((1 - 2/r)*(LL^2 - SS^2) + (2*LL^2*
Sin[\[Theta]]^2)/r)/
(r^2 - (1 - 2/r)*SS^2)])*((LL*r*
Sin[\[Theta]])/(r^2 - (1 - 2/r)*SS^2) +
Sqrt[(LL^2*r^2*
Sin[\[Theta]]^2)/(r^2 - (1 - 2/r)*
SS^2)^2 - ((1 - 2/r)*(LL^2 - SS^2) + (2*LL^2*
Sin[\[Theta]]^2)/r)/
(r^2 - (1 - 2/r)*SS^2)]))/(Sqrt[1 - 2/r]*r*
Sqrt[1 + ((LL*r*Sin[\[Theta]])/(r^2 - (1 - 2/r)*SS^2) +
Sqrt[(LL^2*r^2*
Sin[\[Theta]]^2)/(r^2 - (1 - 2/r)*
SS^2)^2 - ((1 - 2/r)*(LL^2 - SS^2) + (2*LL^2*
Sin[\[Theta]]^2)/r)/(r^2 - (1 - 2/r)*
SS^2)])^2]) +
Sqrt[1 - 2/r]*
Sqrt[1 + ((LL*r*Sin[\[Theta]])/(r^2 - (1 - 2/r)*SS^2) +
Sqrt[(LL^2*r^2*
Sin[\[Theta]]^2)/(r^2 - (1 - 2/r)*
SS^2)^2 - ((1 - 2/r)*(LL^2 - SS^2) + (2*LL^2*
Sin[\[Theta]]^2)/r)/
(r^2 - (1 - 2/r)*SS^2)])^2];


Possibly you may further simplify.

Then you have:

FullSimplify[VeffSpinP[r, \[Theta]]^2 /. SS -> 0 /. \[Theta] -> Pi/2]
(*((-2 + r)*(LL^2 + r^2))/r^3*)


Edit 2:

I found now that your VeffSpinP is just the square of the one I gave. Both coincide at \Theta=π/2 and SS=0 with the spinless case. Why do you bother with the second derivative? If the two potentials (with and without spin) are the same at a point ( \Theta=π/2 and SS=0) it doesn't mean that their derivatives wrt. \Theta are identical.

• No I'm not getting this result. I'm sure, our spinning model is correct, I have taken this equation from already published articles. This equation is 2.31 from [arxiv.org/pdf/gr-qc/9604020.pdf]. – MMS Jan 5 at 13:33
• @ Andreas thanks for the help, actually I'm trying to calculate the frequency of the particle and in formula I have to use double derivative w.r.t \theta, and after calculations my results of spinning case should be reduced in spin-less case. I have done the same for radial co-ordinate (i.e., derivative w.r.t r), my results were reducing to spin-less case. – MMS Jan 5 at 19:50
• @MMS With FullSimplify[ PowerExpand[ Normal[Series[ Normal[Series[ D[VeffSpinP[r, \[Theta]], {\[Theta], 2}] /. \[Theta] -> Pi/2 - \[Epsilon], {\[Epsilon], 0, 0}]], {SS, 0, 0}]], {r, SS}]] you can see why there is a problem with the second derivative for SS->0 – Andreas Jan 5 at 20:10
• @ Andreas thanks for the help, I have tried this, this command is giving some output. But how can I see the problem for second derivative with the command you have mentioned in the comment. I'm sorry, I'm beginner, I'm not able to understand. – MMS Jan 6 at 9:02
• @MMS There appears a fraction with SS in the denominator which then will go to infinity with SS->0 – Andreas Jan 6 at 11:17