Find
for a constant and .
Substitute u = ln x to put the two awkward pieces on the same footing. With and ,
using . The integrand is now a power times a Fermi-type factor, which is the recognisable non-elementary shape.
Expand the Fermi factor as a geometric series. For (that is, ) we have , so
Splitting off the term,
Integrate the leading term. For ,
and for the exceptional value this term is instead — the one case where the formula below must be replaced.
Express the remaining integrals with the upper incomplete gamma function. Since satisfies , setting (so that ) gives
Assemble the antiderivative. Substituting back and absorbing the sign into the alternation:
for and .
Verify by differentiating the closed form. Term by term, , so the whole derivative collapses to a geometric sum:
As a second check, must return the elementary : the formula gives , confirmed numerically at .
Need to solve a different problem like this? Open the solver →