In a stark contrast to gravitational systems, *n*-body simple harmonic oscillators are always soluble. This is because the differential equations governing their motion are linear no matter how many interactions are included, so the solution is a matter of matrix algebra. It is straightforward to evaluate the exact solution for an arbitrary number of bodies in an arbitrary number of dimensions.

Consider an *n*-body system with equal masses and frequencies, since the solution is particularly elegant. The Lagrangian for pairwise interaction in *d* spatial dimensions is

$L=\frac{m}{2}\sum _{i=1}^{n}\sum _{k=1}^{d}({\stackrel{\xb7}{x}}_{i}^{k}{)}^{2}-\frac{m{\omega}^{2}}{2}\sum _{i=1}^{n-1}\sum _{j=i+1}^{n}\sum _{k=1}^{d}({x}_{i}^{k}-{x}_{j}^{k}{)}^{2}$

where the upper indices label spatial dimensions as is done in general relativity. Evaluating the Lagrange equations

$\frac{d}{dt}\frac{\partial L}{\partial {\stackrel{\xb7}{q}}_{i}}=\frac{\partial L}{\partial {q}_{i}}$

for any one of the variables gives simply

${\stackrel{\xb7\xb7}{x}}_{i}^{k}=-{\omega}^{2}\sum _{j\ne i}({x}_{i}^{k}-{x}_{j}^{k})$

which are linear equations as stated at the outset. The overall sign on the right-hand side can be confirmed by expanding each individual square in the potential.

These equations are independent of the number of spatial dimensions in the sense that the same form holds for each Cartesian coordinate individually. Since a general solution for one coordinate holds for all, apart from initial conditions, the upper index can be dropped temporarily.

The right-hand side of these equations contains *n*−1 terms for the variable on the left-hand side and one term for each of the remaining variables. The set of equations for each Cartesian coordinate thus has a matrix on the right-hand side which is all ones apart from the diagonal:

$\frac{{d}^{2}}{d{t}^{2}}\left[\begin{array}{c}{x}_{1}\\ {x}_{2}\\ \vdots \end{array}\right]={\omega}^{2}\left[\begin{array}{ccc}1-n& 1& \cdots \\ 1& 1-n& \cdots \\ \vdots & \vdots & \ddots \end{array}\right]\left[\begin{array}{c}{x}_{1}\\ {x}_{2}\\ \vdots \end{array}\right]={\omega}^{2}M\left[\begin{array}{c}{x}_{1}\\ {x}_{2}\\ \vdots \end{array}\right]$

The general behavior of this matrix can be understood by splitting it into two matrices, one which is all ones and the other proportional to the identity matrix:

$M=J-nI\phantom{\rule{5em}{0ex}}J=\left[\begin{array}{ccc}1& 1& \cdots \\ 1& 1& \cdots \\ \vdots & \vdots & \ddots \end{array}\right]$

A matrix of all ones has the interesting property

${J}^{2}=nJ$

which is easy to understand because multiplying any column with any row simply gives the dimension of the matrix. From this one can determine

${M}^{2}=(J-nI{)}^{2}=nJ-2nJ+{n}^{2}I=-n(J-nI)=-nM$

Multiplying repeatedly by *M* on both sides gives the general formula

${M}^{k}=(-n{)}^{k-1}M$

while taking the square root of both sides gives

$\sqrt{M}=\pm \frac{i}{\sqrt{n}}M$

consistent with the general formula. This last expression is needed for writing down the general solution to the system of equations for each Cartesian coordinate,

$\left[\begin{array}{c}{x}_{1}\\ {x}_{2}\\ \vdots \end{array}\right]=exp\left(\omega \sqrt{M}t\right)[\begin{array}{c}{x}_{1}\\ {x}_{2}\\ \vdots \end{array}{]}_{0}=exp(\pm \frac{i\omega t}{\sqrt{n}}M)[\begin{array}{c}{x}_{1}\\ {x}_{2}\\ \vdots \end{array}{]}_{0}$

where the subscripts indicate initial values. Evaluating the exponential factor is straightforward:

$\begin{array}{l}exp(\pm \frac{i\omega t}{\sqrt{n}}M)=I+\sum _{k=1}^{\infty}(\pm \frac{i\omega t}{\sqrt{n}}{)}^{k}\frac{{M}^{k}}{k!}\\ \phantom{\rule{4em}{0ex}}=I+\sum _{k=1}^{\infty}(\pm \frac{i\omega t}{\sqrt{n}}{)}^{k}\frac{(-n{)}^{k-1}}{k!}M=I-\frac{M}{n}\sum _{k=1}^{\infty}\frac{(\mp i\sqrt{n}\omega t{)}^{k}}{k!}\\ \phantom{\rule{4em}{0ex}}=I-\frac{M}{n}[exp(\mp i\sqrt{n}\omega t)-1]=\frac{J}{n}-\frac{M}{n}exp(\mp i\sqrt{n}\omega t)\end{array}$

In terms of real functions one then has

$\begin{array}{l}cos\left(\frac{\omega t}{\sqrt{n}}M\right)=\frac{J}{n}-\frac{M}{n}cos\left(\sqrt{n}\omega t\right)\\ sin\left(\frac{\omega t}{\sqrt{n}}M\right)=\frac{M}{n}sin\left(\sqrt{n}\omega t\right)\end{array}$

so that the general solution can be written

$\begin{array}{l}\left[\begin{array}{c}{x}_{1}\\ {x}_{2}\\ \vdots \end{array}\right]=cos\left(\frac{\omega t}{\sqrt{n}}M\right)[\begin{array}{c}{x}_{1}\\ {x}_{2}\\ \vdots \end{array}{]}_{0}-\frac{1}{\sqrt{n}\omega}sin\left(\frac{\omega t}{\sqrt{n}}M\right)[\begin{array}{c}{\stackrel{\xb7}{x}}_{1}\\ {\stackrel{\xb7}{x}}_{2}\\ \vdots \end{array}{]}_{0}\\ \phantom{\left[\begin{array}{c}{x}_{1}\\ {x}_{2}\\ \vdots \end{array}\right]}=[\frac{J}{n}-\frac{M}{n}cos\left(\sqrt{n}\omega t\right)][\begin{array}{c}{x}_{1}\\ {x}_{2}\\ \vdots \end{array}{]}_{0}-\frac{M}{{n}^{3/2}\omega}sin\left(\sqrt{n}\omega t\right)[\begin{array}{c}{\stackrel{\xb7}{x}}_{1}\\ {\stackrel{\xb7}{x}}_{2}\\ \vdots \end{array}{]}_{0}\end{array}$

Although the idempotent matrix *M* is not invertible, one can still multiply both sides of the initial condition for velocity to determine the proper relationship to input values. Note that the entire solution is divided by the number of bodies.

It should be stressed that this solution holds for all Cartesian coordinates and any number of interacting bodies. The system with equal masses and frequencies clearly has a tremendous amount of symmetry.

As a check of the general solution, consider two bodies interacting in one dimension, which is immediately separable:

$\begin{array}{l}{\stackrel{\xb7\xb7}{x}}_{1}=-{\omega}^{2}({x}_{1}-{x}_{2})\\ {\stackrel{\xb7\xb7}{x}}_{2}=-{\omega}^{2}({x}_{2}-{x}_{1})\end{array}\phantom{\rule{3em}{0ex}}\to \phantom{\rule{3em}{0ex}}\begin{array}{l}{\stackrel{\xb7\xb7}{x}}_{1}-{\stackrel{\xb7\xb7}{x}}_{2}=-2{\omega}^{2}({x}_{1}-{x}_{2})\\ {\stackrel{\xb7\xb7}{x}}_{1}+{\stackrel{\xb7\xb7}{x}}_{2}=0\end{array}$

The factor here of two represents a reduced mass. The solutions to these equations are

$\begin{array}{l}{x}_{1}-{x}_{2}=({x}_{1,0}-{x}_{2,0})cos\left(\sqrt{2}\omega t\right)+\frac{{\stackrel{\xb7}{x}}_{1,0}-{\stackrel{\xb7}{x}}_{2,0}}{\sqrt{2}\omega}sin\left(\sqrt{2}\omega t\right)\\ {x}_{1}+{x}_{2}={x}_{1,0}+{x}_{2,0}+({\stackrel{\xb7}{x}}_{1,0}+{\stackrel{\xb7}{x}}_{2,0})t\end{array}$

The individual variables are then determined by adding and subtracting these two expressions. Comparing the result to the general solution indicates that it represents the same motion but with the center of mass unmoving, since there is no term linear in time. This check also indicates the source of the overall denominator of the number of bodies.

And now to see it in action! The frequency is taken as unity because it merely represents a rescaling of the temporal variable. Initial positions and velocities are randomized about the origin, with the velocities adjusted to keep the center of mass at the origin. In two dimensions the evolution of the system looks like this:

The size of the bodies has been increased for legibility, but one can imagine them as points that do not collide. The reset button starts the visualization again with random initial conditions.

Since the motion is completely soluble in terms of simple functions, it is clearly precisely periodic. There is no chaos possible in this system, no matter how many bodies are involved. Quite different from gravitation in this respect!

In three dimensions the evolution of the system looks like this:

Again, the bodies can be imagined as point spheres that do not collide. The coordinate axes are included to provide some perspective for the scene. Apart from the added spatial coordinate, this visualization is essentially the same as the last.

Although this system is simple enough to be exactly soluble, one would still expect it would have something to say about *n*-body problems for other pairwise potentials. To be continued...

*Uploaded 2022.08.30*
analyticphysics.com