Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #10892
| From | Jonathan Frazer <J.Frazer@sussex.ac.uk> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | How do I set up an d dimensional integral for general d? |
| Date | 2012-07-11 22:26 +0000 |
| Message-ID | <jtkuif$2d$1@smc.vnet.net> (permalink) |
| References | <20120711061823.1AE5D684B@smc.vnet.net> |
| Organization | Time-Warner Telecom |
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 comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
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
csiph-web