       Re: Correction on confusion with triple integral...

• To: mathgroup at smc.vnet.net
• Subject: [mg32508] Re: [mg32488] Correction on confusion with triple integral...
• From: David Withoff <withoff at wolfram.com>
• Date: Thu, 24 Jan 2002 05:21:02 -0500 (EST)
• Sender: owner-wri-mathgroup at wolfram.com

```> My apologies.  After reading Bob's message I realized I had a typo.  The
> limits on r were supposed to be [1/Cos[x],4], not [0,1/Cos[x]].  So, here is
> the corrected problem...
>
> Please consider the Integral[r^2Sin[x]drdxdy] with limits as follows:
>
> [0,2Pi]for y, [0,ArcCos[1/4]] for x and [1/Cos[x],4] for r.  Mathematica
> returns 27Pi, which is correct.  But, if instead of using ArcCos[1/4], I use
> either ArcCos[0.25] or ArcCos[1/4]//N in the limits, Mathematica returns
> 43Pi.
> Any idea why?

Multiple integrals are done as repeated single integrals, so

Integrate[r^2*Sin[x], {x, 0, ArcCos[1/4]}, {y, 0, 2*Pi}, {r, 1/Cos[x], 4}]

comes down to

Integrate[2*Pi*(64/3 - Sec[x]^3/3)*Sin[x], {x, 0, ArcCos[1/4]}]

which is done by taking limits of the corresponding indefinite integral:

In:= Integrate[2*Pi*(64/3 - Sec[x]^3/3)*Sin[x], x]

Out= 2*Pi*(-((Cos[x]*(64/3 - Sec[x]^3/3))/
(2*(-1 + 48*Cos[x] + 16*Cos[3*x]))) -
(64*Cos[x]^4*(64/3 - Sec[x]^3/3))/(-1 + 48*Cos[x] +
16*Cos[3*x]))

which has a removeable singularity at ArcCos[1/4].  Handling
of singularities is difficult unless the exact location of
the singularity is known, so there is a numerical problem if
the location of the singularity is given by an inexact number
like ArcCos[0.25].

The Integrate function should nevertheless be able to deal
with this.  I'm not intending to suggest that this behavior
is intentional or inevitable.  The fact that Integrate gives
the wrong answer here should just be fixed.  I presume that
what you were asking, though, was why there might be any
sort of difficulty here, and that's why -- it's numerical
error related to inexact specification of the location of
a singularity.

Dave Withoff
Wolfram Research

```

• Prev by Date: RE: Re: Why doesn't this rule work?
• Next by Date: Re: path problem
• Previous by thread: Re: Correction on confusion with triple integral...
• Next by thread: RootSearch package improved