# perturbations that preserve constants of motion

Within the context of the gravitational n-body problem I’m interested in perturbations of the initial conditions $\{p_i(0),\dot{p}_i(0)\}_{i=1}^n$   which leave all the constants of motion unchanged.

It’s clear to me that the linear momentum(P) is preserved under any transformation of the initial position vectors and energy(H) is preserved under any isometry applied to initial position vectors. However, when I add the constraint of conserving angular momentum(L), the general nature of these transformations which would leave (H,L, P) unchanged is not clear.

Granted, time translations would preserve the constants of motion but in a trivial manner. Now, I’m not sure whether the approach I’ve taken can be considerably improved but within the context of the three body problem in the plane, I transformed this problem into an optimisation problem as follows:

1. We first calculate the constants of motion which are the linear momentum, energy and the angular momentum prior to perturbing the position of one of the $n$ bodies. Let’s suppose that these constants are given by $C_1, C_2, C_3$.
2. Assuming our bodies are restricted to move in the plane, there are a total of $4n$ scalars that determine the initial conditions for this n-body system. It follows that the perturbation of one body($q$) generally requires searching for a $4n-2$ dimensional vector $x$ for positions and velocities. This can be done using Nelder-Mead, a derivative-free method, provided that we define a cost function.
3. The functions to be minimised are obtained directly from the linear momentum (P), angular momentum (L) and Hamiltonian (H) equations to obtain a single smooth cost function:\begin{aligned} C(x,q) =(P(x,q)-C_1)^2+(H(x,q)-C_2)^2+(L(x,q)-C_3)^2 \end{aligned}
4. In order to increase the probability of convergence, the Nelder-Mead algorithm was randomly seeded for each perturbed position $q$.

I think this method can be easily extended to n-bodies.