In this example we use the package IntroToSymmetry.m to work out the point group of the unsteady boundary layer stream function equation, 

Ψyt+ΨyΨxy-ΨxΨyy-UeUex-Uet-nu*Ψyyy=0.

This next function turns off a bunch of spurious spelling error messages

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. Notice we are treating Ue as a dependent variable, in effect making the system underdetermined.

inputequation="D[psi[x,y,t],y,y,y]+
(1/nu)*Ue[x,y,t]*D[Ue[x,y,t],x]+
(1/nu)*D[Ue[x,y,t],t]+
(1/nu)*D[psi[x,y,t],x]*D[psi[x,y,t],y,y]-
(1/nu)*D[psi[x,y,t],y]*D[psi[x,y,t],x,y]-
D[psi[x,y,t],y,t]"

Notice that the dependent variable is taken to be psi instead of  Ψ  that was used in the steady case (see the notebooks just ahead of this one). In running this notebook I had the unsettling experience that Mathematica did not seem to recognize this symbol in this notebook whereas it did in the previous one. Further more the symbol sometimes comes out as Ψ  which looks slightly different on my system. I am not sure what is going on here but it suggests that one may need to shy away from such symbols for variable names.

The function psi[x,y,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. Note the additional rule that makes Ue independent of y.

rulesarray={"D[psi[x,y,t],y,y,y]->-
(1/nu)*Ue[x,y,t]*D[Ue[x,y,t],x]-
(1/nu)*D[Ue[x,y,t],t]-
(1/nu)*D[psi[x,y,t],x]*D[psi[x,y,t],y,y]+
(1/nu)*D[psi[x,y,t],y]*D[psi[x,y,t],x,y]+
D[psi[x,y,t],y,t]","D[Ue[x,y,t],y]->0"}

Enter the list of independent variables.

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

Enter the list of dependent variables.

dependentvariables={"psi","Ue"}

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

frozennames={"nu"};

Enter the maximum derivative order.

p=3;

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 all 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. The Mathematica function Timing outputs the time required for FindDeterminingEquations to execute.

Timing[FindDeterminingEquations[
independentvariables,dependentvariables,frozennames,p,r,xseon,inputequation,rulesarray,internalrules]]

ztableofrules

equationgenericvariables

invarconditiontable

zdeterminingequations;

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 infinitesimal transformation functions for the independent variables.

xsefunctions

and for the dependent variables.

etafunctions

ToExpression[xsefunctions]/.
{z1->x,z2->y,z3->t,z4-> psi,z5->Ue,nu->ν}

ToExpression[etafunctions]/.
{z1->x,z2->y,z3->t,z4-> psi,z5->Ue,nu->ν}

infinitesimalgroupsxy=infinitesimalgroups/.
{z1->x,z2->y,z3->t,z4-> psi,z5->Ue,nu->ν};

Column[infinitesimalgroupsxy]

Check the infinitesimals in the determining equations.

Simplify[ToExpression[zdeterminingequations]]

Note the higher powers of x and t that appear in the transformation of the wall normal coordinate and the stream function. This suggests the existence of an arbitrary function of x and t in the transformations of y and Ψ. Let's remove these terms and look at the commutator table for the simple groups.

infinitesimalgroupsxy1=Extract[
infinitesimalgroupsxy,{{1},{2},{7},{14},{19}}]

Column[infinitesimalgroupsxy1]

MakeCommutatorTable[
independentvariables,dependentvariables,infinitesimalgroupsxy1]

MatrixForm[commutatortable]

MaxMemoryUsed[ ]