I want to write code that calculates the gravitational potential of an arbitrarily shaped celestial body. To understand the calculation, I started with an easy shape: a rectangle (or a cube). I realised this was allready hard enough, so I researched in the Internet and found a work of this problem. I found the equation:
Where v
is
v = Subscript[x, 1]*Subscript[x, 2]*Subscript[x, 3]
,
and the $D_i$ are the lenghs of the edges of the cube.
I have 2 questions (but the first one will be answered too if the second one gets answered):
I try to understand how this sum looks like, but I dont quite get how this summation over the Integration Limits works. I guess every little $x_i$ must vanish after the last step.
So my actual question is:
How can I code these integration limit brackets and sum over them?