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


Groups > comp.soft-sys.math.mathematica > #15981

Re: variable dimension of domain of integration

From Achilleas Lazarides <achilleas.lazarides@gmx.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: variable dimension of domain of integration
Date 2011-01-28 11:17 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <ihu8k7$1qq$1@smc.vnet.net> (permalink)

Show all headers | View raw


This works:

Clear@f;
f[n_] := NIntegrate[
  Evaluate[Sqrt@Sum[x[i]^2, {i, 1, n}]],
  Evaluate[Sequence~Apply~Table[{x[i], 0, 1}, {i, 1, n}]]
  ];

but perhaps it's one of the inelegant ways...

On Jan27, 2011, at 9:41 AM, Ulvi Yurtsever 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
> 

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: variable dimension of domain of integration Achilleas Lazarides <achilleas.lazarides@gmx.com> - 2011-01-28 11:17 +0000

csiph-web