       Re: Calculate a numerical integral with enough precision

• To: mathgroup at smc.vnet.net
• Subject: [mg114718] Re: Calculate a numerical integral with enough precision
• From: Mark McClure <mcmcclur at unca.edu>
• Date: Tue, 14 Dec 2010 06:54:37 -0500 (EST)

```On Sun, Dec 12, 2010 at 5:45 AM, alphatest <iliurarfwpuap at mailinator.com> wrote:
> How can we calculate the following integral up to 10-12 decimal places?
> integrate exp(sin(1/x)) , x=0..pi/2

I'm not sure why the fabulous new Levin techniques for oscillatory
integrands don't work straight away on this integral in V8.  They do
work for integrands of the form sin^k(x), however.  Using that
together with the rapidly convergent series for e^x, you get the
following.

InputForm[Sum[NIntegrate[(Sin[1/x]^k)/k!,
{x, 0, Pi/2}], {k, 0, 17}]]
3.101028987751553

In fact, the following yields a closed form expression (in terms of
special functions) that should be within machine precision of the
exact number.

closed = Expand[Sum[Integrate[(Sin[1/x]^k)/k!,
{x, 0, Pi/2}], {k, 0, 17}]];
InputForm[N[closed]]
3.101028987753015

So it looks like we've got more than 10 digits.  If you want
*provably* correct digits, have a look at chapter 1 of  The SIAM
100-Digit Challenge.

Mark McClure

```

• Prev by Date: Re: Getting the code of a glyph
• Next by Date: syntax highlighted symbol shadowing for Curl
• Previous by thread: Re: Calculate a numerical integral with enough precision
• Next by thread: Re: Calculate a numerical integral with enough precision