If you change some parameters, you get the desired result.
Integrating von 0 to Infinity gives you the message, that it doesn't converge.
int0[r0_, m_] =
Integrate[1/(r Sqrt[(r^2 - m) (r^2/r0^2 - 1)]), {r, 0, Infinity},
Assumptions -> 0 < r0 && m < r0]
(* Integrate::idiv: Integral of 1/(r Sqrt[(-m+r^2) (-1+r^2/r0^2)])
does not converge on {0,\[Infinity]}. >> *)
Numerical integration begining from r0 gives a good result
nint[r0_, m_] :=
NIntegrate[1/(r Sqrt[(r^2 - m) (r^2/r0^2 - 1)]), {r, r0, Infinity},
MaxRecursion -> 200] // Quiet
Plot[nint[1, m], {m, -5, 2}]
If you correct your simplified answer by a factor of 1/2, you get the same picture (not shown here)
simAnswer[r0_, m_] = Log[(Sqrt[m] + r0)/(-Sqrt[m] + r0)]/(2 Sqrt[m])
Plot[simAnswer[1, m], {m, -5, 2}]
Both imply that m has to be m < r0
Integrate with this assumptions
int[r0_, m_] =
Integrate[1/(r Sqrt[(r^2 - m) (r^2/r0^2 - 1)]), {r, r0, Infinity},
Assumptions -> 0 < r0 && m < r0]
(* (-ArcTanh[1 - (2 m)/r0^2] + 2 ArcTanh[r0/Sqrt[m]] +
Log[-(Sqrt[-m + r0^2]/Sqrt[m])])/(2 Sqrt[m]) *)
Plot again gives the same result (not shown here)
Plot[int[1, m], {m, -5, 2}]
Unfortunately MMA doesn't manage to show the difference is zero
fs[r0_, m_] =
FullSimplify[int[r0, m] - simAnswer[r0, m] // ExpToTrig,
0 < r0 && m < r0]
(* -(1/(2 Sqrt[m]))(ArcTanh[1 - (2 m)/r0^2] - 2 ArcTanh[r0/Sqrt[m]] +
Log[(Sqrt[m] + r0)/(-Sqrt[m] + r0)] -
Log[-(Sqrt[-m + r0^2]/Sqrt[m])]) *)
But a grafik shows both results are equal
Plot[int[1, m] - simAnswer[1, m], {m, -5, .99}, MaxRecursion -> 8,
PlotPoints -> 500, Exclusions -> {0}, PlotRange -> 10^-14]
Assumptions
as an option toIntegrate
to give it more information about your parameters/variables. E.g.Assumptions->{r0>0,r>r0,r>m}
to get possibly simpler answers. $\endgroup$Integrate[1/(r Sqrt[(r^2 - m) (r^2/r0^2 - 1)]), {r,0,Infinity}]
to get the equivalent in Mathematica. $\endgroup$