(* Content-type: application/mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 7.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       145,          7]
NotebookDataLength[     57552,       1575]
NotebookOptionsPosition[     52148,       1410]
NotebookOutlinePosition[     52978,       1439]
CellTagsIndexPosition[     52935,       1436]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{
Cell[TextData[StyleBox["In this example we use the package IntroToSymmetry.m \
to work out the point group of the 2-D incompressible Navier Stokes \
equations,\n\nUt+U*Ux+VUy+Px-nu*Uxx-nu*Uyy=0,\n\
Vt+U*Vx+V*Vy+Py-nu*Uxx-nu*Uyy=0,\nUx+Vy=0.\n \nP is the kinematic pressure, \
pressure/density.",
 FontSize->14,
 FontWeight->"Plain"]], "Text",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell["\<\
This next command turns off spurious spelling error warnings.\
\>", "Text"],

Cell[BoxData[
 RowBox[{"Off", "[", 
  RowBox[{"General", "::", "spell"}], "]"}]], "Input"],

Cell["Clear all symbols in the current context.", "Text",
 CellChangeTimes->{{3.4715644485587473`*^9, 3.47156448605101*^9}}],

Cell[BoxData[
 RowBox[{"ClearAll", "[", 
  RowBox[{"Evaluate", "[", 
   RowBox[{
    RowBox[{"Context", "[", "]"}], "<>", "\"\<*\>\""}], "]"}], "]"}]], "Input"],

Cell[TextData[{
 StyleBox["First read in the package which is located in User Home \
Folder/Library/",
  FontWeight->"Plain"],
 StyleBox["Mathematica",
  FontWeight->"Plain",
  FontSlant->"Italic"],
 StyleBox["/Applications/SymmetryAnalysis.",
  FontWeight->"Plain"]
}], "Text",
 CellChangeTimes->{{3.472046215957556*^9, 3.472046255573135*^9}, {
  3.472046289795615*^9, 3.472046308115048*^9}, {3.4720466725423717`*^9, 
  3.472046673357225*^9}},
 ImageRegion->{{0, 1}, {0, 1}}],

Cell["Needs[\"SymmetryAnalysis`IntroToSymmetry`\"]", "Input",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[TextData[StyleBox["Enter the list of independent variables.",
 FontWeight->"Plain"]], "Text",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"independentvariables", "=", 
   RowBox[{"{", 
    RowBox[{"\"\<x\>\"", ",", "\"\<y\>\"", ",", "\"\<t\>\""}], "}"}]}], 
  ";"}]], "Input"],

Cell[TextData[StyleBox["Enter the list of dependent variables.",
 FontWeight->"Plain"]], "Text",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"dependentvariables", "=", 
   RowBox[{"{", 
    RowBox[{"\"\<U\>\"", ",", "\"\<V\>\"", ",", "\"\<P\>\""}], "}"}]}], 
  ";"}]], "Input"],

Cell[TextData[StyleBox["Enter the list of function and/or constant names that \
need to be preserved when the equations are expressed in terms of generic \
variables.",
 FontWeight->"Plain"]], "Text",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"frozennames", "=", 
   RowBox[{"{", "\"\<nu\>\"", "}"}]}], ";"}]], "Input"],

Cell[TextData[StyleBox["Enter the maximum derivative order of the input \
equation(s).",
 FontWeight->"Plain"]], "Text",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"porder", "=", "2"}], ";"}]], "Input"],

Cell[TextData[StyleBox["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 rorder=0.",
 FontWeight->"Plain"]], "Text",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"rorder", "=", "0"}], ";"}]], "Input"],

Cell[TextData[StyleBox["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.",
 FontWeight->"Plain"]], "Text",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"xseon", "=", "1"}], ";"}]], "Input"],

Cell[TextData[StyleBox["When searching for Lie-Backlund groups it is \
necessary to differentiate the input equations 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.",
 FontWeight->"Plain"]], "Text",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"internalrules", "=", "0"}], ";"}]], "Input"],

Cell[TextData[StyleBox["Construct the array of rules to be applied to the \
invariance condition.",
 FontWeight->"Plain",
 FontVariations->{"CompatibilityType"->0}]], "Text",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"rulesarray", "=", 
   RowBox[{"{", 
    RowBox[{
    "\"\<D[U[x,y,t],t]\[Rule]-U[x,y,t]*D[U[x,y,t],x]-V[x,y,t]*D[U[x,y,t],y]-D[\
P[x,y,t],x]+\[IndentingNewLine]nu*D[U[x,y,t],x,x]+nu*D[U[x,y,t],y,y]\>\"", 
     ",", "\"\<D[V[x,y,t],t]\[Rule]-U[x,y,t]*D[V[x,y,t],x]-V[x,y,t]*D[V[x,y,t]\
,y]-D[P[x,y,t],y]+\[IndentingNewLine]nu*D[V[x,y,t],x,x]+nu*D[V[x,y,t],y,y]\>\"\
", ",", "\[IndentingNewLine]", "\"\<D[U[x,y,t],x]\[Rule]-D[V[x,y,t],y]\>\""}],
     "}"}]}], ";"}]], "Input"],

Cell["Enter the x-momentum equation as a string.", "Text"],

Cell["\<\
inputequation1=
\"D[U[x,y,t],t]+U[x,y,t]*D[U[x,y,t],x]+V[x,y,t]*D[U[x,y,t],y]+
D[P[x,y,t],x]-nu*D[U[x,y,t],x,x]-nu*D[U[x,y,t],y,y]\";\
\>", "Input",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell["Enter the y-momentum equation as a string.", "Text"],

Cell["\<\
inputequation2=
\"D[V[x,y,t],t]+U[x,y,t]*D[V[x,y,t],x]+V[x,y,t]*D[V[x,y,t],y]+
D[P[x,y,t],y]-nu*D[V[x,y,t],x,x]-nu*D[V[x,y,t],y,y]\";\
\>", "Input",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell["Enter the continuity equation as a string.", "Text"],

Cell["\<\
inputequation3=
\"D[U[x,y,t],x]+D[V[x,y,t],y]\";\
\>", "Input",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell["\<\
Now work out the determining equations of the Lie point group which leaves \
equation1 invariant.\
\>", "Text"],

Cell[CellGroupData[{

Cell["\<\
Timing[FindDeterminingEquations[
independentvariables,dependentvariables,frozennames,porder,rorder,xseon,
inputequation1,rulesarray,internalrules]]\
\>", "Input",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[BoxData[
 InterpretationBox["\<\"The function FindDetermining Equations has begun, the \
memory in use = \\!\\(36058296\\), the time used = \\!\\(15.41123`\\)\"\>",
  StringForm[
  "The function FindDetermining Equations has begun, the memory in use = ``, \
the time used = ``", 36058296, 15.41123],
  Editable->False]], "Print",
 CellChangeTimes->{3.4694786621415*^9, 3.4715709819101963`*^9, 
  3.483787694068775*^9}],

Cell[BoxData["\<\"The function FindDeterminingEquations is nearly complete. \
The invariance condition has been created with all rules applied. The final \
step in the generation of the determining equations is to sum together terms \
in the table of invariance condition terms (called infinitesimaltable) that \
are multiplied by the same combination of products of free y derivatives. The \
result is the table infinitesimaltablesums corresponding to matching \
y-derivative expressions. If the invariance condition is long as it often is \
this process could take a long time since it requires sorting through the \
table infinitesimaltable once for each possible combination of y derivative \
products. This is the rate limiting step in the function \
FindDeterminingEquations.Virtually all other steps are quite fast including \
the generation of the extended derivatives of the infinitesimals.\"\>"], \
"Print",
 CellChangeTimes->{3.4694786621415*^9, 3.4715709819101963`*^9, 
  3.483787695294303*^9}],

Cell[BoxData[
 InterpretationBox["\<\"The determining equations have been expressed in \
terms of z-variables, the length of zdeterminingequations = \\!\\(86\\), the \
byte count of zdeterminingequations = \\!\\(20200\\), the memory in use = \\!\
\\(37514536\\), the time used = \\!\\(16.677004`\\)\"\>",
  StringForm[
  "The determining equations have been expressed in terms of z-variables, the \
length of zdeterminingequations = ``, the byte count of zdeterminingequations \
= ``, the memory in use = ``, the time used = ``", 86, 20200, 37514536, 
   16.677004],
  Editable->False]], "Print",
 CellChangeTimes->{3.4694786621415*^9, 3.4715709819101963`*^9, 
  3.4837876954416*^9}],

Cell[BoxData[
 InterpretationBox["\<\"FindDeterminingEquations is done. The memory in use = \
\\!\\(37517040\\), the time used = \\!\\(16.677350999999998`\\)\"\>",
  StringForm[
  "FindDeterminingEquations is done. The memory in use = ``, the time used = \
``", 37517040, 16.677350999999998`],
  Editable->False]], "Print",
 CellChangeTimes->{3.4694786621415*^9, 3.4715709819101963`*^9, 
  3.48378769544388*^9}],

Cell[BoxData["\<\"FindDeterminingEquations has finished executing. You can \
look at the output in the table zdeterminingequations. Each entry in this \
table is a determining equation in string format expressed in terms of \
z-variables. Rules for converting between z-variables and conventional \
variables are contained in the table ztableofrules. To view the determining \
equations in terms of conventional variables use the command \
ToExpression[zdeterminingequations]/.ztableofrules. There are two other items \
the user may wish to look at; the equation converted to generic \
(x1,x2,...,y1,y2,...) variables is designated equationgenericvariables and \
the various derivatives of the equation that appear in the invariance \
condition can be viewed in the table invarconditiontable. Rules for \
converting between z-variables and generic variables are contained in the \
table ztableofrulesxy.\"\>"], "Print",
 CellChangeTimes->{3.4694786621415*^9, 3.4715709819101963`*^9, 
  3.483787695446048*^9}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"1.26736`", ",", "Null"}], "}"}]], "Output",
 CellChangeTimes->{3.469478663583358*^9, 3.471570983266466*^9, 
  3.483787695448897*^9}]
}, Open  ]],

Cell["The determining equations of equation1.", "Text"],

Cell["zdeterminingequations1=zdeterminingequations;", "Input",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Length", "[", "zdeterminingequations1", "]"}]], "Input"],

Cell[BoxData["86"], "Output",
 CellChangeTimes->{3.4694786637299223`*^9, 3.471570983366419*^9, 
  3.483787695570655*^9}]
}, Open  ]],

Cell["\<\
Now work out the determining equations of the Lie point group which leaves \
equation2 invariant.\
\>", "Text"],

Cell[CellGroupData[{

Cell["\<\
Timing[FindDeterminingEquations[
independentvariables,dependentvariables,frozennames,porder,rorder,xseon,
inputequation2,rulesarray,internalrules]]\
\>", "Input",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[BoxData[
 InterpretationBox["\<\"The function FindDetermining Equations has begun, the \
memory in use = \\!\\(37362024\\), the time used = \\!\\(16.684023`\\)\"\>",
  StringForm[
  "The function FindDetermining Equations has begun, the memory in use = ``, \
the time used = ``", 37362024, 16.684023],
  Editable->False]], "Print",
 CellChangeTimes->{3.469478663766686*^9, 3.4715709834224052`*^9, 
  3.483787695608101*^9}],

Cell[BoxData["\<\"The function FindDeterminingEquations is nearly complete. \
The invariance condition has been created with all rules applied. The final \
step in the generation of the determining equations is to sum together terms \
in the table of invariance condition terms (called infinitesimaltable) that \
are multiplied by the same combination of products of free y derivatives. The \
result is the table infinitesimaltablesums corresponding to matching \
y-derivative expressions. If the invariance condition is long as it often is \
this process could take a long time since it requires sorting through the \
table infinitesimaltable once for each possible combination of y derivative \
products. This is the rate limiting step in the function \
FindDeterminingEquations.Virtually all other steps are quite fast including \
the generation of the extended derivatives of the infinitesimals.\"\>"], \
"Print",
 CellChangeTimes->{3.469478663766686*^9, 3.4715709834224052`*^9, 
  3.483787696859717*^9}],

Cell[BoxData[
 InterpretationBox["\<\"The determining equations have been expressed in \
terms of z-variables, the length of zdeterminingequations = \\!\\(87\\), the \
byte count of zdeterminingequations = \\!\\(20280\\), the memory in use = \\!\
\\(37621088\\), the time used = \\!\\(17.959247`\\)\"\>",
  StringForm[
  "The determining equations have been expressed in terms of z-variables, the \
length of zdeterminingequations = ``, the byte count of zdeterminingequations \
= ``, the memory in use = ``, the time used = ``", 87, 20280, 37621088, 
   17.959247],
  Editable->False]], "Print",
 CellChangeTimes->{3.469478663766686*^9, 3.4715709834224052`*^9, 
  3.483787696996035*^9}],

Cell[BoxData[
 InterpretationBox["\<\"FindDeterminingEquations is done. The memory in use = \
\\!\\(37622576\\), the time used = \\!\\(17.959574999999997`\\)\"\>",
  StringForm[
  "FindDeterminingEquations is done. The memory in use = ``, the time used = \
``", 37622576, 17.959574999999997`],
  Editable->False]], "Print",
 CellChangeTimes->{3.469478663766686*^9, 3.4715709834224052`*^9, 
  3.483787696998303*^9}],

Cell[BoxData["\<\"FindDeterminingEquations has finished executing. You can \
look at the output in the table zdeterminingequations. Each entry in this \
table is a determining equation in string format expressed in terms of \
z-variables. Rules for converting between z-variables and conventional \
variables are contained in the table ztableofrules. To view the determining \
equations in terms of conventional variables use the command \
ToExpression[zdeterminingequations]/.ztableofrules. There are two other items \
the user may wish to look at; the equation converted to generic \
(x1,x2,...,y1,y2,...) variables is designated equationgenericvariables and \
the various derivatives of the equation that appear in the invariance \
condition can be viewed in the table invarconditiontable. Rules for \
converting between z-variables and generic variables are contained in the \
table ztableofrulesxy.\"\>"], "Print",
 CellChangeTimes->{3.469478663766686*^9, 3.4715709834224052`*^9, 
  3.483787697000238*^9}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"1.2768680000000003`", ",", "Null"}], "}"}]], "Output",
 CellChangeTimes->{3.4694786651821012`*^9, 3.471570984788725*^9, 
  3.483787697003015*^9}]
}, Open  ]],

Cell["The determining equations of equation2.", "Text"],

Cell["zdeterminingequations2=zdeterminingequations;", "Input",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Length", "[", "zdeterminingequations2", "]"}]], "Input"],

Cell[BoxData["87"], "Output",
 CellChangeTimes->{3.469478665302458*^9, 3.471570984915875*^9, 
  3.483787697108219*^9}]
}, Open  ]],

Cell["\<\
Now work out the determining equations of the Lie point group which leaves \
equation3 invariant.\
\>", "Text"],

Cell[CellGroupData[{

Cell["\<\
Timing[FindDeterminingEquations[
independentvariables,dependentvariables,frozennames,porder,rorder,xseon,
inputequation3,rulesarray,internalrules]]\
\>", "Input",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[BoxData[
 InterpretationBox["\<\"The function FindDetermining Equations has begun, the \
memory in use = \\!\\(37466792\\), the time used = \\!\\(17.965475`\\)\"\>",
  StringForm[
  "The function FindDetermining Equations has begun, the memory in use = ``, \
the time used = ``", 37466792, 17.965475],
  Editable->False]], "Print",
 CellChangeTimes->{3.469478665342842*^9, 3.471570984952972*^9, 
  3.4837876971461067`*^9}],

Cell[BoxData["\<\"The function FindDeterminingEquations is nearly complete. \
The invariance condition has been created with all rules applied. The final \
step in the generation of the determining equations is to sum together terms \
in the table of invariance condition terms (called infinitesimaltable) that \
are multiplied by the same combination of products of free y derivatives. The \
result is the table infinitesimaltablesums corresponding to matching \
y-derivative expressions. If the invariance condition is long as it often is \
this process could take a long time since it requires sorting through the \
table infinitesimaltable once for each possible combination of y derivative \
products. This is the rate limiting step in the function \
FindDeterminingEquations.Virtually all other steps are quite fast including \
the generation of the extended derivatives of the infinitesimals.\"\>"], \
"Print",
 CellChangeTimes->{3.469478665342842*^9, 3.471570984952972*^9, 
  3.483787697260585*^9}],

Cell[BoxData[
 InterpretationBox["\<\"The determining equations have been expressed in \
terms of z-variables, the length of zdeterminingequations = \\!\\(20\\), the \
byte count of zdeterminingequations = \\!\\(3512\\), the memory in use = \
\\!\\(36357704\\), the time used = \\!\\(18.103627`\\)\"\>",
  StringForm[
  "The determining equations have been expressed in terms of z-variables, the \
length of zdeterminingequations = ``, the byte count of zdeterminingequations \
= ``, the memory in use = ``, the time used = ``", 20, 3512, 36357704, 
   18.103627],
  Editable->False]], "Print",
 CellChangeTimes->{3.469478665342842*^9, 3.471570984952972*^9, 
  3.4837876972931128`*^9}],

Cell[BoxData[
 InterpretationBox["\<\"FindDeterminingEquations is done. The memory in use = \
\\!\\(36358944\\), the time used = \\!\\(18.103966`\\)\"\>",
  StringForm[
  "FindDeterminingEquations is done. The memory in use = ``, the time used = \
``", 36358944, 18.103966],
  Editable->False]], "Print",
 CellChangeTimes->{3.469478665342842*^9, 3.471570984952972*^9, 
  3.483787697295086*^9}],

Cell[BoxData["\<\"FindDeterminingEquations has finished executing. You can \
look at the output in the table zdeterminingequations. Each entry in this \
table is a determining equation in string format expressed in terms of \
z-variables. Rules for converting between z-variables and conventional \
variables are contained in the table ztableofrules. To view the determining \
equations in terms of conventional variables use the command \
ToExpression[zdeterminingequations]/.ztableofrules. There are two other items \
the user may wish to look at; the equation converted to generic \
(x1,x2,...,y1,y2,...) variables is designated equationgenericvariables and \
the various derivatives of the equation that appear in the invariance \
condition can be viewed in the table invarconditiontable. Rules for \
converting between z-variables and generic variables are contained in the \
table ztableofrulesxy.\"\>"], "Print",
 CellChangeTimes->{3.469478665342842*^9, 3.471570984952972*^9, 
  3.4837876972969913`*^9}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"0.13934700000000078`", ",", "Null"}], "}"}]], "Output",
 CellChangeTimes->{3.469478665492992*^9, 3.4715709851674356`*^9, 
  3.483787697299345*^9}]
}, Open  ]],

Cell["The determining equations of equation3.", "Text"],

Cell["zdeterminingequations3=zdeterminingequations;", "Input",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Length", "[", "zdeterminingequations3", "]"}]], "Input"],

Cell[BoxData["20"], "Output",
 CellChangeTimes->{3.469478665553213*^9, 3.471570985282748*^9, 
  3.483787697357637*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell["\<\
zdeterminingequations4=
Join[zdeterminingequations1,
zdeterminingequations2,zdeterminingequations3];\
\>", "Input",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Length", "[", "zdeterminingequations4", "]"}]], "Input"],

Cell[BoxData["193"], "Output",
 CellChangeTimes->{3.4694786656195707`*^9, 3.4715709853667517`*^9, 
  3.483787697424637*^9}]
}, Open  ]]
}, Open  ]],

Cell["\<\
Here is the correspondence between z-variables and conventional variables.\
\>", "Text"],

Cell[CellGroupData[{

Cell["ztableofrules", "Input",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"z1", "\[Rule]", "x"}], ",", 
   RowBox[{"z2", "\[Rule]", "y"}], ",", 
   RowBox[{"z3", "\[Rule]", "t"}], ",", 
   RowBox[{"z4", "\[Rule]", 
    RowBox[{"U", "[", 
     RowBox[{"x", ",", "y", ",", "t"}], "]"}]}], ",", 
   RowBox[{"z5", "\[Rule]", 
    RowBox[{"V", "[", 
     RowBox[{"x", ",", "y", ",", "t"}], "]"}]}], ",", 
   RowBox[{"z6", "\[Rule]", 
    RowBox[{"P", "[", 
     RowBox[{"x", ",", "y", ",", "t"}], "]"}]}]}], "}"}]], "Output",
 CellChangeTimes->{3.4694786656604652`*^9, 3.471570985417686*^9, 
  3.483787697460042*^9}]
}, Open  ]],

Cell["\<\
Now solve the determining equations in terms of multivariable polynomials of \
some selected order. 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. Running this function for, say, orders 1 and 2 permits the time to \
run for orders 3 and higher to be estimated.\
\>", "Text"],

Cell[CellGroupData[{

Cell["\<\
Timing[SolveDeterminingEquations[
independentvariables,dependentvariables,rorder,xseon,zdeterminingequations4,\
order=3]]\
\>", "Input",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[BoxData[
 InterpretationBox["\<\"The variable powertablelength is the number of terms \
required for each multivariate polynomial used for the infinitesimals. This \
number is determined by the choice of polynomial order and the number of \
zvariables. The time needed to solve the determining equations increases as \
powertable increases. powertablelength = \\!\\(84\\)\"\>",
  StringForm[
  "The variable powertablelength is the number of terms required for each \
multivariate polynomial used for the infinitesimals. This number is \
determined by the choice of polynomial order and the number of zvariables. \
The time needed to solve the determining equations increases as powertable \
increases. powertablelength = ``", 84],
  Editable->False]], "Print",
 CellChangeTimes->{3.4694786666232033`*^9, 3.471570985468896*^9, 
  3.4837876974944057`*^9}],

Cell[BoxData["\<\"The polynomial expansions have been substituted into the \
determining equations. It is now time to collect the coefficients of various \
powers of zvariables into a table called table of coefficientsall. This step \
uses the function CoefficientList and is a fairly time consuming procedure.\"\
\>"], "Print",
 CellChangeTimes->{3.4694786666232033`*^9, 3.471570985468896*^9, 
  3.483787698191514*^9}],

Cell[BoxData[
 InterpretationBox["\<\"The memory in use = \\!\\(39089576\\), The time = \\!\
\\(18.770678`\\)\"\>",
  StringForm["The memory in use = ``, The time = ``", 39089576, 18.770678],
  Editable->False]], "Print",
 CellChangeTimes->{3.4694786666232033`*^9, 3.471570985468896*^9, 
  3.483787698192708*^9}],

Cell[BoxData[
 InterpretationBox["\<\"The number of unknown polynomial coefficients = \
\\!\\(504\\)\"\>",
  StringForm["The number of unknown polynomial coefficients = ``", 504],
  Editable->False]], "Print",
 CellChangeTimes->{3.4694786666232033`*^9, 3.471570985468896*^9, 
  3.483787698364664*^9}],

Cell[BoxData[
 InterpretationBox["\<\"The number of equations for the polynomial \
coefficients = \\!\\(2699\\)\"\>",
  StringForm[
  "The number of equations for the polynomial coefficients = ``", 2699],
  Editable->False]], "Print",
 CellChangeTimes->{3.4694786666232033`*^9, 3.471570985468896*^9, 
  3.4837876983976307`*^9}],

Cell[BoxData["\<\"Now it we are ready to use the function Solve to find the \
nonzero polynomial coefficients corresponding to the symmetries of the input \
equation(s). This can take a while.\"\>"], "Print",
 CellChangeTimes->{3.4694786666232033`*^9, 3.471570985468896*^9, 
  3.483787698398899*^9}],

Cell[BoxData[
 InterpretationBox["\<\"The memory in use = \\!\\(39898112\\), The time = \\!\
\\(18.936007999999998`\\)\"\>",
  StringForm[
  "The memory in use = ``, The time = ``", 39898112, 18.936007999999998`],
  Editable->False]], "Print",
 CellChangeTimes->{3.4694786666232033`*^9, 3.471570985468896*^9, 
  3.4837876984000187`*^9}],

Cell[BoxData["\<\"Solve has finished.\"\>"], "Print",
 CellChangeTimes->{3.4694786666232033`*^9, 3.471570985468896*^9, 
  3.483787699484314*^9}],

Cell[BoxData["\<\"The function SolveDeterminingEquations is finished \
executing.\"\>"], "Print",
 CellChangeTimes->{3.4694786666232033`*^9, 3.471570985468896*^9, 
  3.483787699557199*^9}],

Cell[BoxData[
 InterpretationBox["\<\"The memory in use = \\!\\(40187472\\), The time = \\!\
\\(20.00997`\\)\"\>",
  StringForm["The memory in use = ``, The time = ``", 40187472, 20.00997],
  Editable->False]], "Print",
 CellChangeTimes->{3.4694786666232033`*^9, 3.471570985468896*^9, 
  3.483787699558371*^9}],

Cell[BoxData["\<\"You can look at the output in the tables xsefunctions and \
etafunctions. Each entry in these tables is an infinitesimal function in \
string format expressed in terms of z-variables and the group parameters. The \
output can also be viewed with the group parameters stripped away by looking \
at the table infinitesimalgroups. In either case you may wish to convert the \
z-variables to conventional variables using the table ztableofrules. \
\\n\\nKeep in mind that this function only finds solutions of the determining \
equations that are of polynomial form. The determining equations may admit \
solutions that involve transcendental functions and/or integrals. Note that \
arbitrary functions may appear in the infinitesimals and that these can be \
detected by running the package function SolveDeterminingEquations for \
several polynomial orders. If terms of ever increasing order appear, then an \
arbitrary function is indicated.\"\>"], "Print",
 CellChangeTimes->{3.4694786666232033`*^9, 3.471570985468896*^9, 
  3.483787699560361*^9}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"1.9071390000000008`", ",", "Null"}], "}"}]], "Output",
 CellChangeTimes->{3.469478667914023*^9, 3.471570987623942*^9, 
  3.483787699586259*^9}]
}, Open  ]],

Cell["\<\
Here are the infinitesimal transformation functions for the independent \
variables.\
\>", "Text"],

Cell[CellGroupData[{

Cell["xsefunctions", "Input",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"\<\"xse1[z1_, z2_, z3_, z4_, z5_, z6_]=a10 + (a310*z1)/2 - a21*z2 \
+ b10*z3 + (b110*z3^2)/2 + (b116*z3^3)/3\"\>", 
   ",", "\<\"xse2[z1_, z2_, z3_, z4_, z5_, z6_]=a20 + a21*z1 + (a310*z2)/2 + \
b20*z3 + (b210*z3^2)/2 + (b216*z3^3)/3\"\>", 
   ",", "\<\"xse3[z1_, z2_, z3_, z4_, z5_, z6_]=a30 + a310*z3\"\>"}], 
  "}"}]], "Output",
 CellChangeTimes->{3.4694786680294*^9, 3.471570987724833*^9, 
  3.483787699679549*^9}]
}, Open  ]],

Cell["and for the dependent variables.", "Text"],

Cell[CellGroupData[{

Cell["etafunctions", "Input",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"\<\"eta1[z1_, z2_, z3_, z4_, z5_, z6_]=b10 + b110*z3 + b116*z3^2 - \
(a310*z4)/2 - a21*z5\"\>", 
   ",", "\<\"eta2[z1_, z2_, z3_, z4_, z5_, z6_]=b20 + b210*z3 + b216*z3^2 + \
a21*z4 - (a310*z5)/2\"\>", 
   ",", "\<\"eta3[z1_, z2_, z3_, z4_, z5_, z6_]=b30 - b110*z1 - b210*z2 + \
b310*z3 - 2*b116*z1*z3 - 2*b216*z2*z3 + b316*z3^2 + b319*z3^3 - \
a310*z6\"\>"}], "}"}]], "Output",
 CellChangeTimes->{3.469478668069292*^9, 3.471570987761662*^9, 
  3.483787699730094*^9}]
}, Open  ]],

Cell[BoxData[
 RowBox[{
  RowBox[{"infinitesimalgroups1", "=", 
   RowBox[{"infinitesimalgroups", "/.", "\[IndentingNewLine]", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"z1", "\[Rule]", "x"}], ",", 
      RowBox[{"z2", "\[Rule]", "y"}], ",", 
      RowBox[{"z3", "\[Rule]", "t"}], ",", 
      RowBox[{"z4", "\[Rule]", "U"}], ",", 
      RowBox[{"z5", "\[Rule]", "V"}], ",", 
      RowBox[{"z6", "\[Rule]", "P"}]}], "}"}]}]}], ";"}]], "Input"],

Cell["\<\
Check the groups. xse's are on the left, eta's are on the right.\
\>", "Text"],

Cell[BoxData[
 RowBox[{"Column", "[", "infinitesimalgroups1", "]"}]], "Input"],

Cell[BoxData[
 TagBox[GridBox[{
    {
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{"1", ",", "0", ",", "0"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{"0", ",", "0", ",", "0"}], "}"}]}], "}"}]},
    {
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{"0", ",", "1", ",", "0"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{"0", ",", "0", ",", "0"}], "}"}]}], "}"}]},
    {
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
         RowBox[{"-", "y"}], ",", "x", ",", "0"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"-", "V"}], ",", "U", ",", "0"}], "}"}]}], "}"}]},
    {
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{"0", ",", "0", ",", "1"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{"0", ",", "0", ",", "0"}], "}"}]}], "}"}]},
    {
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
         FractionBox["x", "2"], ",", 
         FractionBox["y", "2"], ",", "t"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"-", 
          FractionBox["U", "2"]}], ",", 
         RowBox[{"-", 
          FractionBox["V", "2"]}], ",", 
         RowBox[{"-", "P"}]}], "}"}]}], "}"}]},
    {
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{"t", ",", "0", ",", "0"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{"1", ",", "0", ",", "0"}], "}"}]}], "}"}]},
    {
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
         FractionBox[
          SuperscriptBox["t", "2"], "2"], ",", "0", ",", "0"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{"t", ",", "0", ",", 
         RowBox[{"-", "x"}]}], "}"}]}], "}"}]},
    {
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
         FractionBox[
          SuperscriptBox["t", "3"], "3"], ",", "0", ",", "0"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         SuperscriptBox["t", "2"], ",", "0", ",", 
         RowBox[{
          RowBox[{"-", "2"}], " ", "t", " ", "x"}]}], "}"}]}], "}"}]},
    {
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{"0", ",", "t", ",", "0"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{"0", ",", "1", ",", "0"}], "}"}]}], "}"}]},
    {
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{"0", ",", 
         FractionBox[
          SuperscriptBox["t", "2"], "2"], ",", "0"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{"0", ",", "t", ",", 
         RowBox[{"-", "y"}]}], "}"}]}], "}"}]},
    {
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{"0", ",", 
         FractionBox[
          SuperscriptBox["t", "3"], "3"], ",", "0"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{"0", ",", 
         SuperscriptBox["t", "2"], ",", 
         RowBox[{
          RowBox[{"-", "2"}], " ", "t", " ", "y"}]}], "}"}]}], "}"}]},
    {
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{"0", ",", "0", ",", "0"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{"0", ",", "0", ",", "1"}], "}"}]}], "}"}]},
    {
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{"0", ",", "0", ",", "0"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{"0", ",", "0", ",", "t"}], "}"}]}], "}"}]},
    {
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{"0", ",", "0", ",", "0"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{"0", ",", "0", ",", 
         SuperscriptBox["t", "2"]}], "}"}]}], "}"}]},
    {
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{"0", ",", "0", ",", "0"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{"0", ",", "0", ",", 
         SuperscriptBox["t", "3"]}], "}"}]}], "}"}]}
   },
   GridBoxAlignment->{"Columns" -> {{Left}}},
   GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}],
  "Column"]], "Output",
 CellChangeTimes->{3.46947866813052*^9, 3.471570987822794*^9, 
  3.483787699815567*^9}],

Cell["Check the infinitesimals in the determining equations.", "Text",
 CellChangeTimes->{{3.471145395559845*^9, 3.471145429404257*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Simplify", "[", 
  RowBox[{"ToExpression", "[", "zdeterminingequations", "]"}], "]"}]], "Input",\

 CellChangeTimes->{{3.471145481019026*^9, 3.4711455173104143`*^9}, 
   3.471146122753789*^9, {3.47154140257237*^9, 3.471541418863482*^9}, {
   3.4715667761993*^9, 3.4715667786858253`*^9}, 3.471567789726531*^9, 
   3.471568099275279*^9}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
  "True", ",", "True", ",", "True", ",", "True", ",", "True", ",", "True", 
   ",", "True", ",", "True", ",", "True", ",", "True", ",", "True", ",", 
   "True", ",", "True", ",", "True", ",", "True", ",", "True", ",", "True", 
   ",", "True", ",", "True", ",", "True"}], "}"}]], "Output",
 CellChangeTimes->{3.471570987857996*^9, 3.483787699866315*^9}]
}, Open  ]],

Cell["\<\
The equation is invariant under a single dilation group. Note the increasing \
powers of time that are evidence of arbitrary time dependent translations of \
the spatial coordinates. In addition the pressure admits an arbitrary \
additive function of time. Lets remove these arbitrary functions of time and \
then form the commutator table of the remaining groups.\
\>", "Text"],

Cell[BoxData[
 RowBox[{
  RowBox[{"infinitesimalgroups2", "=", 
   RowBox[{"Drop", "[", 
    RowBox[{"infinitesimalgroups1", ",", 
     RowBox[{"{", 
      RowBox[{"6", ",", "15"}], "}"}]}], "]"}]}], ";"}]], "Input"],

Cell[BoxData[
 RowBox[{"Column", "[", "infinitesimalgroups2", "]"}]], "Input"],

Cell[BoxData[
 TagBox[GridBox[{
    {
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{"1", ",", "0", ",", "0"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{"0", ",", "0", ",", "0"}], "}"}]}], "}"}]},
    {
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{"0", ",", "1", ",", "0"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{"0", ",", "0", ",", "0"}], "}"}]}], "}"}]},
    {
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
         RowBox[{"-", "y"}], ",", "x", ",", "0"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"-", "V"}], ",", "U", ",", "0"}], "}"}]}], "}"}]},
    {
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{"0", ",", "0", ",", "1"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{"0", ",", "0", ",", "0"}], "}"}]}], "}"}]},
    {
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
         FractionBox["x", "2"], ",", 
         FractionBox["y", "2"], ",", "t"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"-", 
          FractionBox["U", "2"]}], ",", 
         RowBox[{"-", 
          FractionBox["V", "2"]}], ",", 
         RowBox[{"-", "P"}]}], "}"}]}], "}"}]}
   },
   GridBoxAlignment->{"Columns" -> {{Left}}},
   GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}],
  "Column"]], "Output",
 CellChangeTimes->{3.469478668196671*^9, 3.471570987922366*^9, 
  3.483787699947527*^9}],

Cell["Create the commutator table.", "Text"],

Cell[BoxData[
 RowBox[{"MakeCommutatorTable", "[", "\[IndentingNewLine]", 
  RowBox[{
  "independentvariables", ",", "dependentvariables", ",", 
   "infinitesimalgroups2"}], "]"}]], "Input"],

Cell[BoxData["\<\"MakeCommutatorTable has finished executing. You can look at \
the output in the table commutatortable. To present the output in the most \
readable form you may want view it as a matrix using \
MatrixForm[commutatortable]. Occasionally the entries in the commutatortable \
will have terms that cancel. To get rid of these terms use the function \
Simplify before viewing the table.\"\>"], "Print",
 CellChangeTimes->{3.469478668232562*^9, 3.471570987962989*^9, 
  3.483787699983036*^9}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"MatrixForm", "[", "commutatortable", "]"}]], "Input"],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{"(", "\[NoBreak]", GridBox[{
         {"0", "0", "0"},
         {"0", "0", "0"}
        },
        GridBoxAlignment->{
         "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
          "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
        GridBoxSpacings->{"Columns" -> {
            Offset[0.27999999999999997`], {
             Offset[0.7]}, 
            Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, 
          "Rows" -> {
            Offset[0.2], {
             Offset[0.4]}, 
            Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", GridBox[{
         {"0", "0", "0"},
         {"0", "0", "0"}
        },
        GridBoxAlignment->{
         "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
          "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
        GridBoxSpacings->{"Columns" -> {
            Offset[0.27999999999999997`], {
             Offset[0.7]}, 
            Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, 
          "Rows" -> {
            Offset[0.2], {
             Offset[0.4]}, 
            Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", GridBox[{
         {"0", "1", "0"},
         {"0", "0", "0"}
        },
        GridBoxAlignment->{
         "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
          "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
        GridBoxSpacings->{"Columns" -> {
            Offset[0.27999999999999997`], {
             Offset[0.7]}, 
            Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, 
          "Rows" -> {
            Offset[0.2], {
             Offset[0.4]}, 
            Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", GridBox[{
         {"0", "0", "0"},
         {"0", "0", "0"}
        },
        GridBoxAlignment->{
         "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
          "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
        GridBoxSpacings->{"Columns" -> {
            Offset[0.27999999999999997`], {
             Offset[0.7]}, 
            Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, 
          "Rows" -> {
            Offset[0.2], {
             Offset[0.4]}, 
            Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", GridBox[{
         {
          FractionBox["1", "2"], "0", "0"},
         {"0", "0", "0"}
        },
        GridBoxAlignment->{
         "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
          "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
        GridBoxSpacings->{"Columns" -> {
            Offset[0.27999999999999997`], {
             Offset[0.7]}, 
            Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, 
          "Rows" -> {
            Offset[0.2], {
             Offset[0.4]}, 
            Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}]},
     {
      RowBox[{"(", "\[NoBreak]", GridBox[{
         {"0", "0", "0"},
         {"0", "0", "0"}
        },
        GridBoxAlignment->{
         "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
          "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
        GridBoxSpacings->{"Columns" -> {
            Offset[0.27999999999999997`], {
             Offset[0.7]}, 
            Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, 
          "Rows" -> {
            Offset[0.2], {
             Offset[0.4]}, 
            Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", GridBox[{
         {"0", "0", "0"},
         {"0", "0", "0"}
        },
        GridBoxAlignment->{
         "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
          "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
        GridBoxSpacings->{"Columns" -> {
            Offset[0.27999999999999997`], {
             Offset[0.7]}, 
            Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, 
          "Rows" -> {
            Offset[0.2], {
             Offset[0.4]}, 
            Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", GridBox[{
         {
          RowBox[{"-", "1"}], "0", "0"},
         {"0", "0", "0"}
        },
        GridBoxAlignment->{
         "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
          "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
        GridBoxSpacings->{"Columns" -> {
            Offset[0.27999999999999997`], {
             Offset[0.7]}, 
            Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, 
          "Rows" -> {
            Offset[0.2], {
             Offset[0.4]}, 
            Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", GridBox[{
         {"0", "0", "0"},
         {"0", "0", "0"}
        },
        GridBoxAlignment->{
         "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
          "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
        GridBoxSpacings->{"Columns" -> {
            Offset[0.27999999999999997`], {
             Offset[0.7]}, 
            Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, 
          "Rows" -> {
            Offset[0.2], {
             Offset[0.4]}, 
            Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", GridBox[{
         {"0", 
          FractionBox["1", "2"], "0"},
         {"0", "0", "0"}
        },
        GridBoxAlignment->{
         "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
          "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
        GridBoxSpacings->{"Columns" -> {
            Offset[0.27999999999999997`], {
             Offset[0.7]}, 
            Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, 
          "Rows" -> {
            Offset[0.2], {
             Offset[0.4]}, 
            Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}]},
     {
      RowBox[{"(", "\[NoBreak]", GridBox[{
         {"0", 
          RowBox[{"-", "1"}], "0"},
         {"0", "0", "0"}
        },
        GridBoxAlignment->{
         "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
          "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
        GridBoxSpacings->{"Columns" -> {
            Offset[0.27999999999999997`], {
             Offset[0.7]}, 
            Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, 
          "Rows" -> {
            Offset[0.2], {
             Offset[0.4]}, 
            Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", GridBox[{
         {"1", "0", "0"},
         {"0", "0", "0"}
        },
        GridBoxAlignment->{
         "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
          "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
        GridBoxSpacings->{"Columns" -> {
            Offset[0.27999999999999997`], {
             Offset[0.7]}, 
            Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, 
          "Rows" -> {
            Offset[0.2], {
             Offset[0.4]}, 
            Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", GridBox[{
         {"0", "0", "0"},
         {"0", "0", "0"}
        },
        GridBoxAlignment->{
         "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
          "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
        GridBoxSpacings->{"Columns" -> {
            Offset[0.27999999999999997`], {
             Offset[0.7]}, 
            Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, 
          "Rows" -> {
            Offset[0.2], {
             Offset[0.4]}, 
            Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", GridBox[{
         {"0", "0", "0"},
         {"0", "0", "0"}
        },
        GridBoxAlignment->{
         "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
          "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
        GridBoxSpacings->{"Columns" -> {
            Offset[0.27999999999999997`], {
             Offset[0.7]}, 
            Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, 
          "Rows" -> {
            Offset[0.2], {
             Offset[0.4]}, 
            Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", GridBox[{
         {"0", "0", "0"},
         {"0", "0", "0"}
        },
        GridBoxAlignment->{
         "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
          "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
        GridBoxSpacings->{"Columns" -> {
            Offset[0.27999999999999997`], {
             Offset[0.7]}, 
            Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, 
          "Rows" -> {
            Offset[0.2], {
             Offset[0.4]}, 
            Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}]},
     {
      RowBox[{"(", "\[NoBreak]", GridBox[{
         {"0", "0", "0"},
         {"0", "0", "0"}
        },
        GridBoxAlignment->{
         "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
          "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
        GridBoxSpacings->{"Columns" -> {
            Offset[0.27999999999999997`], {
             Offset[0.7]}, 
            Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, 
          "Rows" -> {
            Offset[0.2], {
             Offset[0.4]}, 
            Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", GridBox[{
         {"0", "0", "0"},
         {"0", "0", "0"}
        },
        GridBoxAlignment->{
         "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
          "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
        GridBoxSpacings->{"Columns" -> {
            Offset[0.27999999999999997`], {
             Offset[0.7]}, 
            Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, 
          "Rows" -> {
            Offset[0.2], {
             Offset[0.4]}, 
            Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", GridBox[{
         {"0", "0", "0"},
         {"0", "0", "0"}
        },
        GridBoxAlignment->{
         "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
          "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
        GridBoxSpacings->{"Columns" -> {
            Offset[0.27999999999999997`], {
             Offset[0.7]}, 
            Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, 
          "Rows" -> {
            Offset[0.2], {
             Offset[0.4]}, 
            Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", GridBox[{
         {"0", "0", "0"},
         {"0", "0", "0"}
        },
        GridBoxAlignment->{
         "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
          "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
        GridBoxSpacings->{"Columns" -> {
            Offset[0.27999999999999997`], {
             Offset[0.7]}, 
            Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, 
          "Rows" -> {
            Offset[0.2], {
             Offset[0.4]}, 
            Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", GridBox[{
         {"0", "0", "1"},
         {"0", "0", "0"}
        },
        GridBoxAlignment->{
         "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
          "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
        GridBoxSpacings->{"Columns" -> {
            Offset[0.27999999999999997`], {
             Offset[0.7]}, 
            Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, 
          "Rows" -> {
            Offset[0.2], {
             Offset[0.4]}, 
            Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}]},
     {
      RowBox[{"(", "\[NoBreak]", GridBox[{
         {
          RowBox[{"-", 
           FractionBox["1", "2"]}], "0", "0"},
         {"0", "0", "0"}
        },
        GridBoxAlignment->{
         "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
          "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
        GridBoxSpacings->{"Columns" -> {
            Offset[0.27999999999999997`], {
             Offset[0.7]}, 
            Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, 
          "Rows" -> {
            Offset[0.2], {
             Offset[0.4]}, 
            Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", GridBox[{
         {"0", 
          RowBox[{"-", 
           FractionBox["1", "2"]}], "0"},
         {"0", "0", "0"}
        },
        GridBoxAlignment->{
         "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
          "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
        GridBoxSpacings->{"Columns" -> {
            Offset[0.27999999999999997`], {
             Offset[0.7]}, 
            Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, 
          "Rows" -> {
            Offset[0.2], {
             Offset[0.4]}, 
            Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", GridBox[{
         {"0", "0", "0"},
         {"0", "0", "0"}
        },
        GridBoxAlignment->{
         "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
          "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
        GridBoxSpacings->{"Columns" -> {
            Offset[0.27999999999999997`], {
             Offset[0.7]}, 
            Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, 
          "Rows" -> {
            Offset[0.2], {
             Offset[0.4]}, 
            Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", GridBox[{
         {"0", "0", 
          RowBox[{"-", "1"}]},
         {"0", "0", "0"}
        },
        GridBoxAlignment->{
         "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
          "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
        GridBoxSpacings->{"Columns" -> {
            Offset[0.27999999999999997`], {
             Offset[0.7]}, 
            Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, 
          "Rows" -> {
            Offset[0.2], {
             Offset[0.4]}, 
            Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", GridBox[{
         {"0", "0", "0"},
         {"0", "0", "0"}
        },
        GridBoxAlignment->{
         "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
          "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
        GridBoxSpacings->{"Columns" -> {
            Offset[0.27999999999999997`], {
             Offset[0.7]}, 
            Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, 
          "Rows" -> {
            Offset[0.2], {
             Offset[0.4]}, 
            Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}]}
    },
    GridBoxAlignment->{
     "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{3.469478668291649*^9, 3.471570987994463*^9, 
  3.483787700023402*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"MaxMemoryUsed", "[", " ", "]"}]], "Input"],

Cell[BoxData["174097176"], "Output",
 CellChangeTimes->{3.4694786683324327`*^9, 3.471570988028068*^9, 
  3.483787700066258*^9}]
}, Open  ]]
},
WindowToolbars->{},
CellGrouping->Manual,
WindowSize->{863, 840},
WindowMargins->{{49, Automatic}, {Automatic, 24}},
PrintingCopies->1,
PrintingPageRange->{1, Automatic},
PrivateNotebookOptions->{"ColorPalette"->{RGBColor, -1}},
ShowCellLabel->True,
ShowCellTags->False,
RenderingOptions->{"ObjectDithering"->True,
"RasterDithering"->False},
MacintoshSystemPageSetup -> \
"0080009H0UP0000068dB`?oHofXIX1=F;B<5:0?l00;m009H0UP0000068dB`0B`\n\
02d5X5k/02H80@4101P00BL?00400CZodh0000000000P0010000020D00000000\n\
000000?l1BP00000000004T40000200<",
Magnification->1.25,
FrontEndVersion->"7.0 for Mac OS X x86 (32-bit) (February 18, 2009)",
StyleDefinitions->"Default.nb"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[545, 20, 374, 7, 180, "Text"],
Cell[922, 29, 85, 2, 32, "Text"],
Cell[1010, 33, 90, 2, 33, "Input"],
Cell[1103, 37, 124, 1, 32, "Text"],
Cell[1230, 40, 160, 4, 33, "Input"],
Cell[1393, 46, 476, 13, 32, "Text"],
Cell[1872, 61, 93, 1, 33, "Input"],
Cell[1968, 64, 130, 2, 32, "Text"],
Cell[2101, 68, 172, 5, 33, "Input"],
Cell[2276, 75, 128, 2, 32, "Text"],
Cell[2407, 79, 170, 5, 33, "Input"],
Cell[2580, 86, 232, 4, 51, "Text"],
Cell[2815, 92, 110, 3, 33, "Input"],
Cell[2928, 97, 152, 3, 32, "Text"],
Cell[3083, 102, 72, 2, 33, "Input"],
Cell[3158, 106, 395, 6, 70, "Text"],
Cell[3556, 114, 72, 2, 33, "Input"],
Cell[3631, 118, 514, 7, 89, "Text"],
Cell[4148, 127, 71, 2, 33, "Input"],
Cell[4222, 131, 573, 8, 89, "Text"],
Cell[4798, 141, 79, 2, 33, "Input"],
Cell[4880, 145, 206, 4, 32, "Text"],
Cell[5089, 151, 509, 10, 129, "Input"],
Cell[5601, 163, 58, 0, 32, "Text"],
Cell[5662, 165, 190, 5, 66, "Input"],
Cell[5855, 172, 58, 0, 32, "Text"],
Cell[5916, 174, 190, 5, 66, "Input"],
Cell[6109, 181, 58, 0, 32, "Text"],
Cell[6170, 183, 105, 4, 50, "Input"],
Cell[6278, 189, 121, 3, 32, "Text"],
Cell[CellGroupData[{
Cell[6424, 196, 204, 5, 66, "Input"],
Cell[6631, 203, 423, 8, 45, "Print"],
Cell[7057, 213, 1006, 14, 235, "Print"],
Cell[8066, 229, 683, 12, 64, "Print"],
Cell[8752, 243, 411, 8, 45, "Print"],
Cell[9166, 253, 1008, 14, 235, "Print"],
Cell[10177, 269, 172, 4, 33, "Output"]
}, Open  ]],
Cell[10364, 276, 55, 0, 32, "Text"],
Cell[10422, 278, 94, 1, 33, "Input"],
Cell[CellGroupData[{
Cell[10541, 283, 80, 1, 33, "Input"],
Cell[10624, 286, 120, 2, 33, "Output"]
}, Open  ]],
Cell[10759, 291, 121, 3, 32, "Text"],
Cell[CellGroupData[{
Cell[10905, 298, 204, 5, 66, "Input"],
Cell[11112, 305, 427, 8, 45, "Print"],
Cell[11542, 315, 1008, 14, 235, "Print"],
Cell[12553, 331, 687, 12, 64, "Print"],
Cell[13243, 345, 414, 8, 45, "Print"],
Cell[13660, 355, 1010, 14, 235, "Print"],
Cell[14673, 371, 185, 4, 33, "Output"]
}, Open  ]],
Cell[14873, 378, 55, 0, 32, "Text"],
Cell[14931, 380, 94, 1, 33, "Input"],
Cell[CellGroupData[{
Cell[15050, 385, 80, 1, 33, "Input"],
Cell[15133, 388, 118, 2, 33, "Output"]
}, Open  ]],
Cell[15266, 393, 121, 3, 32, "Text"],
Cell[CellGroupData[{
Cell[15412, 400, 204, 5, 66, "Input"],
Cell[15619, 407, 427, 8, 45, "Print"],
Cell[16049, 417, 1006, 14, 235, "Print"],
Cell[17058, 433, 685, 12, 64, "Print"],
Cell[17746, 447, 393, 8, 45, "Print"],
Cell[18142, 457, 1010, 14, 235, "Print"],
Cell[19155, 473, 186, 4, 33, "Output"]
}, Open  ]],
Cell[19356, 480, 55, 0, 32, "Text"],
Cell[19414, 482, 94, 1, 33, "Input"],
Cell[CellGroupData[{
Cell[19533, 487, 80, 1, 33, "Input"],
Cell[19616, 490, 118, 2, 33, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[19771, 497, 157, 5, 66, "Input"],
Cell[CellGroupData[{
Cell[19953, 506, 80, 1, 33, "Input"],
Cell[20036, 509, 123, 2, 33, "Output"]
}, Open  ]]
}, Open  ]],
Cell[20186, 515, 98, 2, 32, "Text"],
Cell[CellGroupData[{
Cell[20309, 521, 62, 1, 33, "Input"],
Cell[20374, 524, 588, 16, 33, "Output"]
}, Open  ]],
Cell[20977, 543, 626, 12, 182, "Text"],
Cell[CellGroupData[{
Cell[21628, 559, 178, 5, 50, "Input"],
Cell[21809, 566, 859, 14, 102, "Print"],
Cell[22671, 582, 419, 6, 83, "Print"],
Cell[23093, 590, 312, 6, 25, "Print"],
Cell[23408, 598, 300, 6, 25, "Print"],
Cell[23711, 606, 327, 7, 25, "Print"],
Cell[24041, 615, 299, 4, 64, "Print"],
Cell[24343, 621, 336, 7, 25, "Print"],
Cell[24682, 630, 144, 2, 25, "Print"],
Cell[24829, 634, 188, 3, 25, "Print"],
Cell[25020, 639, 310, 6, 25, "Print"],
Cell[25333, 647, 1065, 14, 273, "Print"],
Cell[26401, 663, 183, 4, 33, "Output"]
}, Open  ]],
Cell[26599, 670, 108, 3, 32, "Text"],
Cell[CellGroupData[{
Cell[26732, 677, 61, 1, 33, "Input"],
Cell[26796, 680, 458, 9, 110, "Output"]
}, Open  ]],
Cell[27269, 692, 48, 0, 32, "Text"],
Cell[CellGroupData[{
Cell[27342, 696, 61, 1, 33, "Input"],
Cell[27406, 699, 507, 10, 129, "Output"]
}, Open  ]],
Cell[27928, 712, 447, 11, 53, "Input"],
Cell[28378, 725, 88, 2, 32, "Text"],
Cell[28469, 729, 78, 1, 33, "Input"],
Cell[28550, 732, 4025, 139, 399, "Output"],
Cell[32578, 873, 136, 1, 32, "Text"],
Cell[CellGroupData[{
Cell[32739, 878, 359, 7, 33, "Input"],
Cell[33101, 887, 392, 7, 53, "Output"]
}, Open  ]],
Cell[33508, 897, 388, 6, 70, "Text"],
Cell[33899, 905, 216, 6, 33, "Input"],
Cell[34118, 913, 78, 1, 33, "Input"],
Cell[34199, 916, 1500, 51, 123, "Output"],
Cell[35702, 969, 44, 0, 32, "Text"],
Cell[35749, 971, 190, 4, 53, "Input"],
Cell[35942, 977, 504, 7, 102, "Print"],
Cell[CellGroupData[{
Cell[36471, 988, 77, 1, 33, "Input"],
Cell[36551, 991, 15348, 406, 259, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[51936, 1402, 66, 1, 33, "Input"],
Cell[52005, 1405, 127, 2, 33, "Output"]
}, Open  ]]
}
]
*)

(* End of internal cache information *)
