In this example we use the package IntroToSymmetry.m to work out the point group of the forced heat equation, 

Uxx-Ut+a*U*Log[U]=0.

First read in the package which is located in a folder called SymmetryAnalysis inside the Mathematica folder.

Needs["SymmetryAnalysis`IntroToSymmetry`"]

Enter the input equation as a string. Don't include the == 0 at the end.

\(\(inputequation = 
"D[u[x,t],x,x]-D[u[x,t],t]+a*u[x,t]*Log[u[x,t]]";\)\)

The function u 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,t],x,x]->D[u[x,t],t]-a*u[x,t]*Log[u[x,t]]"};\)\)

Enter the list of independent variables.

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

Enter the list of dependent variables.

dependentvariables = {"u"};

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

frozennames = {"a", "Log"};

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]]

Let's look at the partial derivatives of the equation that appear in the invariance condition.

invarconditiontable

The program expresses the determining equations in terms of zvariables. Here is the correspondence between z-variables and conventional variables.

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?

Length[zdeterminingequations]

Lets look at the determining equations in a slightly more readable form.

zdeterminingequationscolumn = 
      TraditionalForm[
        ColumnForm[
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, r, 
        xseon, 
zdeterminingequations, 
        order = 4]]

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 -> t, 
        z3 -> u}

Express the eta function in terms of these variables.

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

ColumnForm[infinitesimalgroups] /. {z1 -> x, z2 -> t, 
        z3 -> u}

This process has correctly captured the translation groups (xse,eta)=(1,0,0),(0,1,0) corresponding to the parameters a10 and a20. But the expressions multiplying a11 do not correspond to any relevant group of the equation. The problem here comes from the Logarithmic terms that arise in the determining equations. The determining equations themselves are correct but the SolveDeterminingEquations function is incapable of fully identifying the group of this equation which contains transcendental functions.

To make further progress let's use the following ansatz to try to simplify the determining equations.

xse1[z1_, z2_, z3_] := c1 + f[z2]

xse2[z1_, z2_, z3_] := 0

eta1[z1_, z2_, z3_] := z1*z3*g[z2]

Substitute these functionss into the expression form of the determining equations.

zdeterminingequationscolumn1 = 
      TraditionalForm[
        ColumnForm[
ToExpression[zdeterminingequations], 
          Left, Below]]

Simplify[%]

The first determining equation is uncoupled from the second. Mathematica has the capability of solving such equations.

DSolve[a*g[z2] - g'[z2] == 0, g[z2], z2]

Now try a new ansatz.

xse1[z1_, z2_, z3_] := c1 + f[z2]

xse2[z1_, z2_, z3_] := 0

eta1[z1_, z2_, z3_] := c2*z1*z3*Exp[a*z2]

Substitute these functions into the expression form of the determining equations.

zdeterminingequationscolumn2 = 
      TraditionalForm[
        ColumnForm[
ToExpression[zdeterminingequations], 
          Left, Below]]

DSolve[2*c2*Exp[a*z2] + f'[z2] == 0, f[z2], z2]

Now try.

xse1[z1_, z2_, z3_] := c1 - 2*(c2/a)*Exp[a*z2]

xse2[z1_, z2_, z3_] := c3

eta1[z1_, z2_, z3_] := c2*z1*z3*Exp[a*z2]

zdeterminingequationscolumn3 = 
      TraditionalForm[
        ColumnForm[
ToExpression[zdeterminingequations], 
          Left, Below]]

The ODE seems to be invariant under the three parameter group

xse1[x,t,u]=c1-(2*c2/a)Exp[a*t]
xse2[x,t,u]=c3
eta[x,t,u]=c2*x*u*Exp[a*t].

where c1,c2 and c3 are the group parameters. Let's generate a commutator table for the group. First set up an array of the groups.

infinitesimalgroupsxy = {{{1, 0}, {0}}, {{0, 
            1}, {0}}, 
{{-(2/a)*Exp[a*t], 
            0}, 
{x*u*Exp[a*t]}}}

ColumnForm[infinitesimalgroupsxy]

MakeCommutatorTable[
independentvariables, 
      dependentvariables, infinitesimalgroupsxy]

MatrixForm[commutatortable]

The commutator table seems to suggest the existence of an additional group, namely (0,0,-u*Exp[a*t]). Now try

xse1[z1_, z2_, z3_] := c1 - 2*(c2/a)*Exp[a*z2]

xse2[z1_, z2_, z3_] := c3

eta1[z1_, z2_, z3_] := c2*z1*z3*Exp[a*z2] - c4*z3*Exp[a*z2]

zdeterminingequationscolumn3 = 
      TraditionalForm[
        ColumnForm[
ToExpression[zdeterminingequations], 
          Left, Below]]

Simplify[%]

Indeed there is an additional group! Finally, the ODE is invariant under the four parameter group

xse1[x,t,u]=c1-(2*c2/a)Exp[a*t]
xse2[x,t,u]=c3
eta[x,t,u]=c2*x*u*Exp[a*t]-c4*u*Exp[a*t].

Let's generate a commutator table for the group. First set up an array of the groups.

infinitesimalgroupsxy = {{{1, 0}, {0}}, {{0, 
            1}, {0}}, 
{{-(2/a)*Exp[a*t], 
            0}, 
{x*u*Exp[a*t]}}, {{0, 
            0}, {-u*Exp[a*t]}}}

ColumnForm[infinitesimalgroupsxy]

MakeCommutatorTable[
independentvariables, 
      dependentvariables, infinitesimalgroupsxy]

MatrixForm[commutatortable]

This appears to be the complete group.

MaxMemoryUsed[ ]