In this example we use the package IntroToSymmetry.m to work out the point group of the wave equation in three dimensions

Utt-(c^2)*(Uxx+Uyy+Uzz=0).

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=
"(c^2)*D[u[x,y,z,t],x,x]+(c^2)*D[u[x,y,z,t],y,y]+(c^2)*D[u[x,y,z,t],z,z]-D[u[x,y,z,t],t,t]";

The function u[x, y, z, 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.

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

Enter the list of independent variables.

independentvariables={"x","y","z","t"};

Enter the list of dependent variables.

dependentvariables={"u"};

Enter the list of function and constant names that need to be preserved when the equation is expressed in terms of generic variables.

frozennames={"c"};

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

p=2;

The maximum derivative order that the infinitesimals are assumed to depend on is specified by the input parameter r. 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.

r=0;

When searching for Lie-Backlund groups (r=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=1;

When searching for Lie-Backlund groups it is necessary to differentiate the input equation with respect to each of the independent variables 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=0;

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,p,r,xseon,inputequation,rulesarray,internalrules]]

equationgenericvariables

invarconditiontable

ztableofrules

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

zdeterminingequations

How many determining equations are there?

Length[zdeterminingequations]

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,r,xseon,
zdeterminingequations,order=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]/.{z1->x,z2->y,z3->z, z4->t,z5->u}

Express the eta function in terms of these variables.

ToExpression[etafunctions]/.{z1->x,z2->y,z3->z, z4->t,z5->u}

List the groups.

Column[infinitesimalgroups]/.{z1->x,z2->y,z3->z,z4->t,z5->u}

Let's work out the commutator of the group.

infinitesimalgroupsxu1=infinitesimalgroups/.{z1->x,z2->y,z3->z, z4->t,z5->u};

Drop the groups corresponding to superposition of an arbitrary solution of the equation.

infinitesimalgroupsxu=
Drop[infinitesimalgroupsxu1,{16,45}];

Column[infinitesimalgroupsxu]

Check the infinitesimals in the determining equations.

Simplify[ToExpression[zdeterminingequations]]

Notice the invariance under the Lorentz group represented by the infinitesimals 8, 9 and 10 from the top. These operators correspond to a hyperbolic "rotation" in space and time. The three ordinary rotations in space (infinitesimals 3, 5 and 6) plus infinitesimals 12, 13, 14 and 15 make up the remaining generators of the 10 parameter group of de Sitter space-time isometries. Lets generate the commutator table of the Lie algebra. First let's determine the number of groups.

numberofgroups=Length[infinitesimalgroupsxu]

Now generate the commutator table.

MakeCommutatorTable[
independentvariables,dependentvariables,infinitesimalgroupsxu]

Put the commutator table in readable form.

MatrixForm[commutatortable]

This is the classical multi-parameter group of the 3-D wave equation.

MaxMemoryUsed[ ]