The "trick" which works frequently when Mathematica refuses to calculate a definite integral is to calculate first the indefinite integral, then take the limits at the ends of the integration interval and subtract the results.
Here we go.
Let the integrand be
f = -((cA Log[1 + mgl^2/sa1])/(-1 + x)) + (cA Log[-(sa1/(-mgl^2 - sa1))])/(1 - x) + (cA cF Log[-1 + 1/x])/(1 - x) - (2 cF^2 Log[-1 + 1/x])/(1 -
x) + (2 cF Log[1 - x])/(1 - x) +
1/2 cA (2/(-1 + x) +
sa1^2/(2 mgl^4 + 4 mgl^2 sa1 + 2 sa1^2 - 4 mgl^2 sa1 x - 4 sa1^2 x +
2 sa1^2 x^2) - (sa1^2 x)/(2 mgl^4 + 4 mgl^2 sa1 + 2 sa1^2 -
4 mgl^2 sa1 x - 4 sa1^2 x +
2 sa1^2 x^2) + (2 Log[1 + mgl^2/sa1 - x])/(-1 + x));
Now take the indefinte integral
f1 = Integrate[f, x]
(*
Out[6]= (cA mgl^2)/(4 (-mgl^2 - sa1 + sa1 x)) + cA Log[1 - x] -
cA Log[sa1/(mgl^2 + sa1)] Log[1 - x] - cA Log[(mgl^2 + sa1)/sa1] Log[1 - x] -
cF Log[1 - x]^2 - 1/2 cA cF Log[-1 + x]^2 + cF^2 Log[-1 + x]^2 -
cA cF Log[-1 + x] (Log[-1 + 1/x] - Log[-1 + x] + Log[x]) +
2 cF^2 Log[-1 + x] (Log[-1 + 1/x] - Log[-1 + x] + Log[x]) -
1/4 cA Log[mgl^2 + sa1 - sa1 x] - cA cF PolyLog[2, 1 - x] +
2 cF^2 PolyLog[2, 1 - x] +
cA (Log[1 - (sa1 (1 + mgl^2/sa1 - x))/mgl^2] Log[1 + mgl^2/sa1 - x] +
PolyLog[2, (sa1 (1 + mgl^2/sa1 - x))/mgl^2])
*)
Calculate the limit at the lower end of the interval
fi0 = Limit[f1, x -> 0]
(*
Out[23]= -(2/3) cA cF \[Pi]^2 + (4 cF^2 \[Pi]^2)/3 - (cA mgl^2)/(4 (mgl^2 + sa1)) -
1/4 cA Log[mgl^2 + sa1] + cA Log[-(sa1/mgl^2)] Log[(mgl^2 + sa1)/sa1] +
cA PolyLog[2, 1 + sa1/mgl^2]
*)
and similarly for the limit at the upper end of the interval
fi1 = Limit[f1, x -> z]
(*
Out[24]= -((cA mgl^2)/(4 (mgl^2 + sa1 - sa1 z))) + cA Log[1 - z] -
cA Log[sa1/mgl^2] Log[1 - z] - cA Log[(mgl^2 + sa1)/sa1] Log[1 - z] +
cA Log[1 + sa1/mgl^2] Log[1 - z] - cF Log[1 - z]^2 -
cA cF Log[-1 + 1/z] Log[-1 + z] + 2 cF^2 Log[-1 + 1/z] Log[-1 + z] +
1/2 cA cF Log[-1 + z]^2 - cF^2 Log[-1 + z]^2 +
cA Log[1 + mgl^2/sa1 - z] Log[(sa1 (-1 + z))/mgl^2] -
cA cF Log[-1 + z] Log[z] + 2 cF^2 Log[-1 + z] Log[z] -
1/4 cA Log[mgl^2 + sa1 - sa1 z] + cF (-cA + 2 cF) PolyLog[2, 1 - z] +
cA PolyLog[2, (mgl^2 + sa1 - sa1 z)/mgl^2]
*)
The difference should be the value of the definite integral:
fd = fi1 - fi0 // Simplify
(*
Out[25]= 2/3 cA cF \[Pi]^2 - (4 cF^2 \[Pi]^2)/3 + (cA mgl^2)/(4 (mgl^2 + sa1)) - (
cA mgl^2)/(4 (mgl^2 + sa1 - sa1 z)) + 1/4 cA Log[mgl^2 + sa1] -
cA Log[-(sa1/mgl^2)] Log[(mgl^2 + sa1)/sa1] + cA Log[1 - z] -
cA Log[sa1/mgl^2] Log[1 - z] - cA Log[(mgl^2 + sa1)/sa1] Log[1 - z] +
cA Log[1 + sa1/mgl^2] Log[1 - z] - cF Log[1 - z]^2 -
cA cF Log[-1 + 1/z] Log[-1 + z] + 2 cF^2 Log[-1 + 1/z] Log[-1 + z] +
1/2 cA cF Log[-1 + z]^2 - cF^2 Log[-1 + z]^2 +
cA Log[1 + mgl^2/sa1 - z] Log[(sa1 (-1 + z))/mgl^2] -
cA cF Log[-1 + z] Log[z] + 2 cF^2 Log[-1 + z] Log[z] -
1/4 cA Log[mgl^2 + sa1 - sa1 z] - cA PolyLog[2, 1 + sa1/mgl^2] +
cF (-cA + 2 cF) PolyLog[2, 1 - z] +
cA PolyLog[2, (mgl^2 + sa1 - sa1 z)/mgl^2]
*)
All these calculations are done by MMA in almost no time.
It should be mentioned that, stricly speaking, we should check if the indefinite integral is a continuous function of x. If not, the result obatined may be wrong. But continuity depends of the parameters of the problem, and therefore is not easily checked.
Reals
where you haveReal
) is not sufficient to unravel possible branch cut crossings. This is an issue for the subexpressionLog[1 + mgl^2/sa1 - x]
. $\endgroup$