Mathematica 11 produces
NIntegrate[ArcCot[x]*Sin[x]/(5/4 + Cos[x]), {x, 0, Infinity},
Method -> "ExtrapolatingOscillatory", AccuracyGoal -> 10,
WorkingPrecision -> 20]
0.746733605129940959
This is 4.573.3 from Gradshteyn & Ryzhik. Up to G&R the result is
N[Pi*Log[3/2/(1 + 1/2*Exp[-1])], 10]
0.7433557514
The question arises: how to obtain it in Mathematica?
Answer
Here's an extrapolatory approach based on Richardson extrapolation of the integrals over each "period." (Richardson[]
code from Anton Antonov's answer here):
Clear[Richardson]
Richardson[A_, n_, N_] :=
Total@Table[(A[n + k]*(n + k)^N*If[OddQ[k + N], -1, 1])/(k! (N - k)!), {k, 0, N}]
(* the integral from 2 n Pi to 2 (n+1) Pi *)
Clear[aa];
aa[n_Integer /; n >= 0] :=
aa[n] = NIntegrate[ArcCot[x]*Sin[x]/(5/4 + Cos[x]), {x, 2 n Pi, 2 (n + 1) Pi},
WorkingPrecision -> 50];
We get around machine precision with 100 terms plus 6 extrapolation terms:
sf[n_] := Sum[aa[i], {i, 0, n}]; (* partial sum = integral over {0, 2 (n+1) Pi} *)
Richardson[sf, 100, 6]
% - Pi*Log[3/2/(1 + 1/2*Exp[-1])]
(*
0.743355751361227474780881457479018423835
-2.97535713733265290609713*10^-16
*)
Without extrapolation:
sf[100]
% - Pi*Log[3/2/(1 + 1/2*Exp[-1])]
(*
0.74207790286093203962531860751097243182349263171074
-0.00127784850029573269127658323333660172377741318898
*)
Update
More extrapolatory terms yields an approximation accurate to machine precision with many fewer terms overall:
Richardson[sf, 1, 16]
% - Pi*Log[3/2/(1 + 1/2*Exp[-1])]
(*
0.74335575136122767678505611095516483469029
-9.553153907978914419885698*10^-17
*)
Comments
Post a Comment