(* 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[     85204,       2703]
NotebookOptionsPosition[     78778,       2497]
NotebookOutlinePosition[     79352,       2520]
CellTagsIndexPosition[     79309,       2517]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{
Cell[TextData[StyleBox["In this example we use the package IntroToSymmetry.m \
to work out point and nonlocalgroups of the potential Korteweg-de Vries \
equation,\n\nUxxx-(1/2)Ux^3-(1/b)Ut=0.\n\nThe nonlocal groups are checked by \
direct substitution in the invariance condition using Mathematica built-in \
functions. The solution of the potential KdV equation generated by summing \
the Lie series is also checked by direct substitution.",
 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 input equation as a string. Don't include \
the ==0 at the end.",
 FontWeight->"Plain"]], "Text",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[BoxData[
 RowBox[{
  RowBox[{
  "inputequation", "=", "\n", 
   "\"\<D[U[x,t],x,x,x]-(1/2)*D[U[x,t],x]^3-(1/b)*D[U[x,t],t]\>\""}], 
  ";"}]], "Input"],

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

Cell[BoxData[
 RowBox[{
  RowBox[{"rulesarray", "=", "\[IndentingNewLine]", 
   RowBox[{
   "{", "\"\<D[U[x,t],x,x,x]->(1/2)*D[U[x,t],x]^3+(1/b)*D[U[x,t],t]\>\"", 
    "}"}]}], ";"}]], "Input"],

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\>\"", ",", "\"\<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[{"{", "\"\<U\>\"", "}"}]}], ";"}]], "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[{"{", "\"\<\>\"", "}"}]}], ";"}]], "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", "=", "3"}], ";"}]], "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 equation to produce derivatives of order \
porder+rorder and append these higher order differential consequences 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["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.",
 FontWeight->"Plain"]], "Text",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Timing", "[", 
  RowBox[{"FindDeterminingEquations", "[", 
   RowBox[{
   "independentvariables", ",", "dependentvariables", ",", "frozennames", ",",
     "porder", ",", "rorder", ",", "xseon", ",", "inputequation", ",", 
    "rulesarray", ",", "internalrules"}], "]"}], "]"}]], "Input"],

Cell[BoxData[
 InterpretationBox["\<\"The function FindDetermining Equations has begun, the \
memory in use = \\!\\(47501248\\), the time used = \\!\\(47.493771`\\)\"\>",
  StringForm[
  "The function FindDetermining Equations has begun, the memory in use = ``, \
the time used = ``", 47501248, 47.493771],
  Editable->False]], "Print",
 CellChangeTimes->{3.469483980690565*^9, 3.471575489111845*^9, 
  3.483804165541512*^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.469483980690565*^9, 3.471575489111845*^9, 
  3.4838041656461897`*^9}],

Cell[BoxData[
 InterpretationBox["\<\"The determining equations have been expressed in \
terms of z-variables, the length of zdeterminingequations = \\!\\(19\\), the \
byte count of zdeterminingequations = \\!\\(2376\\), the memory in use = \
\\!\\(47562640\\), the time used = \\!\\(47.638380000000005`\\)\"\>",
  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 = ``", 19, 2376, 47562640, 
   47.638380000000005`],
  Editable->False]], "Print",
 CellChangeTimes->{3.469483980690565*^9, 3.471575489111845*^9, 
  3.4838041656789103`*^9}],

Cell[BoxData[
 InterpretationBox["\<\"FindDeterminingEquations is done. The memory in use = \
\\!\\(47562664\\), the time used = \\!\\(47.638740000000006`\\)\"\>",
  StringForm[
  "FindDeterminingEquations is done. The memory in use = ``, the time used = \
``", 47562664, 47.638740000000006`],
  Editable->False]], "Print",
 CellChangeTimes->{3.469483980690565*^9, 3.471575489111845*^9, 
  3.483804165681753*^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.469483980690565*^9, 3.471575489111845*^9, 
  3.4838041656842546`*^9}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"0.1459729999999979`", ",", "Null"}], "}"}]], "Output",
 CellChangeTimes->{3.469483980830469*^9, 3.4715754892667103`*^9, 
  3.483804165687808*^9}]
}, Open  ]],

Cell["\<\
Let's look at the partial derivatives of the potential KdV equation that \
appear in the invariance condition.\
\>", "Text"],

Cell[CellGroupData[{

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

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"0", ",", "0", ",", "0", ",", 
   RowBox[{
    RowBox[{"-", 
     FractionBox["3", "2"]}], " ", 
    SuperscriptBox[
     RowBox[{
      SuperscriptBox["y1", 
       TagBox[
        RowBox[{"(", 
         RowBox[{"1", ",", "0"}], ")"}],
        Derivative],
       MultilineFunction->None], "[", 
      RowBox[{"x1", ",", "x2"}], "]"}], "2"]}], ",", 
   RowBox[{"-", 
    FractionBox["1", "b"]}], ",", "0", ",", "0", ",", "0", ",", "1", ",", "0",
    ",", "0", ",", "0"}], "}"}]], "Output",
 CellChangeTimes->{3.4694839808811913`*^9, 3.471575489295979*^9, 
  3.4838041657265177`*^9}]
}, Open  ]],

Cell["Here are the determining equations in terms of z-variables.", "Text"],

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

Cell[CellGroupData[{

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

Cell[BoxData["19"], "Output",
 CellChangeTimes->{3.469483980957451*^9, 3.471575489362463*^9, 
  3.4838041658072157`*^9}]
}, 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]", "t"}], ",", 
   RowBox[{"z3", "\[Rule]", 
    RowBox[{"U", "[", 
     RowBox[{"x", ",", "t"}], "]"}]}]}], "}"}]], "Output",
 CellChangeTimes->{3.469483981014852*^9, 3.4715754893962717`*^9, 
  3.4838041658638372`*^9}]
}, Open  ]],

Cell["\<\
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.\
\>", "Text"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Timing", "[", 
  RowBox[{"SolveDeterminingEquations", "[", 
   RowBox[{
   "independentvariables", ",", "dependentvariables", ",", "rorder", ",", 
    "xseon", ",", "zdeterminingequations", ",", 
    RowBox[{"polyorder", "=", "4"}]}], "]"}], "]"}]], "Input"],

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 = \\!\\(35\\)\"\>",
  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 = ``", 35],
  Editable->False]], "Print",
 CellChangeTimes->{3.4694839810827713`*^9, 3.471575489450817*^9, 
  3.483804165914892*^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.4694839810827713`*^9, 3.471575489450817*^9, 
  3.483804165959895*^9}],

Cell[BoxData[
 InterpretationBox["\<\"The memory in use = \\!\\(47610792\\), The time = \\!\
\\(47.696178`\\)\"\>",
  StringForm["The memory in use = ``, The time = ``", 47610792, 47.696178],
  Editable->False]], "Print",
 CellChangeTimes->{3.4694839810827713`*^9, 3.471575489450817*^9, 
  3.4838041659623404`*^9}],

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

Cell[BoxData[
 InterpretationBox["\<\"The number of equations for the polynomial \
coefficients = \\!\\(283\\)\"\>",
  StringForm[
  "The number of equations for the polynomial coefficients = ``", 283],
  Editable->False]], "Print",
 CellChangeTimes->{3.4694839810827713`*^9, 3.471575489450817*^9, 
  3.483804165965993*^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.4694839810827713`*^9, 3.471575489450817*^9, 
  3.4838041659677677`*^9}],

Cell[BoxData[
 InterpretationBox["\<\"The memory in use = \\!\\(47602032\\), The time = \\!\
\\(47.710834`\\)\"\>",
  StringForm["The memory in use = ``, The time = ``", 47602032, 47.710834],
  Editable->False]], "Print",
 CellChangeTimes->{3.4694839810827713`*^9, 3.471575489450817*^9, 
  3.483804165969829*^9}],

Cell[BoxData["\<\"Solve has finished.\"\>"], "Print",
 CellChangeTimes->{3.4694839810827713`*^9, 3.471575489450817*^9, 
  3.483804165971649*^9}],

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

Cell[BoxData[
 InterpretationBox["\<\"The memory in use = \\!\\(47641288\\), The time = \\!\
\\(47.737755`\\)\"\>",
  StringForm["The memory in use = ``, The time = ``", 47641288, 47.737755],
  Editable->False]], "Print",
 CellChangeTimes->{3.4694839810827713`*^9, 3.471575489450817*^9, 
  3.483804165975194*^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.4694839810827713`*^9, 3.471575489450817*^9, 
  3.483804165976984*^9}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"0.09485499999999547`", ",", "Null"}], "}"}]], "Output",
 CellChangeTimes->{3.4694839811341667`*^9, 3.471575489557108*^9, 
  3.4838041659982653`*^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_]=a10 + (a25*z1)/3\"\>", 
   ",", "\<\"xse2[z1_, z2_, z3_]=a20 + a25*z2\"\>"}], "}"}]], "Output",
 CellChangeTimes->{3.4694839811770487`*^9, 3.471575489597374*^9, 
  3.483804166081759*^9}]
}, Open  ]],

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

Cell[CellGroupData[{

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

Cell[BoxData[
 RowBox[{"{", "\<\"eta1[z1_, z2_, z3_]=b10\"\>", "}"}]], "Output",
 CellChangeTimes->{3.4694839812319593`*^9, 3.471575489634836*^9, 
  3.4838041661421633`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[TextData[StyleBox["Usually the equation is expressed in terms of x, t \
and U.Express the xse functions in terms of these variables.",
 FontWeight->"Plain"]], "Text",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"ToExpression", "[", "xsefunctions", "]"}], "/.", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"z1", "\[Rule]", "x"}], ",", 
    RowBox[{"z2", "\[Rule]", "t"}], ",", 
    RowBox[{"z3", "\[Rule]", "U"}]}], "}"}]}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"a10", "+", 
    FractionBox[
     RowBox[{"a25", " ", "x"}], "3"]}], ",", 
   RowBox[{"a20", "+", 
    RowBox[{"a25", " ", "t"}]}]}], "}"}]], "Output",
 CellChangeTimes->{3.469483981277212*^9, 3.471575489666431*^9, 
  3.4838041662087708`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[TextData[StyleBox["Express the eta function in terms of these variables.",
 FontWeight->"Plain"]], "Text",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"ToExpression", "[", "etafunctions", "]"}], "/.", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"z1", "\[Rule]", "x"}], ",", 
    RowBox[{"z2", "\[Rule]", "t"}], ",", 
    RowBox[{"z3", "\[Rule]", "U"}]}], "}"}]}]], "Input"],

Cell[BoxData[
 RowBox[{"{", "b10", "}"}]], "Output",
 CellChangeTimes->{3.4694839813323803`*^9, 3.471575489701647*^9, 
  3.4838041663589077`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"infinitesimalgroups1", "=", 
  RowBox[{"infinitesimalgroups", "/.", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"z1", "\[Rule]", "x"}], ",", 
     RowBox[{"z2", "\[Rule]", "t"}], ",", 
     RowBox[{"z3", "\[Rule]", "U"}]}], "}"}]}]}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"1", ",", "0"}], "}"}], ",", 
     RowBox[{"{", "0", "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0", ",", "1"}], "}"}], ",", 
     RowBox[{"{", "0", "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       FractionBox["x", "3"], ",", "t"}], "}"}], ",", 
     RowBox[{"{", "0", "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0", ",", "0"}], "}"}], ",", 
     RowBox[{"{", "1", "}"}]}], "}"}]}], "}"}]], "Output",
 CellChangeTimes->{3.469483981458991*^9, 3.471575489813773*^9, 
  3.483804166426814*^9}]
}, Open  ]],

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"}], "}"}], ",", 
       RowBox[{"{", "0", "}"}]}], "}"}]},
    {
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{"0", ",", "1"}], "}"}], ",", 
       RowBox[{"{", "0", "}"}]}], "}"}]},
    {
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
         FractionBox["x", "3"], ",", "t"}], "}"}], ",", 
       RowBox[{"{", "0", "}"}]}], "}"}]},
    {
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{"0", ",", "0"}], "}"}], ",", 
       RowBox[{"{", "1", "}"}]}], "}"}]}
   },
   GridBoxAlignment->{"Columns" -> {{Left}}},
   GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}],
  "Column"]], "Output",
 CellChangeTimes->{3.469483981516885*^9, 3.471575489880385*^9, 
  3.4838041664927263`*^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, 3.4715715735656223`*^9, 3.471572095183077*^9, {
   3.4715726099623337`*^9, 3.471572610792289*^9}, {3.4715729781802893`*^9, 
   3.471572978778569*^9}}],

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

Cell[TextData[StyleBox["This is the four-parameter point group of the \
potential KdV equation. This equation is discussed extensively in Chapter 14 \
and Chapter 16.",
 FontWeight->"Plain"]], "Text",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"MakeCommutatorTable", "[", 
  RowBox[{
  "independentvariables", ",", "dependentvariables", ",", 
   "infinitesimalgroups1"}], "]"}]], "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.469483981561967*^9, 3.47157548998037*^9, 
  3.483804166627055*^9}]
}, Open  ]],

Cell[CellGroupData[{

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

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{"(", "\[NoBreak]", 
       TagBox[GridBox[{
          {
           RowBox[{"{", 
            RowBox[{"0", ",", "0"}], "}"}]},
          {
           RowBox[{"{", "0", "}"}]}
         },
         GridBoxAlignment->{
          "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
           "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
         GridBoxSpacings->{"Columns" -> {
             Offset[0.27999999999999997`], {
              Offset[0.5599999999999999]}, 
             Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
             Offset[0.2], {
              Offset[0.4]}, 
             Offset[0.2]}, "RowsIndexed" -> {}}],
        Column], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", 
       TagBox[GridBox[{
          {
           RowBox[{"{", 
            RowBox[{"0", ",", "0"}], "}"}]},
          {
           RowBox[{"{", "0", "}"}]}
         },
         GridBoxAlignment->{
          "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
           "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
         GridBoxSpacings->{"Columns" -> {
             Offset[0.27999999999999997`], {
              Offset[0.5599999999999999]}, 
             Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
             Offset[0.2], {
              Offset[0.4]}, 
             Offset[0.2]}, "RowsIndexed" -> {}}],
        Column], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", 
       TagBox[GridBox[{
          {
           RowBox[{"{", 
            RowBox[{
             FractionBox["1", "3"], ",", "0"}], "}"}]},
          {
           RowBox[{"{", "0", "}"}]}
         },
         GridBoxAlignment->{
          "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
           "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
         GridBoxSpacings->{"Columns" -> {
             Offset[0.27999999999999997`], {
              Offset[0.5599999999999999]}, 
             Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
             Offset[0.2], {
              Offset[0.4]}, 
             Offset[0.2]}, "RowsIndexed" -> {}}],
        Column], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", 
       TagBox[GridBox[{
          {
           RowBox[{"{", 
            RowBox[{"0", ",", "0"}], "}"}]},
          {
           RowBox[{"{", "0", "}"}]}
         },
         GridBoxAlignment->{
          "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
           "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
         GridBoxSpacings->{"Columns" -> {
             Offset[0.27999999999999997`], {
              Offset[0.5599999999999999]}, 
             Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
             Offset[0.2], {
              Offset[0.4]}, 
             Offset[0.2]}, "RowsIndexed" -> {}}],
        Column], "\[NoBreak]", ")"}]},
     {
      RowBox[{"(", "\[NoBreak]", 
       TagBox[GridBox[{
          {
           RowBox[{"{", 
            RowBox[{"0", ",", "0"}], "}"}]},
          {
           RowBox[{"{", "0", "}"}]}
         },
         GridBoxAlignment->{
          "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
           "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
         GridBoxSpacings->{"Columns" -> {
             Offset[0.27999999999999997`], {
              Offset[0.5599999999999999]}, 
             Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
             Offset[0.2], {
              Offset[0.4]}, 
             Offset[0.2]}, "RowsIndexed" -> {}}],
        Column], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", 
       TagBox[GridBox[{
          {
           RowBox[{"{", 
            RowBox[{"0", ",", "0"}], "}"}]},
          {
           RowBox[{"{", "0", "}"}]}
         },
         GridBoxAlignment->{
          "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
           "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
         GridBoxSpacings->{"Columns" -> {
             Offset[0.27999999999999997`], {
              Offset[0.5599999999999999]}, 
             Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
             Offset[0.2], {
              Offset[0.4]}, 
             Offset[0.2]}, "RowsIndexed" -> {}}],
        Column], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", 
       TagBox[GridBox[{
          {
           RowBox[{"{", 
            RowBox[{"0", ",", "1"}], "}"}]},
          {
           RowBox[{"{", "0", "}"}]}
         },
         GridBoxAlignment->{
          "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
           "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
         GridBoxSpacings->{"Columns" -> {
             Offset[0.27999999999999997`], {
              Offset[0.5599999999999999]}, 
             Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
             Offset[0.2], {
              Offset[0.4]}, 
             Offset[0.2]}, "RowsIndexed" -> {}}],
        Column], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", 
       TagBox[GridBox[{
          {
           RowBox[{"{", 
            RowBox[{"0", ",", "0"}], "}"}]},
          {
           RowBox[{"{", "0", "}"}]}
         },
         GridBoxAlignment->{
          "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
           "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
         GridBoxSpacings->{"Columns" -> {
             Offset[0.27999999999999997`], {
              Offset[0.5599999999999999]}, 
             Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
             Offset[0.2], {
              Offset[0.4]}, 
             Offset[0.2]}, "RowsIndexed" -> {}}],
        Column], "\[NoBreak]", ")"}]},
     {
      RowBox[{"(", "\[NoBreak]", 
       TagBox[GridBox[{
          {
           RowBox[{"{", 
            RowBox[{
             RowBox[{"-", 
              FractionBox["1", "3"]}], ",", "0"}], "}"}]},
          {
           RowBox[{"{", "0", "}"}]}
         },
         GridBoxAlignment->{
          "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
           "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
         GridBoxSpacings->{"Columns" -> {
             Offset[0.27999999999999997`], {
              Offset[0.5599999999999999]}, 
             Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
             Offset[0.2], {
              Offset[0.4]}, 
             Offset[0.2]}, "RowsIndexed" -> {}}],
        Column], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", 
       TagBox[GridBox[{
          {
           RowBox[{"{", 
            RowBox[{"0", ",", 
             RowBox[{"-", "1"}]}], "}"}]},
          {
           RowBox[{"{", "0", "}"}]}
         },
         GridBoxAlignment->{
          "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
           "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
         GridBoxSpacings->{"Columns" -> {
             Offset[0.27999999999999997`], {
              Offset[0.5599999999999999]}, 
             Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
             Offset[0.2], {
              Offset[0.4]}, 
             Offset[0.2]}, "RowsIndexed" -> {}}],
        Column], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", 
       TagBox[GridBox[{
          {
           RowBox[{"{", 
            RowBox[{"0", ",", "0"}], "}"}]},
          {
           RowBox[{"{", "0", "}"}]}
         },
         GridBoxAlignment->{
          "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
           "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
         GridBoxSpacings->{"Columns" -> {
             Offset[0.27999999999999997`], {
              Offset[0.5599999999999999]}, 
             Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
             Offset[0.2], {
              Offset[0.4]}, 
             Offset[0.2]}, "RowsIndexed" -> {}}],
        Column], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", 
       TagBox[GridBox[{
          {
           RowBox[{"{", 
            RowBox[{"0", ",", "0"}], "}"}]},
          {
           RowBox[{"{", "0", "}"}]}
         },
         GridBoxAlignment->{
          "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
           "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
         GridBoxSpacings->{"Columns" -> {
             Offset[0.27999999999999997`], {
              Offset[0.5599999999999999]}, 
             Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
             Offset[0.2], {
              Offset[0.4]}, 
             Offset[0.2]}, "RowsIndexed" -> {}}],
        Column], "\[NoBreak]", ")"}]},
     {
      RowBox[{"(", "\[NoBreak]", 
       TagBox[GridBox[{
          {
           RowBox[{"{", 
            RowBox[{"0", ",", "0"}], "}"}]},
          {
           RowBox[{"{", "0", "}"}]}
         },
         GridBoxAlignment->{
          "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
           "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
         GridBoxSpacings->{"Columns" -> {
             Offset[0.27999999999999997`], {
              Offset[0.5599999999999999]}, 
             Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
             Offset[0.2], {
              Offset[0.4]}, 
             Offset[0.2]}, "RowsIndexed" -> {}}],
        Column], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", 
       TagBox[GridBox[{
          {
           RowBox[{"{", 
            RowBox[{"0", ",", "0"}], "}"}]},
          {
           RowBox[{"{", "0", "}"}]}
         },
         GridBoxAlignment->{
          "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
           "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
         GridBoxSpacings->{"Columns" -> {
             Offset[0.27999999999999997`], {
              Offset[0.5599999999999999]}, 
             Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
             Offset[0.2], {
              Offset[0.4]}, 
             Offset[0.2]}, "RowsIndexed" -> {}}],
        Column], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", 
       TagBox[GridBox[{
          {
           RowBox[{"{", 
            RowBox[{"0", ",", "0"}], "}"}]},
          {
           RowBox[{"{", "0", "}"}]}
         },
         GridBoxAlignment->{
          "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
           "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
         GridBoxSpacings->{"Columns" -> {
             Offset[0.27999999999999997`], {
              Offset[0.5599999999999999]}, 
             Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
             Offset[0.2], {
              Offset[0.4]}, 
             Offset[0.2]}, "RowsIndexed" -> {}}],
        Column], "\[NoBreak]", ")"}], 
      RowBox[{"(", "\[NoBreak]", 
       TagBox[GridBox[{
          {
           RowBox[{"{", 
            RowBox[{"0", ",", "0"}], "}"}]},
          {
           RowBox[{"{", "0", "}"}]}
         },
         GridBoxAlignment->{
          "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
           "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
         GridBoxSpacings->{"Columns" -> {
             Offset[0.27999999999999997`], {
              Offset[0.5599999999999999]}, 
             Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
             Offset[0.2], {
              Offset[0.4]}, 
             Offset[0.2]}, "RowsIndexed" -> {}}],
        Column], "\[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.4694839816192493`*^9, 3.471575490049345*^9, 
  3.4838041666958303`*^9}]
}, Open  ]],

Cell["\<\
*****************************************************************\
\>", "Text"],

Cell[TextData[StyleBox["The package captures the basic point groups of the \
equation but there is also a nonlocal group that we need to determine. Let's \
check this group in the invariance condition. Here is the infinitesimal.",
 FontWeight->"Plain"]], "Text",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"eta1nonlocal1", "[", 
   RowBox[{"x_", ",", "t_"}], "]"}], ":=", 
  RowBox[{"Integrate", "[", 
   RowBox[{
    RowBox[{"Exp", "[", 
     RowBox[{"-", 
      RowBox[{"U", "[", 
       RowBox[{"x", ",", "t"}], "]"}]}], "]"}], ",", "x"}], "]"}]}]], "Input"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"D", "[", 
   RowBox[{
    RowBox[{"eta1nonlocal1", "[", 
     RowBox[{"x", ",", "t"}], "]"}], ",", "t"}], "]"}], "+", 
  RowBox[{
   RowBox[{"(", 
    RowBox[{"3", "*", 
     RowBox[{"b", "/", "2"}]}], ")"}], "*", 
   RowBox[{
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"U", "[", 
       RowBox[{"x", ",", "t"}], "]"}], ",", "x"}], "]"}], "^", "2"}], "*", 
   RowBox[{"D", "[", 
    RowBox[{
     RowBox[{"eta1nonlocal1", "[", 
      RowBox[{"x", ",", "t"}], "]"}], ",", "x"}], "]"}]}], "-", 
  RowBox[{"b", "*", 
   RowBox[{"D", "[", 
    RowBox[{
     RowBox[{"eta1nonlocal1", "[", 
      RowBox[{"x", ",", "t"}], "]"}], ",", "x", ",", "x", ",", "x"}], 
    "]"}]}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"-", 
   RowBox[{"\[Integral]", 
    RowBox[{
     RowBox[{
      SuperscriptBox["\[ExponentialE]", 
       RowBox[{"-", 
        RowBox[{"U", "[", 
         RowBox[{"x", ",", "t"}], "]"}]}]], " ", 
      RowBox[{
       SuperscriptBox["U", 
        TagBox[
         RowBox[{"(", 
          RowBox[{"0", ",", "1"}], ")"}],
         Derivative],
        MultilineFunction->None], "[", 
       RowBox[{"x", ",", "t"}], "]"}]}], 
     RowBox[{"\[DifferentialD]", "x"}]}]}]}], "+", 
  RowBox[{
   FractionBox["3", "2"], " ", "b", " ", 
   SuperscriptBox["\[ExponentialE]", 
    RowBox[{"-", 
     RowBox[{"U", "[", 
      RowBox[{"x", ",", "t"}], "]"}]}]], " ", 
   SuperscriptBox[
    RowBox[{
     SuperscriptBox["U", 
      TagBox[
       RowBox[{"(", 
        RowBox[{"1", ",", "0"}], ")"}],
       Derivative],
      MultilineFunction->None], "[", 
     RowBox[{"x", ",", "t"}], "]"}], "2"]}], "-", 
  RowBox[{"b", " ", 
   RowBox[{"(", 
    RowBox[{
     RowBox[{
      SuperscriptBox["\[ExponentialE]", 
       RowBox[{"-", 
        RowBox[{"U", "[", 
         RowBox[{"x", ",", "t"}], "]"}]}]], " ", 
      SuperscriptBox[
       RowBox[{
        SuperscriptBox["U", 
         TagBox[
          RowBox[{"(", 
           RowBox[{"1", ",", "0"}], ")"}],
          Derivative],
         MultilineFunction->None], "[", 
        RowBox[{"x", ",", "t"}], "]"}], "2"]}], "-", 
     RowBox[{
      SuperscriptBox["\[ExponentialE]", 
       RowBox[{"-", 
        RowBox[{"U", "[", 
         RowBox[{"x", ",", "t"}], "]"}]}]], " ", 
      RowBox[{
       SuperscriptBox["U", 
        TagBox[
         RowBox[{"(", 
          RowBox[{"2", ",", "0"}], ")"}],
         Derivative],
        MultilineFunction->None], "[", 
       RowBox[{"x", ",", "t"}], "]"}]}]}], ")"}]}]}]], "Output",
 CellChangeTimes->{3.469483981817954*^9, 3.471575490790821*^9, 
  3.4838041669640303`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"ExpandAll", "[", "%", "]"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"-", 
   RowBox[{"\[Integral]", 
    RowBox[{
     RowBox[{
      SuperscriptBox["\[ExponentialE]", 
       RowBox[{"-", 
        RowBox[{"U", "[", 
         RowBox[{"x", ",", "t"}], "]"}]}]], " ", 
      RowBox[{
       SuperscriptBox["U", 
        TagBox[
         RowBox[{"(", 
          RowBox[{"0", ",", "1"}], ")"}],
         Derivative],
        MultilineFunction->None], "[", 
       RowBox[{"x", ",", "t"}], "]"}]}], 
     RowBox[{"\[DifferentialD]", "x"}]}]}]}], "+", 
  RowBox[{
   FractionBox["1", "2"], " ", "b", " ", 
   SuperscriptBox["\[ExponentialE]", 
    RowBox[{"-", 
     RowBox[{"U", "[", 
      RowBox[{"x", ",", "t"}], "]"}]}]], " ", 
   SuperscriptBox[
    RowBox[{
     SuperscriptBox["U", 
      TagBox[
       RowBox[{"(", 
        RowBox[{"1", ",", "0"}], ")"}],
       Derivative],
      MultilineFunction->None], "[", 
     RowBox[{"x", ",", "t"}], "]"}], "2"]}], "+", 
  RowBox[{"b", " ", 
   SuperscriptBox["\[ExponentialE]", 
    RowBox[{"-", 
     RowBox[{"U", "[", 
      RowBox[{"x", ",", "t"}], "]"}]}]], " ", 
   RowBox[{
    SuperscriptBox["U", 
     TagBox[
      RowBox[{"(", 
       RowBox[{"2", ",", "0"}], ")"}],
      Derivative],
     MultilineFunction->None], "[", 
    RowBox[{"x", ",", "t"}], "]"}]}]}]], "Output",
 CellChangeTimes->{3.469483981849429*^9, 3.471575490903885*^9, 
  3.4838041670013123`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Cancel", "[", "%", "]"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"-", 
   RowBox[{"\[Integral]", 
    RowBox[{
     RowBox[{
      SuperscriptBox["\[ExponentialE]", 
       RowBox[{"-", 
        RowBox[{"U", "[", 
         RowBox[{"x", ",", "t"}], "]"}]}]], " ", 
      RowBox[{
       SuperscriptBox["U", 
        TagBox[
         RowBox[{"(", 
          RowBox[{"0", ",", "1"}], ")"}],
         Derivative],
        MultilineFunction->None], "[", 
       RowBox[{"x", ",", "t"}], "]"}]}], 
     RowBox[{"\[DifferentialD]", "x"}]}]}]}], "+", 
  RowBox[{
   FractionBox["1", "2"], " ", "b", " ", 
   SuperscriptBox["\[ExponentialE]", 
    RowBox[{"-", 
     RowBox[{"U", "[", 
      RowBox[{"x", ",", "t"}], "]"}]}]], " ", 
   SuperscriptBox[
    RowBox[{
     SuperscriptBox["U", 
      TagBox[
       RowBox[{"(", 
        RowBox[{"1", ",", "0"}], ")"}],
       Derivative],
      MultilineFunction->None], "[", 
     RowBox[{"x", ",", "t"}], "]"}], "2"]}], "+", 
  RowBox[{"b", " ", 
   SuperscriptBox["\[ExponentialE]", 
    RowBox[{"-", 
     RowBox[{"U", "[", 
      RowBox[{"x", ",", "t"}], "]"}]}]], " ", 
   RowBox[{
    SuperscriptBox["U", 
     TagBox[
      RowBox[{"(", 
       RowBox[{"2", ",", "0"}], ")"}],
      Derivative],
     MultilineFunction->None], "[", 
    RowBox[{"x", ",", "t"}], "]"}]}]}]], "Output",
 CellChangeTimes->{3.4694839819009237`*^9, 3.471575490937969*^9, 
  3.4838041670468683`*^9}]
}, Open  ]],

Cell[TextData[StyleBox["This is the integral with respect to x of the \
potential KdV equation multiplied by Exp[-u[x,t]] and so the invariance \
condition is satisfied by the assumed form of the infinitesimal. \
Alternatively, we can use the positive form of the exponential.",
 FontWeight->"Plain",
 FontVariations->{"CompatibilityType"->0}]], "Text",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"eta1nonlocal2", "[", 
   RowBox[{"x_", ",", "t_"}], "]"}], ":=", 
  RowBox[{"Integrate", "[", 
   RowBox[{
    RowBox[{"Exp", "[", 
     RowBox[{"U", "[", 
      RowBox[{"x", ",", "t"}], "]"}], "]"}], ",", "x"}], "]"}]}]], "Input"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"D", "[", 
   RowBox[{
    RowBox[{"eta1nonlocal2", "[", 
     RowBox[{"x", ",", "t"}], "]"}], ",", "t"}], "]"}], "+", 
  RowBox[{
   RowBox[{"(", 
    RowBox[{"3", "*", 
     RowBox[{"b", "/", "2"}]}], ")"}], "*", 
   RowBox[{
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"U", "[", 
       RowBox[{"x", ",", "t"}], "]"}], ",", "x"}], "]"}], "^", "2"}], "*", 
   RowBox[{"D", "[", 
    RowBox[{
     RowBox[{"eta1nonlocal2", "[", 
      RowBox[{"x", ",", "t"}], "]"}], ",", "x"}], "]"}]}], "-", 
  RowBox[{"b", "*", 
   RowBox[{"D", "[", 
    RowBox[{
     RowBox[{"eta1nonlocal2", "[", 
      RowBox[{"x", ",", "t"}], "]"}], ",", "x", ",", "x", ",", "x"}], 
    "]"}]}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"\[Integral]", 
   RowBox[{
    RowBox[{
     SuperscriptBox["\[ExponentialE]", 
      RowBox[{"U", "[", 
       RowBox[{"x", ",", "t"}], "]"}]], " ", 
     RowBox[{
      SuperscriptBox["U", 
       TagBox[
        RowBox[{"(", 
         RowBox[{"0", ",", "1"}], ")"}],
        Derivative],
       MultilineFunction->None], "[", 
      RowBox[{"x", ",", "t"}], "]"}]}], 
    RowBox[{"\[DifferentialD]", "x"}]}]}], "+", 
  RowBox[{
   FractionBox["3", "2"], " ", "b", " ", 
   SuperscriptBox["\[ExponentialE]", 
    RowBox[{"U", "[", 
     RowBox[{"x", ",", "t"}], "]"}]], " ", 
   SuperscriptBox[
    RowBox[{
     SuperscriptBox["U", 
      TagBox[
       RowBox[{"(", 
        RowBox[{"1", ",", "0"}], ")"}],
       Derivative],
      MultilineFunction->None], "[", 
     RowBox[{"x", ",", "t"}], "]"}], "2"]}], "-", 
  RowBox[{"b", " ", 
   RowBox[{"(", 
    RowBox[{
     RowBox[{
      SuperscriptBox["\[ExponentialE]", 
       RowBox[{"U", "[", 
        RowBox[{"x", ",", "t"}], "]"}]], " ", 
      SuperscriptBox[
       RowBox[{
        SuperscriptBox["U", 
         TagBox[
          RowBox[{"(", 
           RowBox[{"1", ",", "0"}], ")"}],
          Derivative],
         MultilineFunction->None], "[", 
        RowBox[{"x", ",", "t"}], "]"}], "2"]}], "+", 
     RowBox[{
      SuperscriptBox["\[ExponentialE]", 
       RowBox[{"U", "[", 
        RowBox[{"x", ",", "t"}], "]"}]], " ", 
      RowBox[{
       SuperscriptBox["U", 
        TagBox[
         RowBox[{"(", 
          RowBox[{"2", ",", "0"}], ")"}],
         Derivative],
        MultilineFunction->None], "[", 
       RowBox[{"x", ",", "t"}], "]"}]}]}], ")"}]}]}]], "Output",
 CellChangeTimes->{3.4694839819612513`*^9, 3.471575490997137*^9, 
  3.483804167128285*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"ExpandAll", "[", "%", "]"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"\[Integral]", 
   RowBox[{
    RowBox[{
     SuperscriptBox["\[ExponentialE]", 
      RowBox[{"U", "[", 
       RowBox[{"x", ",", "t"}], "]"}]], " ", 
     RowBox[{
      SuperscriptBox["U", 
       TagBox[
        RowBox[{"(", 
         RowBox[{"0", ",", "1"}], ")"}],
        Derivative],
       MultilineFunction->None], "[", 
      RowBox[{"x", ",", "t"}], "]"}]}], 
    RowBox[{"\[DifferentialD]", "x"}]}]}], "+", 
  RowBox[{
   FractionBox["1", "2"], " ", "b", " ", 
   SuperscriptBox["\[ExponentialE]", 
    RowBox[{"U", "[", 
     RowBox[{"x", ",", "t"}], "]"}]], " ", 
   SuperscriptBox[
    RowBox[{
     SuperscriptBox["U", 
      TagBox[
       RowBox[{"(", 
        RowBox[{"1", ",", "0"}], ")"}],
       Derivative],
      MultilineFunction->None], "[", 
     RowBox[{"x", ",", "t"}], "]"}], "2"]}], "-", 
  RowBox[{"b", " ", 
   SuperscriptBox["\[ExponentialE]", 
    RowBox[{"U", "[", 
     RowBox[{"x", ",", "t"}], "]"}]], " ", 
   RowBox[{
    SuperscriptBox["U", 
     TagBox[
      RowBox[{"(", 
       RowBox[{"2", ",", "0"}], ")"}],
      Derivative],
     MultilineFunction->None], "[", 
    RowBox[{"x", ",", "t"}], "]"}]}]}]], "Output",
 CellChangeTimes->{3.469483981996821*^9, 3.471575491034198*^9, 
  3.483804167184999*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Cancel", "[", "%", "]"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"\[Integral]", 
   RowBox[{
    RowBox[{
     SuperscriptBox["\[ExponentialE]", 
      RowBox[{"U", "[", 
       RowBox[{"x", ",", "t"}], "]"}]], " ", 
     RowBox[{
      SuperscriptBox["U", 
       TagBox[
        RowBox[{"(", 
         RowBox[{"0", ",", "1"}], ")"}],
        Derivative],
       MultilineFunction->None], "[", 
      RowBox[{"x", ",", "t"}], "]"}]}], 
    RowBox[{"\[DifferentialD]", "x"}]}]}], "+", 
  RowBox[{
   FractionBox["1", "2"], " ", "b", " ", 
   SuperscriptBox["\[ExponentialE]", 
    RowBox[{"U", "[", 
     RowBox[{"x", ",", "t"}], "]"}]], " ", 
   SuperscriptBox[
    RowBox[{
     SuperscriptBox["U", 
      TagBox[
       RowBox[{"(", 
        RowBox[{"1", ",", "0"}], ")"}],
       Derivative],
      MultilineFunction->None], "[", 
     RowBox[{"x", ",", "t"}], "]"}], "2"]}], "-", 
  RowBox[{"b", " ", 
   SuperscriptBox["\[ExponentialE]", 
    RowBox[{"U", "[", 
     RowBox[{"x", ",", "t"}], "]"}]], " ", 
   RowBox[{
    SuperscriptBox["U", 
     TagBox[
      RowBox[{"(", 
       RowBox[{"2", ",", "0"}], ")"}],
      Derivative],
     MultilineFunction->None], "[", 
    RowBox[{"x", ",", "t"}], "]"}]}]}]], "Output",
 CellChangeTimes->{3.469483982051351*^9, 3.471575491070977*^9, 
  3.483804167217499*^9}]
}, Open  ]],

Cell[TextData[StyleBox["Again, this is the integral with respect to x of the \
potential KdV equation multiplied by Exp[u[x,t]]. The invariance checks.",
 FontWeight->"Plain",
 FontVariations->{"CompatibilityType"->0}]], "Text",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[TextData[StyleBox["Or we can use combinations of the exponential for \
example.",
 FontWeight->"Plain",
 FontVariations->{"CompatibilityType"->0}]], "Text",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"eta1nonlocal3", "[", 
   RowBox[{"x_", ",", "t_"}], "]"}], ":=", 
  RowBox[{"Integrate", "[", 
   RowBox[{
    RowBox[{"Sinh", "[", 
     RowBox[{"U", "[", 
      RowBox[{"x", ",", "t"}], "]"}], "]"}], ",", "x"}], "]"}]}]], "Input"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"D", "[", 
   RowBox[{
    RowBox[{"eta1nonlocal3", "[", 
     RowBox[{"x", ",", "t"}], "]"}], ",", "t"}], "]"}], "+", 
  RowBox[{
   RowBox[{"(", 
    RowBox[{"3", "*", 
     RowBox[{"b", "/", "2"}]}], ")"}], "*", 
   RowBox[{
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"U", "[", 
       RowBox[{"x", ",", "t"}], "]"}], ",", "x"}], "]"}], "^", "2"}], "*", 
   RowBox[{"D", "[", 
    RowBox[{
     RowBox[{"eta1nonlocal3", "[", 
      RowBox[{"x", ",", "t"}], "]"}], ",", "x"}], "]"}]}], "-", 
  RowBox[{"b", "*", 
   RowBox[{"D", "[", 
    RowBox[{
     RowBox[{"eta1nonlocal3", "[", 
      RowBox[{"x", ",", "t"}], "]"}], ",", "x", ",", "x", ",", "x"}], 
    "]"}]}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"\[Integral]", 
   RowBox[{
    RowBox[{
     RowBox[{"Cosh", "[", 
      RowBox[{"U", "[", 
       RowBox[{"x", ",", "t"}], "]"}], "]"}], " ", 
     RowBox[{
      SuperscriptBox["U", 
       TagBox[
        RowBox[{"(", 
         RowBox[{"0", ",", "1"}], ")"}],
        Derivative],
       MultilineFunction->None], "[", 
      RowBox[{"x", ",", "t"}], "]"}]}], 
    RowBox[{"\[DifferentialD]", "x"}]}]}], "+", 
  RowBox[{
   FractionBox["3", "2"], " ", "b", " ", 
   RowBox[{"Sinh", "[", 
    RowBox[{"U", "[", 
     RowBox[{"x", ",", "t"}], "]"}], "]"}], " ", 
   SuperscriptBox[
    RowBox[{
     SuperscriptBox["U", 
      TagBox[
       RowBox[{"(", 
        RowBox[{"1", ",", "0"}], ")"}],
       Derivative],
      MultilineFunction->None], "[", 
     RowBox[{"x", ",", "t"}], "]"}], "2"]}], "-", 
  RowBox[{"b", " ", 
   RowBox[{"(", 
    RowBox[{
     RowBox[{
      RowBox[{"Sinh", "[", 
       RowBox[{"U", "[", 
        RowBox[{"x", ",", "t"}], "]"}], "]"}], " ", 
      SuperscriptBox[
       RowBox[{
        SuperscriptBox["U", 
         TagBox[
          RowBox[{"(", 
           RowBox[{"1", ",", "0"}], ")"}],
          Derivative],
         MultilineFunction->None], "[", 
        RowBox[{"x", ",", "t"}], "]"}], "2"]}], "+", 
     RowBox[{
      RowBox[{"Cosh", "[", 
       RowBox[{"U", "[", 
        RowBox[{"x", ",", "t"}], "]"}], "]"}], " ", 
      RowBox[{
       SuperscriptBox["U", 
        TagBox[
         RowBox[{"(", 
          RowBox[{"2", ",", "0"}], ")"}],
         Derivative],
        MultilineFunction->None], "[", 
       RowBox[{"x", ",", "t"}], "]"}]}]}], ")"}]}]}]], "Output",
 CellChangeTimes->{3.469483982163349*^9, 3.4715754911781263`*^9, 
  3.483804167380246*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"ExpandAll", "[", "%", "]"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"\[Integral]", 
   RowBox[{
    RowBox[{
     RowBox[{"Cosh", "[", 
      RowBox[{"U", "[", 
       RowBox[{"x", ",", "t"}], "]"}], "]"}], " ", 
     RowBox[{
      SuperscriptBox["U", 
       TagBox[
        RowBox[{"(", 
         RowBox[{"0", ",", "1"}], ")"}],
        Derivative],
       MultilineFunction->None], "[", 
      RowBox[{"x", ",", "t"}], "]"}]}], 
    RowBox[{"\[DifferentialD]", "x"}]}]}], "+", 
  RowBox[{
   FractionBox["1", "2"], " ", "b", " ", 
   RowBox[{"Sinh", "[", 
    RowBox[{"U", "[", 
     RowBox[{"x", ",", "t"}], "]"}], "]"}], " ", 
   SuperscriptBox[
    RowBox[{
     SuperscriptBox["U", 
      TagBox[
       RowBox[{"(", 
        RowBox[{"1", ",", "0"}], ")"}],
       Derivative],
      MultilineFunction->None], "[", 
     RowBox[{"x", ",", "t"}], "]"}], "2"]}], "-", 
  RowBox[{"b", " ", 
   RowBox[{"Cosh", "[", 
    RowBox[{"U", "[", 
     RowBox[{"x", ",", "t"}], "]"}], "]"}], " ", 
   RowBox[{
    SuperscriptBox["U", 
     TagBox[
      RowBox[{"(", 
       RowBox[{"2", ",", "0"}], ")"}],
      Derivative],
     MultilineFunction->None], "[", 
    RowBox[{"x", ",", "t"}], "]"}]}]}]], "Output",
 CellChangeTimes->{3.469483982197113*^9, 3.471575491217126*^9, 
  3.483804167419655*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Cancel", "[", "%", "]"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"\[Integral]", 
   RowBox[{
    RowBox[{
     RowBox[{"Cosh", "[", 
      RowBox[{"U", "[", 
       RowBox[{"x", ",", "t"}], "]"}], "]"}], " ", 
     RowBox[{
      SuperscriptBox["U", 
       TagBox[
        RowBox[{"(", 
         RowBox[{"0", ",", "1"}], ")"}],
        Derivative],
       MultilineFunction->None], "[", 
      RowBox[{"x", ",", "t"}], "]"}]}], 
    RowBox[{"\[DifferentialD]", "x"}]}]}], "+", 
  RowBox[{
   FractionBox["1", "2"], " ", "b", " ", 
   RowBox[{"Sinh", "[", 
    RowBox[{"U", "[", 
     RowBox[{"x", ",", "t"}], "]"}], "]"}], " ", 
   SuperscriptBox[
    RowBox[{
     SuperscriptBox["U", 
      TagBox[
       RowBox[{"(", 
        RowBox[{"1", ",", "0"}], ")"}],
       Derivative],
      MultilineFunction->None], "[", 
     RowBox[{"x", ",", "t"}], "]"}], "2"]}], "-", 
  RowBox[{"b", " ", 
   RowBox[{"Cosh", "[", 
    RowBox[{"U", "[", 
     RowBox[{"x", ",", "t"}], "]"}], "]"}], " ", 
   RowBox[{
    SuperscriptBox["U", 
     TagBox[
      RowBox[{"(", 
       RowBox[{"2", ",", "0"}], ")"}],
      Derivative],
     MultilineFunction->None], "[", 
    RowBox[{"x", ",", "t"}], "]"}]}]}]], "Output",
 CellChangeTimes->{3.469483982252215*^9, 3.471575491249793*^9, 
  3.4838041674655313`*^9}]
}, Open  ]],

Cell[TextData[StyleBox["This is the integral respect to x of the potential \
KdV equation multiplied by Cosh[u[x,t]. The invariance checks.",
 FontWeight->"Plain",
 FontVariations->{"CompatibilityType"->0}]], "Text",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"eta1nonlocal4", "[", 
   RowBox[{"x_", ",", "t_"}], "]"}], ":=", 
  RowBox[{"Integrate", "[", 
   RowBox[{
    RowBox[{"Cosh", "[", 
     RowBox[{"U", "[", 
      RowBox[{"x", ",", "t"}], "]"}], "]"}], ",", "x"}], "]"}]}]], "Input"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"D", "[", 
   RowBox[{
    RowBox[{"eta1nonlocal4", "[", 
     RowBox[{"x", ",", "t"}], "]"}], ",", "t"}], "]"}], "+", 
  RowBox[{
   RowBox[{"(", 
    RowBox[{"3", "*", 
     RowBox[{"b", "/", "2"}]}], ")"}], "*", 
   RowBox[{
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"U", "[", 
       RowBox[{"x", ",", "t"}], "]"}], ",", "x"}], "]"}], "^", "2"}], "*", 
   RowBox[{"D", "[", 
    RowBox[{
     RowBox[{"eta1nonlocal4", "[", 
      RowBox[{"x", ",", "t"}], "]"}], ",", "x"}], "]"}]}], "-", 
  RowBox[{"b", "*", 
   RowBox[{"D", "[", 
    RowBox[{
     RowBox[{"eta1nonlocal4", "[", 
      RowBox[{"x", ",", "t"}], "]"}], ",", "x", ",", "x", ",", "x"}], 
    "]"}]}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"\[Integral]", 
   RowBox[{
    RowBox[{
     RowBox[{"Sinh", "[", 
      RowBox[{"U", "[", 
       RowBox[{"x", ",", "t"}], "]"}], "]"}], " ", 
     RowBox[{
      SuperscriptBox["U", 
       TagBox[
        RowBox[{"(", 
         RowBox[{"0", ",", "1"}], ")"}],
        Derivative],
       MultilineFunction->None], "[", 
      RowBox[{"x", ",", "t"}], "]"}]}], 
    RowBox[{"\[DifferentialD]", "x"}]}]}], "+", 
  RowBox[{
   FractionBox["3", "2"], " ", "b", " ", 
   RowBox[{"Cosh", "[", 
    RowBox[{"U", "[", 
     RowBox[{"x", ",", "t"}], "]"}], "]"}], " ", 
   SuperscriptBox[
    RowBox[{
     SuperscriptBox["U", 
      TagBox[
       RowBox[{"(", 
        RowBox[{"1", ",", "0"}], ")"}],
       Derivative],
      MultilineFunction->None], "[", 
     RowBox[{"x", ",", "t"}], "]"}], "2"]}], "-", 
  RowBox[{"b", " ", 
   RowBox[{"(", 
    RowBox[{
     RowBox[{
      RowBox[{"Cosh", "[", 
       RowBox[{"U", "[", 
        RowBox[{"x", ",", "t"}], "]"}], "]"}], " ", 
      SuperscriptBox[
       RowBox[{
        SuperscriptBox["U", 
         TagBox[
          RowBox[{"(", 
           RowBox[{"1", ",", "0"}], ")"}],
          Derivative],
         MultilineFunction->None], "[", 
        RowBox[{"x", ",", "t"}], "]"}], "2"]}], "+", 
     RowBox[{
      RowBox[{"Sinh", "[", 
       RowBox[{"U", "[", 
        RowBox[{"x", ",", "t"}], "]"}], "]"}], " ", 
      RowBox[{
       SuperscriptBox["U", 
        TagBox[
         RowBox[{"(", 
          RowBox[{"2", ",", "0"}], ")"}],
         Derivative],
        MultilineFunction->None], "[", 
       RowBox[{"x", ",", "t"}], "]"}]}]}], ")"}]}]}]], "Output",
 CellChangeTimes->{3.469483982329339*^9, 3.471575491315235*^9, 
  3.4838041675471354`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"ExpandAll", "[", "%", "]"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"\[Integral]", 
   RowBox[{
    RowBox[{
     RowBox[{"Sinh", "[", 
      RowBox[{"U", "[", 
       RowBox[{"x", ",", "t"}], "]"}], "]"}], " ", 
     RowBox[{
      SuperscriptBox["U", 
       TagBox[
        RowBox[{"(", 
         RowBox[{"0", ",", "1"}], ")"}],
        Derivative],
       MultilineFunction->None], "[", 
      RowBox[{"x", ",", "t"}], "]"}]}], 
    RowBox[{"\[DifferentialD]", "x"}]}]}], "+", 
  RowBox[{
   FractionBox["1", "2"], " ", "b", " ", 
   RowBox[{"Cosh", "[", 
    RowBox[{"U", "[", 
     RowBox[{"x", ",", "t"}], "]"}], "]"}], " ", 
   SuperscriptBox[
    RowBox[{
     SuperscriptBox["U", 
      TagBox[
       RowBox[{"(", 
        RowBox[{"1", ",", "0"}], ")"}],
       Derivative],
      MultilineFunction->None], "[", 
     RowBox[{"x", ",", "t"}], "]"}], "2"]}], "-", 
  RowBox[{"b", " ", 
   RowBox[{"Sinh", "[", 
    RowBox[{"U", "[", 
     RowBox[{"x", ",", "t"}], "]"}], "]"}], " ", 
   RowBox[{
    SuperscriptBox["U", 
     TagBox[
      RowBox[{"(", 
       RowBox[{"2", ",", "0"}], ")"}],
      Derivative],
     MultilineFunction->None], "[", 
    RowBox[{"x", ",", "t"}], "]"}]}]}]], "Output",
 CellChangeTimes->{3.4694839823871307`*^9, 3.471575491353891*^9, 
  3.4838041676029243`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Cancel", "[", "%", "]"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"\[Integral]", 
   RowBox[{
    RowBox[{
     RowBox[{"Sinh", "[", 
      RowBox[{"U", "[", 
       RowBox[{"x", ",", "t"}], "]"}], "]"}], " ", 
     RowBox[{
      SuperscriptBox["U", 
       TagBox[
        RowBox[{"(", 
         RowBox[{"0", ",", "1"}], ")"}],
        Derivative],
       MultilineFunction->None], "[", 
      RowBox[{"x", ",", "t"}], "]"}]}], 
    RowBox[{"\[DifferentialD]", "x"}]}]}], "+", 
  RowBox[{
   FractionBox["1", "2"], " ", "b", " ", 
   RowBox[{"Cosh", "[", 
    RowBox[{"U", "[", 
     RowBox[{"x", ",", "t"}], "]"}], "]"}], " ", 
   SuperscriptBox[
    RowBox[{
     SuperscriptBox["U", 
      TagBox[
       RowBox[{"(", 
        RowBox[{"1", ",", "0"}], ")"}],
       Derivative],
      MultilineFunction->None], "[", 
     RowBox[{"x", ",", "t"}], "]"}], "2"]}], "-", 
  RowBox[{"b", " ", 
   RowBox[{"Sinh", "[", 
    RowBox[{"U", "[", 
     RowBox[{"x", ",", "t"}], "]"}], "]"}], " ", 
   RowBox[{
    SuperscriptBox["U", 
     TagBox[
      RowBox[{"(", 
       RowBox[{"2", ",", "0"}], ")"}],
      Derivative],
     MultilineFunction->None], "[", 
    RowBox[{"x", ",", "t"}], "]"}]}]}]], "Output",
 CellChangeTimes->{3.469483982513507*^9, 3.4715754913888903`*^9, 
  3.483804167635537*^9}]
}, Open  ]],

Cell[TextData[StyleBox["This is the integral respect to x of the potential \
KdV equation multiplied by Sinh[u[x,t]. The invariance checks.",
 FontWeight->"Plain",
 FontVariations->{"CompatibilityType"->0}]], "Text",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[TextData[StyleBox["By summing the Lie series, this infinitesimal group \
generates a solution of the KdV potential equation in the form of the \
corresponding finite transformation. Let's check this solution in the \
equation. The solution is",
 FontWeight->"Plain",
 FontVariations->{"CompatibilityType"->0}]], "Text",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"Utilda", "[", 
   RowBox[{"x_", ",", "t_"}], "]"}], ":=", 
  RowBox[{
   RowBox[{"U", "[", 
    RowBox[{"x", ",", "t"}], "]"}], "+", 
   RowBox[{"2", "*", 
    RowBox[{"Log", "[", 
     RowBox[{"1", "-", 
      RowBox[{"s", "*", 
       RowBox[{"Integrate", "[", 
        RowBox[{
         RowBox[{"Exp", "[", 
          RowBox[{"-", 
           RowBox[{"U", "[", 
            RowBox[{"x", ",", "t"}], "]"}]}], "]"}], ",", "x"}], "]"}]}]}], 
     "]"}]}]}]}]], "Input"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"D", "[", 
   RowBox[{
    RowBox[{"Utilda", "[", 
     RowBox[{"x", ",", "t"}], "]"}], ",", "t"}], "]"}], "+", 
  RowBox[{
   RowBox[{"(", 
    RowBox[{"b", "/", "2"}], ")"}], "*", 
   RowBox[{
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"Utilda", "[", 
       RowBox[{"x", ",", "t"}], "]"}], ",", "x"}], "]"}], "^", "3"}]}], "-", 
  RowBox[{"b", "*", 
   RowBox[{"D", "[", 
    RowBox[{
     RowBox[{"Utilda", "[", 
      RowBox[{"x", ",", "t"}], "]"}], ",", "x", ",", "x", ",", "x"}], 
    "]"}]}]}]], "Input"],

Cell[BoxData[
 RowBox[{
  FractionBox[
   RowBox[{"2", " ", "s", " ", 
    RowBox[{"\[Integral]", 
     RowBox[{
      RowBox[{
       SuperscriptBox["\[ExponentialE]", 
        RowBox[{"-", 
         RowBox[{"U", "[", 
          RowBox[{"x", ",", "t"}], "]"}]}]], " ", 
       RowBox[{
        SuperscriptBox["U", 
         TagBox[
          RowBox[{"(", 
           RowBox[{"0", ",", "1"}], ")"}],
          Derivative],
         MultilineFunction->None], "[", 
        RowBox[{"x", ",", "t"}], "]"}]}], 
      RowBox[{"\[DifferentialD]", "x"}]}]}]}], 
   RowBox[{"1", "-", 
    RowBox[{"s", " ", 
     RowBox[{"\[Integral]", 
      RowBox[{
       SuperscriptBox["\[ExponentialE]", 
        RowBox[{"-", 
         RowBox[{"U", "[", 
          RowBox[{"x", ",", "t"}], "]"}]}]], 
       RowBox[{"\[DifferentialD]", "x"}]}]}]}]}]], "+", 
  RowBox[{
   SuperscriptBox["U", 
    TagBox[
     RowBox[{"(", 
      RowBox[{"0", ",", "1"}], ")"}],
     Derivative],
    MultilineFunction->None], "[", 
   RowBox[{"x", ",", "t"}], "]"}], "+", 
  RowBox[{
   FractionBox["1", "2"], " ", "b", " ", 
   SuperscriptBox[
    RowBox[{"(", 
     RowBox[{
      RowBox[{"-", 
       FractionBox[
        RowBox[{"2", " ", 
         SuperscriptBox["\[ExponentialE]", 
          RowBox[{"-", 
           RowBox[{"U", "[", 
            RowBox[{"x", ",", "t"}], "]"}]}]], " ", "s"}], 
        RowBox[{"1", "-", 
         RowBox[{"s", " ", 
          RowBox[{"\[Integral]", 
           RowBox[{
            SuperscriptBox["\[ExponentialE]", 
             RowBox[{"-", 
              RowBox[{"U", "[", 
               RowBox[{"x", ",", "t"}], "]"}]}]], 
            RowBox[{"\[DifferentialD]", "x"}]}]}]}]}]]}], "+", 
      RowBox[{
       SuperscriptBox["U", 
        TagBox[
         RowBox[{"(", 
          RowBox[{"1", ",", "0"}], ")"}],
         Derivative],
        MultilineFunction->None], "[", 
       RowBox[{"x", ",", "t"}], "]"}]}], ")"}], "3"]}], "-", 
  RowBox[{"b", " ", 
   RowBox[{"(", 
    RowBox[{
     RowBox[{"-", 
      FractionBox[
       RowBox[{"4", " ", 
        SuperscriptBox["\[ExponentialE]", 
         RowBox[{
          RowBox[{"-", "3"}], " ", 
          RowBox[{"U", "[", 
           RowBox[{"x", ",", "t"}], "]"}]}]], " ", 
        SuperscriptBox["s", "3"]}], 
       SuperscriptBox[
        RowBox[{"(", 
         RowBox[{"1", "-", 
          RowBox[{"s", " ", 
           RowBox[{"\[Integral]", 
            RowBox[{
             SuperscriptBox["\[ExponentialE]", 
              RowBox[{"-", 
               RowBox[{"U", "[", 
                RowBox[{"x", ",", "t"}], "]"}]}]], 
             RowBox[{"\[DifferentialD]", "x"}]}]}]}]}], ")"}], "3"]]}], "+", 
     FractionBox[
      RowBox[{"6", " ", 
       SuperscriptBox["\[ExponentialE]", 
        RowBox[{
         RowBox[{"-", "2"}], " ", 
         RowBox[{"U", "[", 
          RowBox[{"x", ",", "t"}], "]"}]}]], " ", 
       SuperscriptBox["s", "2"], " ", 
       RowBox[{
        SuperscriptBox["U", 
         TagBox[
          RowBox[{"(", 
           RowBox[{"1", ",", "0"}], ")"}],
          Derivative],
         MultilineFunction->None], "[", 
        RowBox[{"x", ",", "t"}], "]"}]}], 
      SuperscriptBox[
       RowBox[{"(", 
        RowBox[{"1", "-", 
         RowBox[{"s", " ", 
          RowBox[{"\[Integral]", 
           RowBox[{
            SuperscriptBox["\[ExponentialE]", 
             RowBox[{"-", 
              RowBox[{"U", "[", 
               RowBox[{"x", ",", "t"}], "]"}]}]], 
            RowBox[{"\[DifferentialD]", "x"}]}]}]}]}], ")"}], "2"]], "-", 
     FractionBox[
      RowBox[{"2", " ", 
       SuperscriptBox["\[ExponentialE]", 
        RowBox[{"-", 
         RowBox[{"U", "[", 
          RowBox[{"x", ",", "t"}], "]"}]}]], " ", "s", " ", 
       SuperscriptBox[
        RowBox[{
         SuperscriptBox["U", 
          TagBox[
           RowBox[{"(", 
            RowBox[{"1", ",", "0"}], ")"}],
           Derivative],
          MultilineFunction->None], "[", 
         RowBox[{"x", ",", "t"}], "]"}], "2"]}], 
      RowBox[{"1", "-", 
       RowBox[{"s", " ", 
        RowBox[{"\[Integral]", 
         RowBox[{
          SuperscriptBox["\[ExponentialE]", 
           RowBox[{"-", 
            RowBox[{"U", "[", 
             RowBox[{"x", ",", "t"}], "]"}]}]], 
          RowBox[{"\[DifferentialD]", "x"}]}]}]}]}]], "+", 
     FractionBox[
      RowBox[{"2", " ", 
       SuperscriptBox["\[ExponentialE]", 
        RowBox[{"-", 
         RowBox[{"U", "[", 
          RowBox[{"x", ",", "t"}], "]"}]}]], " ", "s", " ", 
       RowBox[{
        SuperscriptBox["U", 
         TagBox[
          RowBox[{"(", 
           RowBox[{"2", ",", "0"}], ")"}],
          Derivative],
         MultilineFunction->None], "[", 
        RowBox[{"x", ",", "t"}], "]"}]}], 
      RowBox[{"1", "-", 
       RowBox[{"s", " ", 
        RowBox[{"\[Integral]", 
         RowBox[{
          SuperscriptBox["\[ExponentialE]", 
           RowBox[{"-", 
            RowBox[{"U", "[", 
             RowBox[{"x", ",", "t"}], "]"}]}]], 
          RowBox[{"\[DifferentialD]", "x"}]}]}]}]}]], "+", 
     RowBox[{
      SuperscriptBox["U", 
       TagBox[
        RowBox[{"(", 
         RowBox[{"3", ",", "0"}], ")"}],
        Derivative],
       MultilineFunction->None], "[", 
      RowBox[{"x", ",", "t"}], "]"}]}], ")"}]}]}]], "Output",
 CellChangeTimes->{3.469483982582405*^9, 3.4715754914486732`*^9, 
  3.483804167714925*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"ExpandAll", "[", "%", "]"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"-", 
   FractionBox[
    RowBox[{"4", " ", "b", " ", 
     SuperscriptBox["s", "3"]}], 
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{
       SuperscriptBox["\[ExponentialE]", 
        RowBox[{"U", "[", 
         RowBox[{"x", ",", "t"}], "]"}]], "-", 
       RowBox[{
        SuperscriptBox["\[ExponentialE]", 
         RowBox[{"U", "[", 
          RowBox[{"x", ",", "t"}], "]"}]], " ", "s", " ", 
        RowBox[{"\[Integral]", 
         RowBox[{
          SuperscriptBox["\[ExponentialE]", 
           RowBox[{"-", 
            RowBox[{"U", "[", 
             RowBox[{"x", ",", "t"}], "]"}]}]], 
          RowBox[{"\[DifferentialD]", "x"}]}]}]}]}], ")"}], "3"]]}], "+", 
  FractionBox[
   RowBox[{"4", " ", "b", " ", 
    SuperscriptBox["s", "3"]}], 
   RowBox[{
    SuperscriptBox["\[ExponentialE]", 
     RowBox[{"3", " ", 
      RowBox[{"U", "[", 
       RowBox[{"x", ",", "t"}], "]"}]}]], "-", 
    RowBox[{"3", " ", 
     SuperscriptBox["\[ExponentialE]", 
      RowBox[{"3", " ", 
       RowBox[{"U", "[", 
        RowBox[{"x", ",", "t"}], "]"}]}]], " ", "s", " ", 
     RowBox[{"\[Integral]", 
      RowBox[{
       SuperscriptBox["\[ExponentialE]", 
        RowBox[{"-", 
         RowBox[{"U", "[", 
          RowBox[{"x", ",", "t"}], "]"}]}]], 
       RowBox[{"\[DifferentialD]", "x"}]}]}]}], "+", 
    RowBox[{"3", " ", 
     SuperscriptBox["\[ExponentialE]", 
      RowBox[{"3", " ", 
       RowBox[{"U", "[", 
        RowBox[{"x", ",", "t"}], "]"}]}]], " ", 
     SuperscriptBox["s", "2"], " ", 
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"\[Integral]", 
        RowBox[{
         SuperscriptBox["\[ExponentialE]", 
          RowBox[{"-", 
           RowBox[{"U", "[", 
            RowBox[{"x", ",", "t"}], "]"}]}]], 
         RowBox[{"\[DifferentialD]", "x"}]}]}], ")"}], "2"]}], "-", 
    RowBox[{
     SuperscriptBox["\[ExponentialE]", 
      RowBox[{"3", " ", 
       RowBox[{"U", "[", 
        RowBox[{"x", ",", "t"}], "]"}]}]], " ", 
     SuperscriptBox["s", "3"], " ", 
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"\[Integral]", 
        RowBox[{
         SuperscriptBox["\[ExponentialE]", 
          RowBox[{"-", 
           RowBox[{"U", "[", 
            RowBox[{"x", ",", "t"}], "]"}]}]], 
         RowBox[{"\[DifferentialD]", "x"}]}]}], ")"}], "3"]}]}]], "+", 
  FractionBox[
   RowBox[{"2", " ", "s", " ", 
    RowBox[{"\[Integral]", 
     RowBox[{
      RowBox[{
       SuperscriptBox["\[ExponentialE]", 
        RowBox[{"-", 
         RowBox[{"U", "[", 
          RowBox[{"x", ",", "t"}], "]"}]}]], " ", 
       RowBox[{
        SuperscriptBox["U", 
         TagBox[
          RowBox[{"(", 
           RowBox[{"0", ",", "1"}], ")"}],
          Derivative],
         MultilineFunction->None], "[", 
        RowBox[{"x", ",", "t"}], "]"}]}], 
      RowBox[{"\[DifferentialD]", "x"}]}]}]}], 
   RowBox[{"1", "-", 
    RowBox[{"s", " ", 
     RowBox[{"\[Integral]", 
      RowBox[{
       SuperscriptBox["\[ExponentialE]", 
        RowBox[{"-", 
         RowBox[{"U", "[", 
          RowBox[{"x", ",", "t"}], "]"}]}]], 
       RowBox[{"\[DifferentialD]", "x"}]}]}]}]}]], "+", 
  RowBox[{
   SuperscriptBox["U", 
    TagBox[
     RowBox[{"(", 
      RowBox[{"0", ",", "1"}], ")"}],
     Derivative],
    MultilineFunction->None], "[", 
   RowBox[{"x", ",", "t"}], "]"}], "+", 
  FractionBox[
   RowBox[{"6", " ", "b", " ", 
    SuperscriptBox["s", "2"], " ", 
    RowBox[{
     SuperscriptBox["U", 
      TagBox[
       RowBox[{"(", 
        RowBox[{"1", ",", "0"}], ")"}],
       Derivative],
      MultilineFunction->None], "[", 
     RowBox[{"x", ",", "t"}], "]"}]}], 
   SuperscriptBox[
    RowBox[{"(", 
     RowBox[{
      SuperscriptBox["\[ExponentialE]", 
       RowBox[{"U", "[", 
        RowBox[{"x", ",", "t"}], "]"}]], "-", 
      RowBox[{
       SuperscriptBox["\[ExponentialE]", 
        RowBox[{"U", "[", 
         RowBox[{"x", ",", "t"}], "]"}]], " ", "s", " ", 
       RowBox[{"\[Integral]", 
        RowBox[{
         SuperscriptBox["\[ExponentialE]", 
          RowBox[{"-", 
           RowBox[{"U", "[", 
            RowBox[{"x", ",", "t"}], "]"}]}]], 
         RowBox[{"\[DifferentialD]", "x"}]}]}]}]}], ")"}], "2"]], "-", 
  FractionBox[
   RowBox[{"6", " ", "b", " ", 
    SuperscriptBox["s", "2"], " ", 
    RowBox[{
     SuperscriptBox["U", 
      TagBox[
       RowBox[{"(", 
        RowBox[{"1", ",", "0"}], ")"}],
       Derivative],
      MultilineFunction->None], "[", 
     RowBox[{"x", ",", "t"}], "]"}]}], 
   RowBox[{
    SuperscriptBox["\[ExponentialE]", 
     RowBox[{"2", " ", 
      RowBox[{"U", "[", 
       RowBox[{"x", ",", "t"}], "]"}]}]], "-", 
    RowBox[{"2", " ", 
     SuperscriptBox["\[ExponentialE]", 
      RowBox[{"2", " ", 
       RowBox[{"U", "[", 
        RowBox[{"x", ",", "t"}], "]"}]}]], " ", "s", " ", 
     RowBox[{"\[Integral]", 
      RowBox[{
       SuperscriptBox["\[ExponentialE]", 
        RowBox[{"-", 
         RowBox[{"U", "[", 
          RowBox[{"x", ",", "t"}], "]"}]}]], 
       RowBox[{"\[DifferentialD]", "x"}]}]}]}], "+", 
    RowBox[{
     SuperscriptBox["\[ExponentialE]", 
      RowBox[{"2", " ", 
       RowBox[{"U", "[", 
        RowBox[{"x", ",", "t"}], "]"}]}]], " ", 
     SuperscriptBox["s", "2"], " ", 
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{"\[Integral]", 
        RowBox[{
         SuperscriptBox["\[ExponentialE]", 
          RowBox[{"-", 
           RowBox[{"U", "[", 
            RowBox[{"x", ",", "t"}], "]"}]}]], 
         RowBox[{"\[DifferentialD]", "x"}]}]}], ")"}], "2"]}]}]], "-", 
  FractionBox[
   RowBox[{"b", " ", "s", " ", 
    SuperscriptBox[
     RowBox[{
      SuperscriptBox["U", 
       TagBox[
        RowBox[{"(", 
         RowBox[{"1", ",", "0"}], ")"}],
        Derivative],
       MultilineFunction->None], "[", 
      RowBox[{"x", ",", "t"}], "]"}], "2"]}], 
   RowBox[{
    SuperscriptBox["\[ExponentialE]", 
     RowBox[{"U", "[", 
      RowBox[{"x", ",", "t"}], "]"}]], "-", 
    RowBox[{
     SuperscriptBox["\[ExponentialE]", 
      RowBox[{"U", "[", 
       RowBox[{"x", ",", "t"}], "]"}]], " ", "s", " ", 
     RowBox[{"\[Integral]", 
      RowBox[{
       SuperscriptBox["\[ExponentialE]", 
        RowBox[{"-", 
         RowBox[{"U", "[", 
          RowBox[{"x", ",", "t"}], "]"}]}]], 
       RowBox[{"\[DifferentialD]", "x"}]}]}]}]}]], "+", 
  RowBox[{
   FractionBox["1", "2"], " ", "b", " ", 
   SuperscriptBox[
    RowBox[{
     SuperscriptBox["U", 
      TagBox[
       RowBox[{"(", 
        RowBox[{"1", ",", "0"}], ")"}],
       Derivative],
      MultilineFunction->None], "[", 
     RowBox[{"x", ",", "t"}], "]"}], "3"]}], "-", 
  FractionBox[
   RowBox[{"2", " ", "b", " ", "s", " ", 
    RowBox[{
     SuperscriptBox["U", 
      TagBox[
       RowBox[{"(", 
        RowBox[{"2", ",", "0"}], ")"}],
       Derivative],
      MultilineFunction->None], "[", 
     RowBox[{"x", ",", "t"}], "]"}]}], 
   RowBox[{
    SuperscriptBox["\[ExponentialE]", 
     RowBox[{"U", "[", 
      RowBox[{"x", ",", "t"}], "]"}]], "-", 
    RowBox[{
     SuperscriptBox["\[ExponentialE]", 
      RowBox[{"U", "[", 
       RowBox[{"x", ",", "t"}], "]"}]], " ", "s", " ", 
     RowBox[{"\[Integral]", 
      RowBox[{
       SuperscriptBox["\[ExponentialE]", 
        RowBox[{"-", 
         RowBox[{"U", "[", 
          RowBox[{"x", ",", "t"}], "]"}]}]], 
       RowBox[{"\[DifferentialD]", "x"}]}]}]}]}]], "-", 
  RowBox[{"b", " ", 
   RowBox[{
    SuperscriptBox["U", 
     TagBox[
      RowBox[{"(", 
       RowBox[{"3", ",", "0"}], ")"}],
      Derivative],
     MultilineFunction->None], "[", 
    RowBox[{"x", ",", "t"}], "]"}]}]}]], "Output",
 CellChangeTimes->{3.4694839826395273`*^9, 3.471575491491728*^9, 
  3.483804167772208*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Cancel", "[", "%", "]"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"-", 
   FractionBox[
    RowBox[{"2", " ", "s", " ", 
     RowBox[{"\[Integral]", 
      RowBox[{
       RowBox[{
        SuperscriptBox["\[ExponentialE]", 
         RowBox[{"-", 
          RowBox[{"U", "[", 
           RowBox[{"x", ",", "t"}], "]"}]}]], " ", 
        RowBox[{
         SuperscriptBox["U", 
          TagBox[
           RowBox[{"(", 
            RowBox[{"0", ",", "1"}], ")"}],
           Derivative],
          MultilineFunction->None], "[", 
         RowBox[{"x", ",", "t"}], "]"}]}], 
       RowBox[{"\[DifferentialD]", "x"}]}]}]}], 
    RowBox[{
     RowBox[{"-", "1"}], "+", 
     RowBox[{"s", " ", 
      RowBox[{"\[Integral]", 
       RowBox[{
        SuperscriptBox["\[ExponentialE]", 
         RowBox[{"-", 
          RowBox[{"U", "[", 
           RowBox[{"x", ",", "t"}], "]"}]}]], 
        RowBox[{"\[DifferentialD]", "x"}]}]}]}]}]]}], "+", 
  RowBox[{
   SuperscriptBox["U", 
    TagBox[
     RowBox[{"(", 
      RowBox[{"0", ",", "1"}], ")"}],
     Derivative],
    MultilineFunction->None], "[", 
   RowBox[{"x", ",", "t"}], "]"}], "+", 
  FractionBox[
   RowBox[{"b", " ", 
    SuperscriptBox["\[ExponentialE]", 
     RowBox[{"-", 
      RowBox[{"U", "[", 
       RowBox[{"x", ",", "t"}], "]"}]}]], " ", "s", " ", 
    SuperscriptBox[
     RowBox[{
      SuperscriptBox["U", 
       TagBox[
        RowBox[{"(", 
         RowBox[{"1", ",", "0"}], ")"}],
        Derivative],
       MultilineFunction->None], "[", 
      RowBox[{"x", ",", "t"}], "]"}], "2"]}], 
   RowBox[{
    RowBox[{"-", "1"}], "+", 
    RowBox[{"s", " ", 
     RowBox[{"\[Integral]", 
      RowBox[{
       SuperscriptBox["\[ExponentialE]", 
        RowBox[{"-", 
         RowBox[{"U", "[", 
          RowBox[{"x", ",", "t"}], "]"}]}]], 
       RowBox[{"\[DifferentialD]", "x"}]}]}]}]}]], "+", 
  RowBox[{
   FractionBox["1", "2"], " ", "b", " ", 
   SuperscriptBox[
    RowBox[{
     SuperscriptBox["U", 
      TagBox[
       RowBox[{"(", 
        RowBox[{"1", ",", "0"}], ")"}],
       Derivative],
      MultilineFunction->None], "[", 
     RowBox[{"x", ",", "t"}], "]"}], "3"]}], "+", 
  FractionBox[
   RowBox[{"2", " ", "b", " ", 
    SuperscriptBox["\[ExponentialE]", 
     RowBox[{"-", 
      RowBox[{"U", "[", 
       RowBox[{"x", ",", "t"}], "]"}]}]], " ", "s", " ", 
    RowBox[{
     SuperscriptBox["U", 
      TagBox[
       RowBox[{"(", 
        RowBox[{"2", ",", "0"}], ")"}],
       Derivative],
      MultilineFunction->None], "[", 
     RowBox[{"x", ",", "t"}], "]"}]}], 
   RowBox[{
    RowBox[{"-", "1"}], "+", 
    RowBox[{"s", " ", 
     RowBox[{"\[Integral]", 
      RowBox[{
       SuperscriptBox["\[ExponentialE]", 
        RowBox[{"-", 
         RowBox[{"U", "[", 
          RowBox[{"x", ",", "t"}], "]"}]}]], 
       RowBox[{"\[DifferentialD]", "x"}]}]}]}]}]], "-", 
  RowBox[{"b", " ", 
   RowBox[{
    SuperscriptBox["U", 
     TagBox[
      RowBox[{"(", 
       RowBox[{"3", ",", "0"}], ")"}],
      Derivative],
     MultilineFunction->None], "[", 
    RowBox[{"x", ",", "t"}], "]"}]}]}]], "Output",
 CellChangeTimes->{3.469483982683546*^9, 3.4715754915347548`*^9, 
  3.4838041678217573`*^9}]
}, Open  ]],

Cell[TextData[StyleBox["This is the KdV potential equation plus a term \
proportional to the integral with respect to x of the potential KdV equation \
multiplied by Exp[-u[x,t]. As long as U[x,t] is a solution of the KdV \
potential equation then Utilda is a solution.",
 FontWeight->"Plain",
 FontVariations->{"CompatibilityType"->0}]], "Text",
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[CellGroupData[{

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

Cell[BoxData["864633528"], "Output",
 CellChangeTimes->{3.4694839827205276`*^9, 3.4715754915671577`*^9, 
  3.483804167866536*^9}]
}, Open  ]]
},
WindowToolbars->{},
CellGrouping->Manual,
WindowSize->{867, 885},
WindowMargins->{{78, Automatic}, {Automatic, 17}},
PrivateNotebookOptions->{"ColorPalette"->{RGBColor, -1}},
ShowCellLabel->True,
ShowCellTags->False,
RenderingOptions->{"ObjectDithering"->True,
"RasterDithering"->False},
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, 521, 8, 180, "Text"],
Cell[1069, 30, 85, 2, 32, "Text"],
Cell[1157, 34, 90, 2, 33, "Input"],
Cell[1250, 38, 124, 1, 32, "Text"],
Cell[1377, 41, 160, 4, 33, "Input"],
Cell[1540, 47, 476, 13, 32, "Text"],
Cell[2019, 62, 93, 1, 33, "Input"],
Cell[2115, 65, 163, 3, 32, "Text"],
Cell[2281, 70, 155, 5, 53, "Input"],
Cell[2439, 77, 304, 8, 51, "Text"],
Cell[2746, 87, 193, 5, 53, "Input"],
Cell[2942, 94, 130, 2, 32, "Text"],
Cell[3075, 98, 151, 4, 33, "Input"],
Cell[3229, 104, 128, 2, 32, "Text"],
Cell[3360, 108, 116, 3, 33, "Input"],
Cell[3479, 113, 232, 4, 51, "Text"],
Cell[3714, 119, 108, 3, 33, "Input"],
Cell[3825, 124, 152, 3, 32, "Text"],
Cell[3980, 129, 72, 2, 33, "Input"],
Cell[4055, 133, 395, 6, 70, "Text"],
Cell[4453, 141, 72, 2, 33, "Input"],
Cell[4528, 145, 514, 7, 89, "Text"],
Cell[5045, 154, 71, 2, 33, "Input"],
Cell[5119, 158, 534, 8, 89, "Text"],
Cell[5656, 168, 79, 2, 33, "Input"],
Cell[5738, 172, 267, 4, 51, "Text"],
Cell[CellGroupData[{
Cell[6030, 180, 311, 6, 53, "Input"],
Cell[6344, 188, 425, 8, 45, "Print"],
Cell[6772, 198, 1008, 14, 235, "Print"],
Cell[7783, 214, 704, 12, 64, "Print"],
Cell[8490, 228, 412, 8, 45, "Print"],
Cell[8905, 238, 1010, 14, 235, "Print"],
Cell[9918, 254, 185, 4, 33, "Output"]
}, Open  ]],
Cell[10118, 261, 134, 3, 32, "Text"],
Cell[CellGroupData[{
Cell[10277, 268, 68, 1, 33, "Input"],
Cell[10348, 271, 622, 19, 54, "Output"]
}, Open  ]],
Cell[10985, 293, 75, 0, 32, "Text"],
Cell[11063, 295, 71, 1, 33, "Input"],
Cell[CellGroupData[{
Cell[11159, 300, 78, 1, 33, "Input"],
Cell[11240, 303, 120, 2, 33, "Output"]
}, Open  ]],
Cell[11375, 308, 98, 2, 32, "Text"],
Cell[CellGroupData[{
Cell[11498, 314, 62, 1, 33, "Input"],
Cell[11563, 317, 325, 9, 33, "Output"]
}, Open  ]],
Cell[11903, 329, 489, 11, 145, "Text"],
Cell[CellGroupData[{
Cell[12417, 344, 282, 6, 53, "Input"],
Cell[12702, 352, 857, 14, 102, "Print"],
Cell[13562, 368, 419, 6, 83, "Print"],
Cell[13984, 376, 314, 6, 25, "Print"],
Cell[14301, 384, 302, 6, 25, "Print"],
Cell[14606, 392, 323, 7, 25, "Print"],
Cell[14932, 401, 301, 4, 64, "Print"],
Cell[15236, 407, 312, 6, 25, "Print"],
Cell[15551, 415, 144, 2, 25, "Print"],
Cell[15698, 419, 188, 3, 25, "Print"],
Cell[15889, 424, 312, 6, 25, "Print"],
Cell[16204, 432, 1065, 14, 254, "Print"],
Cell[17272, 448, 188, 4, 33, "Output"]
}, Open  ]],
Cell[17475, 455, 108, 3, 32, "Text"],
Cell[CellGroupData[{
Cell[17608, 462, 61, 1, 33, "Input"],
Cell[17672, 465, 250, 5, 33, "Output"]
}, Open  ]],
Cell[17937, 473, 48, 0, 32, "Text"],
Cell[CellGroupData[{
Cell[18010, 477, 61, 1, 33, "Input"],
Cell[18074, 480, 173, 3, 33, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[18284, 488, 203, 3, 32, "Text"],
Cell[18490, 493, 253, 7, 33, "Input"],
Cell[18746, 502, 294, 9, 54, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[19077, 516, 143, 2, 32, "Text"],
Cell[19223, 520, 253, 7, 33, "Input"],
Cell[19479, 529, 145, 3, 33, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[19661, 537, 268, 7, 33, "Input"],
Cell[19932, 546, 720, 25, 51, "Output"]
}, Open  ]],
Cell[20667, 574, 88, 2, 32, "Text"],
Cell[20758, 578, 78, 1, 33, "Input"],
Cell[20839, 581, 897, 32, 105, "Output"],
Cell[21739, 615, 136, 1, 32, "Text"],
Cell[CellGroupData[{
Cell[21900, 620, 509, 9, 33, "Input"],
Cell[22412, 631, 379, 7, 53, "Output"]
}, Open  ]],
Cell[22806, 641, 232, 4, 51, "Text"],
Cell[CellGroupData[{
Cell[23063, 649, 167, 4, 53, "Input"],
Cell[23233, 655, 503, 7, 102, "Print"]
}, Open  ]],
Cell[CellGroupData[{
Cell[23773, 667, 77, 1, 33, "Input"],
Cell[23853, 670, 12043, 329, 213, "Output"]
}, Open  ]],
Cell[35911, 1002, 89, 2, 32, "Text"],
Cell[36003, 1006, 294, 4, 51, "Text"],
Cell[36300, 1012, 289, 9, 33, "Input"],
Cell[CellGroupData[{
Cell[36614, 1025, 723, 24, 53, "Input"],
Cell[37340, 1051, 1902, 65, 89, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[39279, 1121, 62, 1, 33, "Input"],
Cell[39344, 1124, 1389, 48, 55, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[40770, 1177, 59, 1, 33, "Input"],
Cell[40832, 1180, 1391, 48, 55, "Output"]
}, Open  ]],
Cell[42238, 1231, 385, 6, 51, "Text"],
Cell[42626, 1239, 266, 8, 33, "Input"],
Cell[CellGroupData[{
Cell[42917, 1251, 723, 24, 53, "Input"],
Cell[43643, 1277, 1772, 60, 89, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[45452, 1342, 62, 1, 33, "Input"],
Cell[45517, 1345, 1285, 44, 55, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[46839, 1394, 59, 1, 33, "Input"],
Cell[46901, 1397, 1285, 44, 55, "Output"]
}, Open  ]],
Cell[48201, 1444, 260, 4, 32, "Text"],
Cell[48464, 1450, 193, 4, 32, "Text"],
Cell[48660, 1456, 267, 8, 33, "Input"],
Cell[CellGroupData[{
Cell[48952, 1468, 723, 24, 53, "Input"],
Cell[49678, 1494, 1744, 60, 89, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[51459, 1559, 62, 1, 33, "Input"],
Cell[51524, 1562, 1264, 44, 95, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[52825, 1611, 59, 1, 33, "Input"],
Cell[52887, 1614, 1266, 44, 95, "Output"]
}, Open  ]],
Cell[54168, 1661, 248, 4, 32, "Text"],
Cell[54419, 1667, 267, 8, 33, "Input"],
Cell[CellGroupData[{
Cell[54711, 1679, 723, 24, 53, "Input"],
Cell[55437, 1705, 1744, 60, 89, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[57218, 1770, 62, 1, 33, "Input"],
Cell[57283, 1773, 1268, 44, 95, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[58588, 1822, 59, 1, 33, "Input"],
Cell[58650, 1825, 1266, 44, 95, "Output"]
}, Open  ]],
Cell[59931, 1872, 248, 4, 32, "Text"],
Cell[60182, 1878, 356, 6, 51, "Text"],
Cell[60541, 1886, 504, 17, 33, "Input"],
Cell[CellGroupData[{
Cell[61070, 1907, 554, 19, 33, "Input"],
Cell[61627, 1928, 5404, 172, 190, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[67068, 2105, 62, 1, 33, "Input"],
Cell[67133, 2108, 7754, 251, 362, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[74924, 2364, 59, 1, 33, "Input"],
Cell[74986, 2367, 3160, 109, 124, "Output"]
}, Open  ]],
Cell[78161, 2479, 378, 6, 51, "Text"],
Cell[CellGroupData[{
Cell[78564, 2489, 66, 1, 33, "Input"],
Cell[78633, 2492, 129, 2, 33, "Output"]
}, Open  ]]
}
]
*)

(* End of internal cache information *)
