       Re: Integrating over area of intersection

• To: mathgroup at smc.vnet.net
• Subject: [mg44187] Re: Integrating over area of intersection
• From: "Toni Danza" <nospam at yoohoo.com>
• Date: Sat, 25 Oct 2003 06:26:47 -0400 (EDT)
• References: <bn8esp\$nle\$1@smc.vnet.net> <bnaodq\$4g8\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Yes, I have tried that, but it takes literally over an hour to finish...  In
the process it keeps complaining about lack of convergence.

NIntegrate[If[...],...]  is attempting to integrate a discontinuous
function, causing mayhem in convergence algorithms....

OTOH, the integration limits are readily available, all I need to do is
figure out how to plug the result of Reduce[region,{x,y}] into the limits of
NIntegrate.  The function will be nice and continuous here, should be no
problem

Any ideas?

"Steve Luttrell" <luttrell at _removemefirst_westmal.demon.co.uk> wrote in
message news:bnaodq\$4g8\$1 at smc.vnet.net...
> Here is an example of the sort of thing you can do.
>
> First of all read in the Calculus`Integration` package which gives you the
> Boole function for doing integrals over regions defined by inequalities:
>
> << Calculus`Integration`
>
> Now integrate the function x^2*y^2 (as an example) over the region of
> interest (as an example fJ = 3, fH = 2, f1 = 1/2, f2 = -4^(-1)}):
>
> With[{fJ = 3, fH = 2, f1 = 1/2, f2 = -4^(-1)},
>   Integrate[Boole[x^2 + y^2 < fJ^2 &&
>       (x - f1)^2 + y^2 < fH^2 && (x - f2)^2 + y^2 <
>        fH^2]*x^2*y^2, {x, -Infinity, Infinity},
>    {y, -Infinity, Infinity}]]
>
> which gives the result:
>
> -((56359*Sqrt)/163840) + (11/3)*ArcCos[3/16] +
>   (35/6)*ArcSin[Sqrt[13/2]/4]
>
> --
> Steve Luttrell
> West Malvern, UK
>
> "Toni Danza" <nospam at yoohoo.com> wrote in message
> news:bn8esp\$nle\$1 at smc.vnet.net...
> > OK, I have three functions that are defined within their respective
> circles.
> > I would like to integrate over the intersection of the three circles.
> >
> > Here's what I have done:
> > define region of integration:
> >     region = x^2 + y^2 < fJ^2 && (x - f1)^2 + y^2 < fH^2 && (x - f2)^2 +
> y^2
> > < fH^2
> >
> > Then I try to solve for the intersection using
> >
> >     Reduce[region,{x,y}]
> >
> > and the result is something like (only works with numerical
parameters...)
> >
> >     -0.4<x<0.3 && sqrt(....)< y <sqrt(...) || -0.3<x<-0.2 && sqrt(....)<
y
> > <sqrt(...)
> >
> > How do I use this result to do integration over the region?
> >
>
>

```

• Prev by Date: Re: errors while picking random numbers under constraint and in loop also
• Next by Date: Re: InterpolatingFunctionAnatomy
• Previous by thread: Re: Integrating over area of intersection
• Next by thread: FourierTransform bug?