# Again Integrate with singularities

Integrate[1/(a x + Sqrt[b x^2 - c]), {x, 1, d}]


where a,b,c are positive values. Mathematica runs this forever.

• In general, fixing assumptions makes timing considerably shorter. – Alexei Boulbitch Jan 12 at 9:11
• @AlexeiBoulubitch: Only assumptions do not help here. – user64494 Jan 12 at 11:03
• Assumptions that force the denominator to be nonzero and force the radicand to be nonnegative can help. I used for example Assumptions -> {a > 0, d > 1, b > 1, 0 < c < 1}; that takes a minute or three to run to completion. – Daniel Lichtblau Jan 12 at 14:57
• @DanielLichblau: Resolve[ForAll[{a, b, c}, Implies[a > 0 && b > 1 && 0 < c < 1, a > 0 && b > 0 && c > 0 && Sqrt[c/b] < 1]], Reals] produces True. You consider a partial case of the conditions from my answer. – user64494 Jan 12 at 15:18

Mathematica can quickly find the antiderivative, so another approach is to evaluate the antiderivative, call it $$\psi$$, between the limits, as

ψ = Integrate[1/(a x + Sqrt[b x^2 - c]), x]

(ψ /. x -> d) - (ψ /. x -> 1) // Simplify


This gives

Making assumptions and no conditions

Integrate[1/(a x + Sqrt[b x^2 - c]),{x, 1, d},Assumptions->d>= 1&&a>0&& b > 0 && c > 0,
GenerateConditions -> False]


, we have

  (* (1/(2 (a^2 - b)))(a Log[1 - a/Sqrt[b - c]] -
a Log[1 + a/Sqrt[b - c]] + 2 Sqrt[b] Log[b + Sqrt[b] Sqrt[b - c]] -
a Log[a^2 - b + c] + a Log[c + (a^2 - b) d^2] -
a Log[1 - (a d)/Sqrt[-c + b d^2]] +
a Log[1 + (a d)/Sqrt[-c + b d^2]] -
2 Sqrt[b] Log[b d + Sqrt[b] Sqrt[-c + b d^2]]) *)


PS. In order to obtain a nonformal result (in version 12.2), one should make an additional assumption which guarantees positivity of b*x^2-c:

Integrate[1/(a x + Sqrt[b x^2 - c]), {x, 1, d},
Assumptions -> d >= 1 && a > 0 && b > 0 && c > 0 && Sqrt[c/b] < 1]


ConditionalExpression[(a*Log[-a + Sqrt[b - c]] - a*Log[a + Sqrt[b - c]] + 2*Sqrt[b]*Log[b + Sqrt[b*(b - c)]] - a*Log[a^2 - b + c] + a*Log[c + (a^2 - b)*d^2] - a*Log[-(a*d) + Sqrt[-c + b*d^2]] + a*Log[a*d + Sqrt[-c + b*d^2]] - 2*Sqrt[b]*Log[b*d + Sqrt[b*(-c + b*d^2)]])/(2*(a^2 - b)), a^2 != b && Sqrt[b - c] <= a && d > 1 && (Sqrt[c]*Re[1/Sqrt[-a^2 + b]] < 1 || d < Sqrt[c]*Re[1/Sqrt[-a^2 + b]] || NotElement[Sqrt[-a^2 + b], Reals]) && ((a^2 + c >= b && ((a^2 < b && Re[(1 + Sqrt[c]/Sqrt[-a^2 + b])/(1 - d)] <= 0) || NotElement[(1 + Sqrt[c]/Sqrt[-a^2 + b])/(1 - d), Reals])) || (a^2 > b && NotElement[(1 + Sqrt[c]/Sqrt[-a^2 + b])/(1 - d), Reals]))]

• @AntoinAntonov: I didn't edit your posts. Do you understand me? – user64494 Jan 12 at 14:58
• Missed a spot, btw. There's a "rollback" button in the edit history that's probably more appropriate. (I prefer Anton's edit though.) – Michael E2 Jan 12 at 15:02

Or you can try Rubi

<< Rubi
Int[1/(a x + Sqrt[b x^2 - c]), {x, 1, d}]


• Nasser (@does not work)Rubi` produces a formal answer. Am I not right? – user64494 Jan 12 at 15:20
• That's not a definite integral. It's an indefinite integral in a pretty dress. – Daniel Lichtblau Jan 12 at 20:35