Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #10892 > unrolled thread
| Started by | Jonathan Frazer <J.Frazer@sussex.ac.uk> |
|---|---|
| First post | 2012-07-11 22:26 +0000 |
| Last post | 2012-07-11 22:26 +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.
How do I set up an d dimensional integral for general d? Jonathan Frazer <J.Frazer@sussex.ac.uk> - 2012-07-11 22:26 +0000
| From | Jonathan Frazer <J.Frazer@sussex.ac.uk> |
|---|---|
| Date | 2012-07-11 22:26 +0000 |
| Subject | How do I set up an d dimensional integral for general d? |
| Message-ID | <jtkuif$2d$1@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
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web