Re: Applying the Integration Function to a List Of Regions
- To: mathgroup at smc.vnet.net
- Subject: [mg88785] Re: [mg88739] Applying the Integration Function to a List Of Regions
- From: DrMajorBob <drmajorbob at att.net>
- Date: Fri, 16 May 2008 05:34:12 -0400 (EDT)
- References: <4815108.1210867784525.JavaMail.root@m08>
- Reply-to: drmajorbob at longhorns.com
Formally, this seems to be what you want:
integrate[1,##]&@@@regions
{integrate[1,{x,0,a},{cx,0,a+x},{y,0,Sqrt[a^2-cx^2+2 cx
x-x^2]},{cy,0,Sqrt[a^2-cx^2+2 cx =
x-x^2]+y}],integrate[1,{x,0,a},{cx,0,a+x},{y,Sqrt[a^2-cx^2+2 cx x-x^2],2
a-Sqrt[a^2-cx^2+2 cx x-x^2]},{cy,-Sqrt[a^2-cx^2+2 cx
x-x^2]+y,Sqrt[a^2-cx^2+2 cx x-x^2]+y}],integrate[1,{x,0,a},{cx,0,a+x},{y,2
a-Sqrt[a^2-cx^2+2 cx x-x^2],2 a},{cy,-Sqrt[a^2-cx^2+2 cx x-x^2]+y,2
a}],integrate[1,{x,a,2 a},{cx,-a+x,2 a},{y,0,Sqrt[a^2-cx^2+2 cx
x-x^2]},{cy,0,Sqrt[a^2-cx^2+2 cx x-x^2]+y}],integrate[1,{x,a,2
a},{cx,-a+x,2 a},{y,Sqrt[a^2-cx^2+2 cx x-x^2],2 a-Sqrt[a^2-cx^2+2 cx
x-x^2]},{cy,-Sqrt[a^2-cx^2+2 cx x-x^2]+y,Sqrt[a^2-cx^2+2 cx
x-x^2]+y}],integrate[1,{x,a,2 a},{cx,-a+x,2 a},{y,2 a-Sqrt[a^2-cx^2+2 cx
x-x^2],2 a},{cy,-Sqrt[a^2-cx^2+2 cx x-x^2]+y,2 a}]}
Using capital Integrate integrate works the same way, although it causes
the machine to think a VERY long time.
Integrate[1, ##] & @@@ regions
{(13 a^4)/8, -(1/3)
a ((a^2)^(3/2) (4 - 3 \[Pi]) + a^3 (13 + 3 \[Pi])), (13 a^4)/8, (
13 a^4)/8, 1/3 a^3 (-4 Sqrt[a^2] + a (-13 + 6 \[Pi])), (13 a^4)/8}
Bobby
On Thu, 15 May 2008 05:51:58 -0500, John Snyder <jsnyder at wi.rr.com> wrote:
> Assume that I have already determined a list of 4 dimensional regions as
> follows:
> regions={{{x,0,a},{cx,0,a+x},{y,0,Sqrt[a^2-cx^2+2 cx
> x-x^2]},{cy,0,Sqrt[a^2-cx^2+2 cx
> x-x^2]+y}},{{x,0,a},{cx,0,a+x},{y,Sqrt[a^2-cx^2+2 cx x-x^2],2
> a-Sqrt[a^2-cx^2+2 cx x-x^2]},{cy,-Sqrt[a^2-cx^2+2 cx
> x-x^2]+y,Sqrt[a^2-cx^2+2 cx x-x^2]+y}},{{x,0,a},{cx,0,a+x},{y,2
> a-Sqrt[a^2-cx^2+2 cx x-x^2],2 a},{cy,-Sqrt[a^2-cx^2+2 cx x-x^2]+y,2
> a}},{{x,a,2 a},{cx,-a+x,2 a},{y,0,Sqrt[a^2-cx^2+2 cx
> x-x^2]},{cy,0,Sqrt[a^2-cx^2+2 cx x-x^2]+y}},{{x,a,2 a},{cx,-a+x,2
> a},{y,Sqrt[a^2-cx^2+2 cx x-x^2],2 a-Sqrt[a^2-cx^2+2 cx
> x-x^2]},{cy,-Sqrt[a^2-cx^2+2 cx x-x^2]+y,Sqrt[a^2-cx^2+2 cx
> x-x^2]+y}},{{x,a,2 a},{cx,-a+x,2 a},{y,2 a-Sqrt[a^2-cx^2+2 cx x-x^2],2
> a},{cy,-Sqrt[a^2-cx^2+2 cx x-x^2]+y,2 a}}};
> I want to integrate over each of these regions using an integrand of 1. I
> want my output to be as follows:
> {Integrate[1,{x,0,a},{cx,0,a+x},{y,0,Sqrt[a^2-cx^2+2 cx
> x-x^2]},{cy,0,Sqrt[a^2-cx^2+2 cx
> x-x^2]+y}],Integrate[1,{x,0,a},{cx,0,a+x},{y,Sqrt[a^2-cx^2+2 cx x-x^2],2
> a-Sqrt[a^2-cx^2+2 cx x-x^2]},{cy,-Sqrt[a^2-cx^2+2 cx
> x-x^2]+y,Sqrt[a^2-cx^2+2 cx
> x-x^2]+y}],Integrate[1,{x,0,a},{cx,0,a+x},{y,2
> a-Sqrt[a^2-cx^2+2 cx x-x^2],2 a},{cy,-Sqrt[a^2-cx^2+2 cx x-x^2]+y,2
> a}],Integrate[1,{x,a,2 a},{cx,-a+x,2 a},{y,0,Sqrt[a^2-cx^2+2 cx
> x-x^2]},{cy,0,Sqrt[a^2-cx^2+2 cx x-x^2]+y}],Integrate[1,{x,a,2
> a},{cx,-a+x,2
> a},{y,Sqrt[a^2-cx^2+2 cx x-x^2],2 a-Sqrt[a^2-cx^2+2 cx
> x-x^2]},{cy,-Sqrt[a^2-cx^2+2 cx x-x^2]+y,Sqrt[a^2-cx^2+2 cx
> x-x^2]+y}],Integrate[1,{x,a,2 a},{cx,-a+x,2 a},{y,2 a-Sqrt[a^2-cx^2+2 cx
> x-x^2],2 a},{cy,-Sqrt[a^2-cx^2+2 cx x-x^2]+y,2 a}]}
> How can I do that without having to set up each of the integrals
> manually?
> I am looking for some way to do something like:
> Integrate @@ regions
> or
> Integrate @@@ regions
> But I can't figure out how to incorporate the 1 as the integrand when I
> try
> to set this up automatically.
> There must be a way?
> Thanks,
> John
>
>
>
--
DrMajorBob at longhorns.com