Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

How do I set up an d dimensional integral for general d?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg127262] How do I set up an d dimensional integral for general d?
  • From: Jonathan Frazer <J.Frazer at sussex.ac.uk>
  • Date: Wed, 11 Jul 2012 18:24:12 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <20120711061823.1AE5D684B@smc.vnet.net>

Hi all,

I can't work out how to do summations, integrals etc. for d parameters
without having to rewrite the expression on a case by case basis.

I have had this trouble a few times but in this instance I would like
to calculate the surface area of a d-sphere, where I want to specify
the number of dimensions d at the beginning but not have to change
anything else. The way I was planning to do it was as follows:

d = 2;
=E8=E1 = Table[Symbol["=E8" <> ToString[i]], {i, d - 1}];
S=E8=E1 = Sin[=E8=E1];
C=E8=E1 = Cos[=E8=E1];
s=E8 = r Prepend[Table[Product[S=E8=E1[[=E1]], {=E1, i}], {i, d - 1}], 1]*Append[C=E8=E1, 1];
=EB = Outer[D[#1, #2] &, s=E8, =E8=E1];
g = Table[Sum[=EB[[=E3, =E1]] =EB[[=E3, =E2]], {=E3, d}], {=E1, d - 1}, {=E2, d - 1}];
vol = Sqrt[Det[g]]

(*Now all I should have to do is integrate vol but I don't know how to do it \
for a general d.For instance,for d=3 write*)

Integrate[vol, {=E81, 0, =F0}, {=E82, 0, 2 =F0}]

(*but if d=2 I would need to write*)

Integrate[vol, {=E81, 0, 2 =F0}]

How do I get around this?

Many thanks in advance,

Jonny


  • Prev by Date: Algorithm Analysis Course: Should I use Mathematica for projects?
  • Next by Date: Need to run Mathematica 5.2 on Windows 7 64-bit
  • Previous by thread: Re: Epilog and ListPlot3D
  • Next by thread: Massive memory issues when using Det