Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #15991 > unrolled thread

Re: variable dimension of domain of integration

Started byRay Koopman <koopman@sfu.ca>
First post2011-01-28 11:15 +0000
Last post2011-01-28 11:15 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: variable dimension of domain of integration Ray Koopman <koopman@sfu.ca> - 2011-01-28 11:15 +0000

#15991 — Re: variable dimension of domain of integration

FromRay Koopman <koopman@sfu.ca>
Date2011-01-28 11:15 +0000
SubjectRe: variable dimension of domain of integration
Message-ID<ihu8ge$1mp$1@smc.vnet.net>
On Jan 27, 12:41 am, Ulvi Yurtsever <a...@b.c> wrote:
> Consider the function $f(n) = \int_{{0,1}^n}
> \sqrt{\sum_{i=1}^{n} {x_i}^2} dx_1 ... dx_n$.
> How would you define a mathematica function
> F[n_] (using NIntegrate) that computes this
> integral over the n-cube? I can think of several
> inelegant solutions; but surely there are neat
> ways of doing things of this sort...
>
> thanks

F[n_] := NIntegrate[Sqrt@Sum[x[i]^2,{i,n}], Evaluate[
                    Sequence@@Table[{x[i],0,1},{i,n}]]]

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web