In this example, we use the package IntroToSymmetry.m to work out the first-order Lie-Backlund group of a coupled pair of PDEs, the boundary layer stream function equation with a buoyancy induced forcing term,
 
ΨxΨxy-ΨxΨyy-β(ginf/rhoinf)(T-Tinf)-nu*Ψyyy=0, 

and a convection-diffusion equation for the temperature, 

(kappa)Tyy-ΨyTx+ΨxTy=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 equations as strings. The ambient reference temperature is Tinf.

inputequation1="D[psi[x,y],y,y,y]+
(1/nu)*beta*(ginf/rhoinf)*(T[x,y]-Tinf)+
(1/nu)*D[psi[x,y],x]*D[psi[x,y],y,y]-
(1/nu)*D[psi[x,y],y]*D[psi[x,y],x,y]";

inputequation2=
"D[T[x,y],y,y]-
(1/kappa)*D[psi[x,y],y]*D[T[x,y],x]+
(1/kappa)*D[psi[x,y],x]*D[T[x,y],y]";

The functions psi and T satisfy the equation system and these constraints must be applied in the form of a rule to the invariance condition. Be careful to check signs.

rulesarray={"D[psi[x,y],y,y,y]->-(1/nu)*beta*(ginf/rhoinf)*(T[x,y]-Tinf)-(1/nu)*D[psi[x,y],x]*D[psi[x,y],y,y]+(1/nu)*D[psi[x,y],y]*D[psi[x,y],x,y]",
"D[T[x,y],y,y]->(1/kappa)*D[psi[x,y],y]*D[T[x,y],x]-(1/kappa)*D[psi[x,y],x]*D[T[x,y],y]"};

Enter the list of independent variables.

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

Enter the list of dependent variables.

dependentvariables={"psi","T"};

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

frozennames={"Tinf","beta","ginf","kappa","nu","rhoinf"};

Enter the maximum derivative order of the input equation set.

porder=3;

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 equations with respect to 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=1;

Now work out the determining equations of the Lie point group that leaves inputequation1 invariant. The output is available as a table of strings called zdeterminingequations. Notice that rulesarray contains both equations and that therefore both equations in the set are applied to the invariance condition for each equation. The Mathematica function Timing outputs the time required for the FindDeterminingEquations function to execute.

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

Here are the determining equations in terms of z-variables. Set them equal to a new table called zdeterminingequations1.

zdeterminingequations1=zdeterminingequations;

Now work out the determining equations of the 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 zvariables. Set them equal to a new table called zdeterminingequations2.

zdeterminingequations2=zdeterminingequations;

Now concatenate these two sets of determining equations together to form the table zdeterminingequations3 that contains the determining equations for the entire set.

zdeterminingequations3=Join[
zdeterminingequations1,zdeterminingequations2];

How many determining equations are we dealing with?

Length[zdeterminingequations3]

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,zdeterminingequations3,order=3]]

Here are the infinitesimal transformation functions for the independent variables.

xsefunctions

and for the dependent variables.

etafunctions

ToExpression[xsefunctions]

ToExpression[etafunctions]

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

Column[infinitesimalgroups]/.ztableofrules

Check the infinitesimals in the determining equations.

Simplify[ToExpression[zdeterminingequations3]]

Notice that the infinite dimensional translation group on the wall normal coordinate still comes out, ie, this symmetry is not lost when the temperature equation is coupled to the boundary layer equation. This invariance allows the solution on a flat plate to be mapped to an arbitrary shaped wall (within reason). These are the first-order Lie-Backlund groups equivalent to point groups.

MaxMemoryUsed[ ]