# Thread: sum of lines of force: an n-body problem, infinite series sort of deal

1. ## sum of lines of force: an n-body problem, infinite series sort of deal

Hey, so first of all, does there exist a 3D shape such that, if repeated infinitely throughout space, points located at the corners or vertices of the shape will be equidistant from each other?

If not, proceed to part two: I take a regular old cube whose sides are length 1. The cube has eight corners, as we all know. At each corner I place a point of mass, say a planet. Each planet exerts a gravitational force on all of the other planets, so I draw lines of force between all of the planets. I.e. Every corner of the cube must have a line connecting it to every other corner. I am interested in the sum of the length of these lines.

In one cube the sum, if I'm not mistaken, is:

$12+12\sqrt{2}+4\sqrt{3}$

Now, when I place another cube right smack alongside the first cube, there are now 12 planets connected by lines of force.

The sum of these lines, if I'm not mistaken, is:

$12+12\sqrt{2}+4\sqrt{3}+8+10\sqrt{2}+4\sqrt{3}+8\s qrt{5}+4\sqrt{6}$

Placing a third cube smack against the second cube:

$12+12\sqrt{2}+4\sqrt{3}+8+10\sqrt{2}+4\sqrt{3}+8\s qrt{5}+4\sqrt{6}$ $+4+8\sqrt{2}+4\sqrt{3}+8\sqrt{5}+4\sqrt{6}+8\sqrt{ 10}+4\sqrt{11}$

I've left this unsimplified so that it might be easier to discern the pattern.

I'm trying to come up with a function that captures this pattern. I need a function f(x) that gives me the sum of the lengths of lines of force for x cubes or points of mass.

AND: In this scheme of things, the cubes line up in a straight line. Would the sum of lengths be the same if the cubes were arranged differently (but always so that the xth cube is added in such a way that four of its corners line up exactly with the four corners of one of the other cubes)?

Thanks

2. Hello rainer

I'm not sure that I agree with your working so far - that is, if I'm understanding your requirements.

Take a look at the diagram I've attached.
Originally Posted by rainer
Every corner of the cube must have a line connecting it to every other corner. I am interested in the sum of the length of these lines.

In one cube the sum, if I'm not mistaken, is:

$12+12\sqrt{2}+4\sqrt{3}$
I agree with this. This sum can be thought of as:
(1) The sum of the lengths of the lines lying in the plane $A_1B_1C_1D_1\;(=4+2\sqrt2)$; PLUS

The additional lengths created when the plane $A_2B_2C_2D_2$ is added; which in turn is comprised of:
(2) The sum of the lengths of the lines in the plane $A_2B_2C_2D_2\;(=4+2\sqrt2)$ (the same as (1)); PLUS

(3) The sum of the distances of each of the points in plane #1 from each of the points in plane #2.
This last sum, (3), can be found by taking the sum of the distances of one of the points in plane #1 - say, $A_1$ - from each of the points in plane #2, and multiplying by 4 (since there are four points in plane #1, each indistinguishable from each other). This sum (3), then, is $4(1+2\sqrt2+\sqrt3)$.

Thus, when we add the totals (1), (2) and (3) together, we get:
$\underbrace{4+2\sqrt2}_{\color{blue}\text{(1)}}+\u nderbrace{4+2\sqrt2}_{\color{blue}\text{(2)}}+\und erbrace{4(1+2\sqrt2+\sqrt3)}_{\color{blue}\text{(3 )}}=12+12\sqrt2+4\sqrt3$
Now, when I place another cube right smack alongside the first cube, there are now 12 planets connected by lines of force.

The sum of these lines, if I'm not mistaken, is:

$12+12\sqrt{2}+4\sqrt{3}+8+10\sqrt{2}+4\sqrt{3}+8\s qrt{5}+4\sqrt{6}$
If I understand you correctly, I think you are mistaken here.

When we add four more 'planets' in plane #3, we get, in addition to the distances above:
(4) The sum of the lengths of the lines in plane #4; this is, of course, the same as (1) and (2); namely $4+ 2\sqrt2$. PLUS

The sum of the all the distances of $A_1, B_1, ..., C_2, D_2$ from each of the points $A_3, ..., D_3$; which comprises:
(5) the distances of the points in plane #2, which is the same as (3) above; namely $4(1+2\sqrt2+\sqrt3)$; and

(6) the distances of the points in plane #1, which is (taking the distances from $A_1$ and multiplying by 4) $4(2+2\sqrt5+\sqrt6)$.
So I reckon that the total for the 12 planets is:
$\underbrace{4+2\sqrt2}_{\color{blue}\text{(1)}}+\u nderbrace{4+2\sqrt2}_{\color{blue}\text{(2)}}+\und erbrace{4(1+2\sqrt2+\sqrt3)}_{\color{blue}\text{(3 )}}+\underbrace{4+2\sqrt2}_{\color{blue}\text{(4)} }+\underbrace{4(1+2\sqrt2+\sqrt3)}_{\color{blue}\t ext{(5)}}$ $+\underbrace{4(2+2\sqrt5+\sqrt6)}_{\color{blue}\te xt{(6)}}$
$=12+2\sqrt2+4\sqrt3+\color{red}16\color{black}+10\ sqrt2+4\sqrt3+8\sqrt5+4\sqrt6$
To see the pattern being created here, break the expression above into three components:
(1) for plane #1

(2) + (3) for plane #2

(4) + (5) + (6) for plane #3
and notice that (1), (2) and (4) are the same; (3) and (5) are the same; (6) is the new expression formed from the distances of the points in the first plane from the last. So we can re-arrange these as:
$3\times$ (1) + $2\times$ (3) + $1\times$ (6)
i.e.
$3\times(4+2\sqrt2) + 2\times\Big(4(1+2\sqrt2+\sqrt3)\Big)+1\times\Big(4 (2+2\sqrt5+\sqrt6)\Big)$
So when the next new plane is added comprising points $A_4, ..., D_4$, there will be additional totals equal to:
(4) + (5) + (6) for the points in planes #2, #3 and #4; PLUS

(7) the distances from plane #1 to plane #4; namely $4(3+2\sqrt{10}+\sqrt{11})$.
So this, when re-arranged, is equivalent to:
$4\times$ (1) + $3\times$ (3) + $2\times$ (6) + $1\times$ (7)
$=4\times(4+2\sqrt2) + 3\times\Big(4(1+2\sqrt2+\sqrt3)\Big)$ $+2\times\Big(4(2+2\sqrt5+\sqrt6)\Big)+1\times\Big( 4(3+2\sqrt{10}+\sqrt{11})\Big)$
... and so on. I hope you can see the pattern emerging. I realise that I'm still quite a way short of developing a formula for the total with $n$ planes, but at least you should be able to see how to continue - if you still want to, that is!

Lastly:
AND: In this scheme of things, the cubes line up in a straight line. Would the sum of lengths be the same if the cubes were arranged differently (but always so that the xth cube is added in such a way that four of its corners line up exactly with the four corners of one of the other cubes)?

Thanks
No, I'm sure that the sum won't be the same if the cubes are not arranged in a straight line.

3. This is a very helpful way to think about it. Thanks, and thanks for pointing out my mistake too.

I am also trying to do the same sort of thing for cubes arranged in a big cube (27 cubes, 64 planets), as opposed to a straight line. Any tips would be welcome, but I don't blame you if you take a pass on that one.

Actually, I would appreciate your input on the following:

If I set aside for now the broader goal of summing the lines of force between 64 planets arranged in a 3x3x3 cube, and focus instead on an individual plane, as you did in the original problem, I get a plane of 16 planets arranged in 3x3 squares.

My sum of lines of force in this plane is:

$24+8(4+3)+18\sqrt{2}+2(4\sqrt{2}+3\sqrt{2})+4\sqrt {2}$ $+24\sqrt{5}+12\sqrt{10}+8\sqrt{13}$

Does this look all right to you?

5. Hello rainer
Originally Posted by rainer

Actually, I would appreciate your input on the following:

If I set aside for now the broader goal of summing the lines of force between 64 planets arranged in a 3x3x3 cube, and focus instead on an individual plane, as you did in the original problem, I get a plane of 16 planets arranged in 3x3 squares.

My sum of lines of force in this plane is:

$24+8(4+3)+18\sqrt{2}+2(4\sqrt{2}+3\sqrt{2})+4\sqrt {2}$ $+24\sqrt{5}+12\sqrt{10}+8\sqrt{13}$

Does this look all right to you?
I get a slightly different answer from this. I adopted a different approach this time. Here's what I did.

Set up the 16 points on coordinate axes, and represent two typical points by $(x_0,y_0)$ and $(x_1,y_1)$, where $x_0, x_1, y_0,y_1$ take values from $0$ to $3$.

Then the distance between these two points is $\sqrt{(x_0-x_1)^2+(y_0 - y_1)^2}$, and we want the sum of the distances all distinct pairs of points.

The attached table shows the possible values of $(x_0-x_1)^2$. The values of $(y_0 - y_1)^2$ will obviously be identical. So we need to:

• find the sum of every value in turn of $(x_0-x_1)^2$ and every value of $(y_0 - y_1)^2$ (ignoring the 0 + 0 values, since they represent the distance of a point from itself)

• take the square root of this sum

• divide by 2, since each pair of points will be counted twice.

In the table we have (for the $x$'s):
$4\;0$'s, $6\;1$'s, $4\;4$'s, $2\;9$'s
which must be added in turn to exactly the same numbers representing the $y$'s (ignoring the 0 + 0 sums); then take the square roots. This gives:

For the $4\;0$'s:
$24\sqrt{0+1}+16\sqrt{0+4}+8\sqrt{0+9}$
For the $6\;1$'s:
$24\sqrt{1+0}+36\sqrt{1+1}+24\sqrt{1+4}+12\sqrt{1+9 }$
... and so on.

When you've done this for the remaining numbers, add them all together, and divide by 2. I reckon the answer is (and check my working!):
$80+40\sqrt2+24\sqrt5+12\sqrt{10} +8\sqrt{13}$
which is very close to your answer, but not quite the same.

6. ## 3 x 3 x 3 cube with 64 planets

Hello Rainer

I've had a further think about this - and corrected the calculation in my previous post (which makes it even closer to your answer; I get $40\sqrt2$, where you get $36\sqrt2$). I have a development of this method which will extend this single plane of 16 points into 4 planes, totalling 64 points, thus forming the 3 x 3 x 3 cube that you referred to.

First, an outline of the general method, which uses the ideas in my first post, relating to the line of 1 x 1 x 1 cubes.

Suppose we call this first 3 x 3 plane $P_0$, and the sum of the distances in this plane $S_0$. We add to this plane three further identical 3 x 3 planes that we'll call $P_1,\; P_2,\;P_3$. Then, clearly, the sum of the distances in each of these planes is also $S_0$. This gives the sum of the distances within each the four planes as $4S_0$.

Of course, we shall also need to calculate and add the distances between points in different planes. Suppose that the sum of the distances between $P_0$ and $P_1$ is $S_1$. Then, clearly, this is also the sum of the distances between other adjacent pairs of planes, $P_1$ and $P_2$, and $P_2$ and $P_3$. This means that, once we've worked out what $S_1$ is, we shall need to add $3S_1$ to our total.

Similarly, if $S_2$ is the sum of the distances from $P_0$ to $P_2$, we shall need $2S_2$ in our total; and finally $S_3$, the sum of the distances from $P_0$ to $P_3$.

So the overall total will be:
$4S_0+3S_1+2S_2+S_3$ ...(1)
(Compare this with the pattern I established in my first post.)

Then, of course, we need to find the values of $S_1, ..., S_3$. This isn't as hard as it may at first appear. First we note that, in three dimensions with the $x-y$ plane horizontal, the distance between the points $(x_0,y_0,0)$ and $(x_1,y_1, \Delta z)$ is
$\sqrt{(x_0-x_1)^2+(y_0-y_1)^2+(\Delta z)^2}$
where $\Delta z$ represents the vertical distance between two planes.

To find $S_1$, then, we simply need to modify the workings for $S_0$ to add in a term to represent $\Delta z = 1$; for $S_2,\; \Delta z = 2$; and for $S_3,\; \Delta z = 3$.

The only slight complication is the fact that the method that I used to find $S_0$ ignored the zero distances, and divided the other distance-sum by $2$ (since each other pair occurred twice when combining the values of $x_i$ and $y_i$). In order to take account of this, I set out below a modified version of the working to give $S_0$. I have included the $16$ zero terms, and have divided each of the other distance terms by 2. I have set out the working on four lines, corresponding to the way I set it out in my previous post. Thus:
$S_0 =16\times \sqrt{0+0} +12\sqrt{0+1}+8\sqrt{0+4}+4\sqrt{0+9}$
$+12\sqrt{1+0}+18\sqrt{1+1}+12\sqrt{1+4}+6\sqrt{1+9 }$

$+8\sqrt{4+0}+12\sqrt{4+1}+8\sqrt{4+4}+4\sqrt{4+9}$

$+4\sqrt{9+0}+6\sqrt{9+1}+4\sqrt{9+4}+2\sqrt{9+9}$
I think you'll find that, when simplified, this gives the answer in my previous post.

With the working set out like this, it's very simple to make the modification to obtain an expression for $S_1$: simply add $1^2 \;(=1)$ to the expression inside each square root. Thus:
$S_1 =16\times \sqrt{0+0+1} +12\sqrt{0+1+1}+8\sqrt{0+4+1}+4\sqrt{0+9+1}$
$+12\sqrt{1+0+1}+18\sqrt{1+1+1}+12\sqrt{1+4+1}+6\sq rt{1+9+1}$

$+8\sqrt{4+0+1}+12\sqrt{4+1+1}+8\sqrt{4+4+1}+4\sqrt {4+9+1}$

$+4\sqrt{9+0+1}+6\sqrt{9+1+1}+4\sqrt{9+4+1}+2\sqrt{ 9+9+1}$
Similarly for $S_2$; instead of $1$, you'll add $2^2\;(=4)$ to each square root expression:
$S_2 =16\times \sqrt{0+0+4} +12\sqrt{0+1+4}+8\sqrt{0+4+4}+4\sqrt{0+9+4}$

$+...$ etc
For $S_3$, you'll add $9$ instead of $4$.

Finally, use formula
(1) above to obtain the overall total. If you're careful with the arithmetic, it's pretty straightforward!

$80+40\sqrt2+24\sqrt5+12\sqrt{10} +8\sqrt{13}$

which is very close to your answer, but not quite the same.

Before seeing your response I came around to this too.

Thanks for making this all so methodologically clear.

I was coming at it another way--dealing only with just one $S_1$ (i.e. one set of distances between the points in two adjacent planes). By stacking $S_1$ in three different ways (I think) you cover all of the connections. The disadvantage here is having to subtract a lot of distances that get counted twice or thrice, (although this is somewhat mitigated if you count the planes 8 times--horizontally and vertically--instead of 4). Plus you have to add $12\sqrt{3}$ at the end.

I've found it helps to consider the more simple example of 2x2x2 cubes, 27 points.

I'll have to meditate on it for a bit, but it looks like you've come up with just what I need.

Thanks!