Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: A tough Integral

  • To: mathgroup at
  • Subject: [mg28560] Re: A tough Integral
  • From: "Robert Miller" <rmiller at>
  • Date: Fri, 27 Apr 2001 03:56:14 -0400 (EDT)
  • References: <9c5ndf$>
  • Sender: owner-wri-mathgroup at

The following should do it:
Divide the integration region into lengths of  2 Pi and use
Cos[x]==Cos[x+n*2*Pi] , n an integer to write
Integrate[1/(Cos[x] + x^2), {x, 0, \[Infinity]}] = =
    Sum[Integrate[1/(Cos[x] + (x + n*2*Pi)^2), {x, 0, 2  \[Pi]}], {n, 0,
Interchange the order of summation and integration.
Mathematica can do the sum
sum=Sum[1/(Cos[x] + (x + n*2*Pi)^2), {n, 0, \[Infinity]}]//FullSimplify
It gives the answer in terms of PolyGamma
Then you can NIntegrate sum from 0 to 2 Pi. Note, however, that in the form
in which Mathematica returns the sum, the denominator ->0 at Pi/2 and 3 Pi/2
( the numerator ->0 as well and limit is OK).
So make these endpoints of integration to avoid NIntegrate error messages:
NIntegrate[sum,{x,0 ,Pi/2}]+NIntegrate[sum,{x,Pi/2, 3
Pi/2}]+NIntegrate[sum,{x,3 Pi/2, 2 Pi}]
with WorkingPrecision->80, I get
Robert Miller

"bobbym1953" <bobbym1953 at> wrote in message
news:9c5ndf$ir1 at
> Does anyone know how I can get the following Integral to at least 60
> using Mathematica?
> Int(1/(cos(x)+x^2)) between x=0 and x=infinity. Both Integrate and
> seemed helpless.
> Thanks,
> Angela
> bobbym1953 at

  • Prev by Date: Re: Mathematica and the Internet
  • Next by Date: Re: Linear Programming constraint
  • Previous by thread: Re: A tough Integral
  • Next by thread: complexity of Mathematica NullSpace[]