In this example we use the package IntroToSymmetry.m to work out the first order Lie-Backlund symmetries of the axisymmetric wave equation,

 r*Utt-r*Urr-Ur=0.

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 input equation as a string.  Don't include the == 0 at the end.

inputequation=
"r*D[u[r,t],t,t]-r*D[u[r,t],r,r]-D[u[r,t],r]";

The function u[r,t] is a solution of the equation and this constraint must be applied in the form of a rule to the invariance condition. Be careful to check signs. Also be careful to set the rule up so that a second derivative is replaced and not a first derivative. This is necessary because the infinitesimals are now assumed to depend on first derivatives and these need to be free independent variables.

rulesarray=
{"D[u[r,t],r,r]->D[u[r,t],t,t]-(1/r)*D[u[r,t],r]"};

Enter the list of independent variables.

independentvariables={"r","t"};

Enter the list of dependent variables.

dependentvariables={"u"};

Enter the list of function and/or constant names that have to be preserved when the equation is transformed to generic y1[x1,x2] variables.

frozennames={};

Enter the maximum derivative order of the input equation(s).

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 r=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 equation with respect to each independent variable producing derivatives of order p+r. These higher order differential consequences are appended 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;

Now work out the determining equations of the Lie point group that leaves the equation  invariant. The output is available as a table of strings called zdeterminingequations.

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

rulesarrayexpanded

equationgenericvariables

invarconditiontable

ztableofrules

Here are the determining equations expressed in terms of z-variables. This output may be quite long. The equations in the table can be distinguished by the ==0 at the end of each item.

zdeterminingequations

How many determining equations are there?

imax=Length[zdeterminingequations]

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

zdeteqns=TraditionalForm[ToExpression[zdeterminingequations],Left,Below]

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,zdeterminingequations,polyorder=3]]

Here are the infinitesimals for the independent variables expressed in terms of z-variables.

xsefunctions

and the infinitesimals for the dependent variables.

etafunctions

Express the xse functions in terms of x,y variables.

ToExpression[xsefunctions]/.ztableofrules

Express the eta function in terms of these variables.

ToExpression[etafunctions]/.ztableofrules

Here is a list of the various infinitesimal groups.

infinitesimalgroupsxy=infinitesimalgroups/.{z1->r,z2->t,z3->u,z4->ux,z5->ut};

Column[infinitesimalgroupsxy]

Check the infinitesimals in the determining equations.

Simplify[ToExpression[zdeterminingequations]]

In view of the linearity of the equation we can expect that the eta infinitesimal admits a general function and this is evident in the infinitesimals that continue to contain terms of the same order as the expansion polynomial. Drop these terms and look at the remaining groups.

infinitesimalgroupsxy1=
Drop[infinitesimalgroupsxy,{1,4}];

Column[infinitesimalgroupsxy1]

rulesarrayexpanded

MaxMemoryUsed[ ]