Re: Multiple Integrals
- To: mathgroup at smc.vnet.net
- Subject: [mg117601] Re: Multiple Integrals
- From: Achilleas Lazarides <achilleas.lazarides at gmx.com>
- Date: Thu, 24 Mar 2011 06:28:34 -0500 (EST)
This sort of thing should work:
Clear@multint;
multint[n_, opts___] := NIntegrate[
Sqrt@Sum[x[i]^2, {i, 1, n}],
Evaluate[Sequence @@ Table[{x[i], 0, 1}, {i, 1, n}]],
opts];
On Mar23, 2011, at 8:56 AM, schomi wrote:
> Hi everybody
>
> I'm having troubles with multiple integrals in Mathematica and hope
> that you guys might be able to help me.
>
> Calculating a multiple integral per se is not such a big deal, for
> instance for n=2 the code would be of the form
>
> Integrate[f(x, y), {x, x_min, x_max}, {y, y_min,y_max}].
>
> What I'd like to have is a general formula for computing an intergral
> in R^n, ie of the form
>
> Integrate[f(x1, x2, ...., xn), {x1, x1_min, x1_max}, {x2,
> x2_min,x2_max}, ...., {xn, xn_min, xn_max}]
>
> The dots .... should of course be replaced by code. Is there a way to
> build something of this form?
>
> Any help would be appreciated. In case I am not making myself clear,
> do not hesitate to ask question and I'll try to give you a better
> explanation.
>
> Thanks a lot!
>
> schomi
>