LIE.DOC            Instructions for program LIE       (c) 1990,2000  A K Head
------------------------------------------------------------------------------

Assumptions
-----------
            You know why you want to use program LIE that finds the Lie group,
or rather the Lie algebra, of differential equations, ordinary or partial,
single or simultaneous, and you can use the output of this program to find
special similarity solutions, conserved quantities, reductions of order etc.
For example, you have seen the books "Applications of Lie Groups to
Differential Equations" by P. J. Olver ( and the worked examples in Chapters 2
and 3 ) or "Symmetries and Differential Equations" by G. W. Blumen and
S. Kumei or "Solution of Differential Equations by means of one-parameter
groups" by J. M. Hill or "Differential equations, their solution using
symmetries" by H. Stephani or the article "Symmetries of Differential
Equations: from Sophus Lie to Computer Algebra" by F. Schwarz, SIAM Review,
vol 30, Sept 1988, pp450-481. Many of the examples in the DAT files are from
these sources.

Required
--------
        A PC of IBM type with 256k or more of free memory. Faster the better.

Warning
-------
        LIE will write a file SAVEA#.LIE on the default disk. Make sure there 
is space available, 100k bytes should be sufficient. If it is a floppy disk 
then it must NOT be write-protected. 

Example
-------
        All the DAT files are examples, mostly from the above references. Like
them, lets start with HEAT1.DAT which is the one-dimensional heat conduction
equation

                 du      d2u
                 --  =   ---     ( sorry but can't type partial d )
                 dt      dxdx


Remember that MUMATH is an UPPERCASE SYSTEM. Put on that Caps Lock key.
Remember that CONTROL-P will toggle on/off duplicate output to the printer
to give you a hardcopy record.



At the DOS prompt type

MULIE

This reads in MULIE.EXE

You now get the startup message then the MUMATH prompt of ?


In reply to ? prompts type:

? RDS(HEAT1,DAT);           ( yes a comma, reads in HEAT1.DAT )
? DOLIE();                  ( generates the Defining Equations )
? A#;                       ( optional, to see the Def Eqns )
? DOSOLV();                 ( solves the Def Eqns )
? DOCHECK();                ( checks that it really is a solution )
? DOVEC();                  ( generates the vectors of the Lie algebra )
? DONZC();                  ( optional, generates the non-zero commutators )

To read the output, U(1) and U1 are u, X1 is x, X2 is t and terms like D#(X1)
are to be read as partial d/dX1.

Exit
----
    At a ? prompt, exit to DOS by SYSTEM(); or a CONTROL-C


Printout from test run of HEAT1.DAT  ( with added comments in " " )
-------------------------------------------------------------------
MULIE                                  " Startup message "
Portions (c) Soft Warehouse Inc. All rights reserved


? RDS(HEAT1,DAT);
@: HEAT1
?
?
NIND#:2 $

?              % 2 independent variables  X1 = x and X2 = t %
NDEP#:1 $

?              % 1 dependent variable  U(1) = u      %
DE#:DV#:{} $

?           % declare DE# and DV# to be arrays    %
DE#[1]:   DIF(U(1),X2) - DIF(U(1),X1,2) $

?        %  only one DE this time %
DV#[1]:   U(1,2) $

?       % and one DeriVative to substitute %
ECHO:FALSE$
?
? DOLIE();
Program LIE  v. 5.3 (c) 1989,2000  A K Head

(21)         "There are 21 terms in the prolongation
(16)           becoming 16 terms after substituting for U(1,2)
(4 8)           and this splits into 4 Def Eqns containing 8 terms. "

@: Def Eqns =  (4, 8)

? A#;
@: {DIF (F# (1, U1, X1, X2), U1, 2),
    -DIF (F# (1, U1, X1, X2), X1, 2) + DIF (F# (1, U1, X1, X2), X2),
    2*DIF (F# (2, X1, X2), X1) - DIF (F# (3, X2), X2),
    -2*DIF (F# (1, U1, X1, X2), U1, X1) + DIF (F# (2, X1, X2), X1, 2) - DIF (F#
 (2, X1, X2), X2),
    UUU#1 == F# (1, U1, X1, X2),
    XXX#1 == F# (2, X1, X2),
    XXX#2 == F# (3, X2)}

" The 4 Def Eqns followed by the Lie transformation functions UUU and XXX with
UUU#1 for U1, XXX#1 for X1 etc. In the functions F#(...) the initial number is
an arbitrary sequence number and this is followed by the variables on which
this function depends. "


? DOSOLV();

(3 9 3 1)    "This means there are now 3 Def Eqns containing 9 terms
(4 9 1 3)     after applying Operation 3  to (what was) the 1st Def Eqn. "
(4 10 4 3)
(4 11 3 3)
(5 11 1 4)
(4 9 2 2)
(4 10 4 4)
(4 14 3 4)
(6 14 1 3)
(8 14 1 6)
(7 12 2 5)
(6 11 3 1)
(5 10 3 1)
(5 11 4 1)
(4 9 2 5)
(4 10 4 1)
(3 7 2 3)
(3 8 4 1)
(2 5 2 2)
(2 6 4 2)
(1 2 2 2)

@: {-DIF (F# (5, X1, X2), X1, 2) + DIF (F# (5, X1, X2), X2),
    UUU#1 == U1*X1*F# (14) + 2*U1*X2*F# (13) + U1*X1^2*F# (13) - U1*F# (17) +
F# (5, X1, X2),
    XXX#1 == -4*X1*X2*F# (13) - X1*F# (15) - 2*X2*F# (14) - F# (16),
    XXX#2 == -2*X2*F# (15) - 4*X2^2*F# (13) - F# (18)}

" One unsolved eqn ( a copy of the heat eqn ) followed by the solution for UUU
and XXX. An F#(number) is just an arbitrary constant. "

? DOCHECK();


@: Check OK, proceed to DOVEC

                     "  Alternative message is:  Do DOCHECK again now. "

? DOVEC();

Unsolved Equation
-DIF (F# (5, X1, X2), X1, 2) + DIF (F# (5, X1, X2), X2) == 0

Vectors
VEC# (1) == F# (5, X1, X2)*D# (U1)
VEC# (2) == -D# (X2)
VEC# (3) == -D# (X1)
VEC# (4) == -X1*D# (X1) - 2*X2*D# (X2)
VEC# (5) == -U1*D# (U1)
VEC# (6) == 2*U1*X2*D# (U1) + U1*X1^2*D# (U1) - 4*X1*X2*D# (X1) - 4*X2^2*D# (X2
)
VEC# (7) == U1*X1*D# (U1) - 2*X2*D# (X1)

" End of test run "



Each vector is a fact about the differential equation so here are 7 facts
about the heat equation. As there are many ways to use these facts, this
program stops at this point ( except that the commutators can be calculated by
those who need them ). Examples of how the vectors can be turned into more
usable facts are given in the above references.

For example, from Chap 2 of Olver, these vectors imply that if u = f(x,t) is a
solution of the heat equation then so are the 7 functions

(1)   f(x-c,t)
(2)   f(x,t-c)
(3)   c*f(x,t)
(4)   f(c*x,c^2*t)
(5)   exp( -c*x + c^2*t) * f(u-2*c*t,t)
(6)   (1 + 4*c*t)^(-1/2) * exp( (-c*x^2)/(1 + 4*c*t) ) *
                  f( x/(1 + 4*c*t), t/(1 + 4*c*t) )
(7)   f(x,t) + c*g(x,t)

where c is any real constant and g(x,t) is any other solution of the heat
equation.

A different use is made of these facts in Chap 3 of Olver, namely to reduce
the heat equation from a partial differential equation to an ordinary
differential equation. Solving these ODEs gives various exact solutions to
the heat equation. Some of these are :

(a):
u(x,t) = k*exp( -c*x + c^2*t) ) + l
is the most general travelling wave solution.

(b):
u(x,t) = t^c * exp(-x^2/(8*t)) * { k*U( 2*c+1/2, x*(2*t)^(-1/2) )
                      +l*V( 2*c+1/2, x*(2*t)^(-1/2) )
is the general scale-invariant solution to the heat equation where U and V are
parabolic cylinder functions.

(c):
A special case of (b) is
u(x,t) = k * erf( x * (2*t)^(-1/2) )
where erf is the error function.

(d):
Another special case of (b) is
u(x,t) = t^( (-n-1)/2 ) * exp( -x^2/(4*t) ) * Hn( x*(2*t)^(-1/2) )
where Hn is the n-th Hermite polynomial.

(e):
The source solution
u(x,t) = c * t^(-1/2) * exp( -x^2/(4*t) )




Your First Question
-------------------
                    Although the 7 vectors agree with the above references,
these all say that the 1-D heat equation generates 9 Defining Equations.
But DOLIE() generated only 4   ????

Answer:  DOLIE() takes a shortcut that is important in saving time and
particularly memory space. It solves some of the Def Eqns as it generates
them. If desired, this shortcut can be turned off by changing the value
of the variable SCUT# from TRUE to FALSE.



---------------------------------------
!  THE MOST IMPORTANT THING  FOR YOU  !
---------------------------------------
                                        is to prepare correct input data.
RDS(..) will check that the input is legal mathematics. But it cannot check
that it is what you really wanted.

           Most complaints of LIE misfunction have turned out to be typing
errors that changed the input DEs to other legal, but wrong, DEs.

           Next most frequent have been violations of the restrictions on what
types of DEs are acceptable to LIE.

           So read the following instructions on data preparation carefully.
And observe the restrictions that are given.


           Print out all the example DAT files to see how to prepare you DEs.

           You could type the input directly online but it is safer to prepare
a data file and RDS(... ,...); it in.   Terminate expressions online with ;
but for a file it is better to use $ .

           The colon : is the MUMATH assignment sign. So NIND#:5 would be read
as " NIND# equals 5 " or " set the value of NIND# to 5 ".
           The percent sign % brackets comments. eg % This will be ignored %
           Square brackets [] index the entries of an array.

           The essential items in your input data file are:
ECHO:TRUE$
NIND#: "the number of independent variables" $
NDEP#: "the number of dependent variables"  $
DE#:DV#:{}$       ( This declares DE# and DV# to be arrays )
DE#[1]:   "first DE " $
DV#[1]:   "derivative to substitute from first DE " $
DE#[2]:   "second DE "$
DV#[2]:   "derivative to substitute from second DE "$
etc
ECHO:FALSE$
RDS()$             ( This returns to reading input from the keyboard )


Rules for writing the input DEs and DVs
---------------------------------------

In the following, "must" means that otherwise the program will probably give
an incorrect result, "desirable" means that the program is less likely to stop
from lack of memory and that speed will be greater.


The differential equations are written as MUMATH expressions.
It is implied that each expression equals zero.

The independent variables must be X1,X2,X3,... up to the number specified by
NIND#. The dependent variables must be U(1),U(2),U(3),... up to the number
specified by NDEP#.  It is your choice how these are assigned to the physical
variables.

Derivatives can be written in either of two ways. One way is as a MUMATH
derivative say DIF( U(2),X1,X2,3,X3,2) which is a sixth derivative of U(2),
once wrt X1, three times wrt X2 and twice wrt X3. The other way for the same
derivative is U(2,1,2,2,2,3,3) in an obvious notation. Use either or both as
you like, all will be converted to the second form for internal use by DOLIE.
After reading in the DEs with RDS(), type DE#; to see this internal form of
the DEs that will be used by DOLIE. It can also be useful to mix the two forms
( e.g. KP.DAT ).

The DEs must be polynomial in the derivatives. Derivatives must not appear in
denominators or in square roots or other fractional powers or in functions.

It is desirable that there be no denominators in the DEs.
Multiply your DEs through to remove denominators.

Besides derivatives and the independent and dependent variables and your
symbolic constants and functions, the expression can contain  + - * / ^ () #PI
#E #I and the functions SIN COS LOG ( or LN ) ERF EI but must not contain
square roots or other fractional powers or other trig functions like TAN or
SEC or inverse trig functions.

Do not use names containing the character # for your symbolics. LIE has a
number of reserved words but there is no need for a list as they all contain
the character #.

Exponential is the usual MUMATH #E^  , "e to the power ... ".  (eg EXPU.DAT)

The arguments of the trig functions SIN and COS can be independent or
dependent variables or integer multiples of these or linear combinations of
these. But must not be half-angles etc.

Simultaneous DEs are processed in the order [1],[2],...  It is desirable that
simpler lowest order equations have the lower numbers.

Expressions can run over many lines until the terminator $    (eg MZ.DAT)

Remember that MUMATH is an UPPERCASE SYSTEM. Put on that Caps Lock key.


Rules for choosing the DeriVatives in DV#
-----------------------------------------

    For each DE#[.] you must choose a DeriVative DV#[.] that occurs in that DE.
The DE will be solved for this DV and substituted in the prolongation, thus
eliminating that derivative from the prolongation.

    In order for the program to solve for this DV, it must occur linearly in
the DE.

    For simultaneous DEs, the substitutions will be done in the order
[1],[2],...    The choice of the DVs must be such that an early DV is not
reintroduced by a later substitution so giving a circular substitution.
See NAVSTOKE.DAT and IMPOSBLE.DAT for examples.
    If there is a choice left after these musts then it is desirable to:
Pick highest order derivatives.
Pick derivatives with coefficients +1 or -1 or, failing this, with a
multiplicative coefficient. Worst is a coefficient that is the sum of terms.




This is enough to read now.
Try some examples.
Then read MORELIE.DOC

        Alan Head

< /html>