Use the package IntroToSymmetry.m to work out the first order Lie-Backlund group of of the Keplerian equations of motion of a particle moving in a spherical inverse square law potential field.

This next command turns off spurious spelling error warnings.

Off[General::spell]

Clear all symbols in the current context.

ClearAll[Evaluate[Context[]<>"*"]]

First read in the package which is located in User Home Folder/Library/Mathematica/Applications/SymmetryAnalysis.

Needs["SymmetryAnalysis`IntroToSymmetry`"]

Enter the list of independent variables.

independentvariables={"t"};

Enter the list of dependent variables.

dependentvariables={"x","y","z"};

Enter the list of function names and/or constant names that need to be preserved when the equations are expressed in terms of generic variables.

frozennames={"a"};

Enter the maximum derivative order.

porder=2;

The maximum derivative order that the infinitesimals are assumed to depend on is specified by the input parameter rorder. This parameter is only nonzero when the user is looking for Lie contact groups or Lie-Backlund groups. For the usual case where one is searching for point groups set rorder=0.

rorder=1;

When searching for Lie-Backlund groups (rorder=1 or greater) one can, without loss of generality, leave the independent variables untransformed. The corresponding infinitesimals (the xse's) are set to zero by setting xseon=0. If one is searching for point groups then set xseon=1. The choice xseon=1 is also an option when looking for Lie-Backlund groups and this can be useful when looking for contact symmetries.

xseon=0;

When searching for Lie-Backlund groups it is necessary to differentiate the input equations to produce derivatives of order porder+rorder and append these higher order differential consequences to the set of rules applied to the invariance condition. This process is carried out automatically when internalrules=1. For point groups the equation or equation system is the only rule or set of rules needed and one sets internalrules=0.

internalrules=1;

ALL of the equations of motion must be applied to EACH invariance condition. Replace the second derivative wherever it appears in the invariance condition.

rulesarray=
{"D[x[t],t,t]->-
a*x[t]/((x[t]^2+y[t]^2+z[t]^2)^(3/2))",
"D[y[t],t,t]->-
a*y[t]/((x[t]^2+y[t]^2+z[t]^2)^(3/2))",
"D[z[t],t,t]->-
a*z[t]/((x[t]^2+y[t]^2+z[t]^2)^(3/2))"};

Enter the first input equation as a string, ie, in quotes.

inputequation1=
"D[x[t],t,t]+a*x[t]/((x[t]^2+y[t]^2+z[t]^2)^(3/2))";

Now work out the determining equations of the Lie point group which leaves inputequation1 invariant. The Mathematica function Timing outputs the time required for the SolveDeterminingEquations function to execute.

Timing[FindDeterminingEquations[
independentvariables,dependentvariables,frozennames,porder,rorder,xseon,
inputequation1,rulesarray,internalrules]]

Here are the determining equations in terms of z-variables and in the form of strings.

zdeterminingequations1=zdeterminingequations;

Enter the second input equation as a string, ie, in quotes.

inputequation2=
"D[y[t],t,t]+a*y[t]/((x[t]^2+y[t]^2+z[t]^2)^(3/2))";

Now work out the determining equations of the Lie point group which leaves inputequation2 invariant.

Timing[FindDeterminingEquations[
independentvariables,dependentvariables,frozennames,porder,rorder,xseon,
inputequation2,rulesarray,internalrules]]

Here are the determining equations in terms of z-variables and in the form of strings.

zdeterminingequations2=zdeterminingequations;

Enter the third input equation as a string, ie, in quotes.

inputequation3=
"D[z[t],t,t]+a*z[t]/((x[t]^2+y[t]^2+z[t]^2)^(3/2))";

Now work out the determining equations of the Lie point group which leaves inputequation3 invariant.

Timing[FindDeterminingEquations[
independentvariables,dependentvariables,frozennames,porder,rorder,xseon,
inputequation3,rulesarray,internalrules]]

Here are the determining equations in terms of z-variables and in the form of strings.

zdeterminingequations3=zdeterminingequations;

zdeterminingequations4=Join[
zdeterminingequations1,
zdeterminingequations2,
zdeterminingequations3];

Length[zdeterminingequations4]

ztableofrules

Here are the determining equations in a slightly more readable form as expressions rather than strings.

zdeteqns=ToExpression[zdeterminingequations4]/.{Sqrt[z2^2+z3^2+z4^2]->rr};

Here is the correspondence between z-variables and conventional variables.

ztableofrules

Now solve the determining equations in terms of multivariable polynomials. The Mathematica function Solve uses Gaussian elimination to solve a large number of linear equations for the polynomial coefficients. The time roughly follows

time/timeref=((number of equations)/(number of equationsref))^n

where the exponent is between 2.4 and 2.7. The Mathematica function Timing outputs the time required for the SolveDeterminingEquations function to execute.

Timing[SolveDeterminingEquations[
independentvariables,dependentvariables,rorder,xseon,zdeterminingequations4,order=3]]

Here are the infinitesimal transformation functions for the independent variables.

xsefunctions

and for the dependent variables.

etafunctions

infinitesimalgroups1=infinitesimalgroups/.
{z1->t,z2->x,z3->y,z4->z,z5->xt,z6->yt,z7->zt};

Check the groups.xse's are on the left,eta's are on the right.

Column[infinitesimalgroups1]

Check the infinitesimals in the determining equations.

Simplify[ToExpression[zdeterminingequations4]]

This is the well known 8 parameter Lie-Backlund group of translation in time, 3-D rotation in space and space-time dilation. The last three items are the infinitesimals of the Runge-Lenz vector.

MaxMemoryUsed[ ]