Here's my code.
Int1 = Integrate[((1 - Cos[x])/(L^2 (1 - Cos[x]) + 1)^2) Sin[x], {x,
0, Pi}]
Int2 = Integrate[((1 - Cos[x])/(L^2 (1 - Cos[x]) + 1)^2) Sin[x], x]
r1 = Int1[[1]];
r2 = Limit[Int2, x -> Pi] - Limit[Int2, x -> 0];
Plot[r1, {L, -1000, 1000}]
Plot[r2, {L, -1000, 1000}]
Plot[Abs[r2 - r1], {L, -1000, 1000}]
The results of plot r1, r2 and their difference are, respectively,
I have results of the integration obtained by two different ways. The results are almost identical as we can see the plot of r1 and r2. Small differences are in order of $10^{-25}-10^{-24}$ which is acceptable. I want to know where the differences are from. And which one should I use for further calculation?
FullSimplify[r1 == r2]
gives true. There's just a tiny difference in the formulas that lead to a tiny numerical difference. UseFullSimplify[r1]
to continue, it's the same asFullSimplify[r2]
. $\endgroup$ – Roman Jul 30 at 22:00Simplify
andWorkingPrecision->128
$\endgroup$ – Bill Jul 30 at 22:05