Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #15707
| From | Peter Pein <petsie@dordos.net> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: variable dimension of domain of integration |
| Date | 2011-01-28 11:15 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <ihu8h4$1ng$1@smc.vnet.net> (permalink) |
| References | <ihrb36$8qe$1@smc.vnet.net> |
On 27.01.2011 09:41, 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
>
ndim[n_] := NIntegrate @@
Prepend[#, Sqrt@Tr[#[[All, 1]]^2]]&[Table[{x[i], 0, 1}, {i, n}]]
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: variable dimension of domain of integration Peter Pein <petsie@dordos.net> - 2011-01-28 11:15 +0000
csiph-web