1\documentclass[12pt]{article}
2%Sets size of page and margins
3\textheight 21cm
4\textwidth 15cm
5
6\title{Manual for CONLAW versions 1,2,3,4}
7\author{Thomas Wolf \\
8        Department of Mathematics \\
9        Brock University \\
10        St.Catharines \\
11        Ontario, Canada L2S 3A1 \\
12        twolf@brocku.ca}
13
14\begin{document}
15\maketitle
16\section{Purpose}
17The procedures {\tt CONLAW1, CONLAW2, CONLAW3, CONLAW4}
18try to find conservation laws
19for a given single/system of differential equation(s) (ODEs or PDEs)
20\begin{equation}
21     u^{\alpha}_J = w^{\alpha}(x,u^{\beta},...,u^{\beta}_K,...)  \label{a1}
22\end{equation}
23{\tt CONLAW1} tries to find the conserved current $P^i$ by solving
24\begin{equation}
25   \mbox{Div}\;\,P = 0  \;\;\; \mbox{modulo}\;\; (\ref{a1})
26\label{a2}
27\end{equation}
28directly. {\tt CONLAW3} tries to find $P^i$ and the characteristic
29functions (integrating factors) $Q^{\nu}$ by solving
30\begin{equation}
31\mbox{Div}\,P = \sum_{\nu} Q^{\nu}\cdot (u^{\nu}_J - w^{\nu}) \label{a3}
32\end{equation}
33identically in all $u$-derivatives.
34Applying the Euler operator (variational derivative) for each $u^{\nu}$
35on (\ref{a3}) gives a zero left hand side and therefore
36conditions involving only $Q^{\nu}$. {\tt CONLAW4} tries to solve these
37conditions identically in all $u$-derivatives and to compute $P^i$
38afterwards. {\tt CONLAW2}
39does substitutions based on (\ref{a1}) before solving these
40conditions on $Q^{\nu}$
41and therefore computes adjoined symmetries. These are
42completed, if possible, to conservation laws by computing $P^i$ from
43the $Q^{\nu}$.
44
45All four procedures have the same syntax. They have two parameters,
46both are lists. The first parameter specifies the equations (\ref{a1}),
47the second specifies the computation to be done. One can either specify an
48ansatz for $P^i, Q^{\nu}$ or investigate a general situation, only specifying
49the order of the characteristic functions or the conserved current. For a
50more detailed description see the file {\tt conca.tex}.
51
52The file {\tt CONLAW0.RED} contains subroutines used in all four versions.
53
54\section{The Syntax}
55The procedures {\tt CONLAWi} $\;\;$ i=1,2,3,4 are called through \\
56{\tt CONLAWi({\it problem,runmode}); } \\
57where i=1,2,3,4. Both parameters {\it problem, runmode} are lists.
58The first specifies the DEs to be investigated: \\
59{\it problem} ... \{{\it equations, ulist, xlist}\}
60\begin{tabbing}
61\hspace{0.5cm}
62 {\it equations}\= ... \= list of equations,
63              each has the form {\tt df(ui,..)=...} where \\
64       \>  \> the LHS (left hand side) {\tt df(ui,..)} is selected such that \\
65       \>  \>  - The RHS (right h.s.) of an equations must not include     \\
66       \>  \>$\;\;$ the derivative on the LHS nor a derivative of it.  \\
67       \>  \>  - The LHS of any equation should not occur in any other\\
68       \>  \>$\;\;$ equation nor any derivative of the LHS.  \\
69       \>  \> If CONLAW3 or CONLAW4 are run where no substitutions\\
70       \>  \> are made then the LHS of equations can be {\tt df(ui,..)**n=...}\\
71       \>  \> where {\tt n} is a number. No difference is made between\\
72       \>  \> equations and constraints. \\
73\hspace{0.5cm}
74 {\it ulist} \>  ... \> list of function names, which can be chosen freely \\
75             \>      \> the number of functions and equations need not
76be equal \\
77\hspace{0.5cm}
78 {\it xlist}  \>  ... \> list of variable names, which can be chosen freely
79\end{tabbing}
80The second parameter specifies the calculation to be done.  \\
81{\it runmode} ... \{{\it minord, maxord, expl, flist, inequ}\}
82\begin{tabbing}
83\hspace{0.5cm}
84     {\it minord} \= ... \= the minimum of the highest order of
85                          derivatives of u \\
86             \> \>        - in {\tt p\_t} for CONLAW1 where {\tt t} is the first variable in\\
87             \> \>        \ \  {\tt xlist} and \\
88             \> \>        - in {\tt q\_j} for CONLAW2,CONLAW3,CONLAW4  \\
89\hspace{0.5cm}
90     {\it maxord} \> ... \> the maximum of the highest order of
91                          derivatives of u \\
92             \> \>        - in {\tt p\_i} for CONLAW1 where {\tt t} is the first variable in\\
93             \> \>        \ \  {\tt xlist} and  \\
94             \> \>        - in {\tt q\_j} for CONLAW2,CONLAW3,CONLAW4 \\
95\hspace{0.5cm}
96     {\it expl}       \> ... \> (t/nil) whether or not the charac.\
97                          functions {\tt q\_i} or conserved \\
98             \> \>        current may depend explicitly on
99                          the variables of xlist \\
100\hspace{0.5cm}
101     {\it flist}      \> ... \> a list of unknown functions in any ansatz for
102                          {\tt p\_i,q\_j}, \\
103        \>  \>            also all parameters and parametric functions in
104                          the equation \\
105        \>  \>            that are to be calculated such that
106                          conservation laws exist,\\
107        \>  \>            if there are no such unknown functions then
108                          {\it flist} is the \\
109        \>  \>            empty list: \verb+{}+ \\
110\hspace{0.5cm}
111     {\it inequ}      \> ... \> a list of expressions non of which
112                          may be identically \\
113        \>  \>            zero for the conservation
114                          law to be found, if there is no such \\
115        \>  \>            expression
116                          then {\it inequ} is an empty list: \verb+{}+
117\end{tabbing}
118The procedures {\tt CONLAWi} return a list of conservation laws
119\verb+ {+$C_1,C_2,\ldots$\verb+}+, if no
120non-trivial conservation law is found they return the empty list \verb+{}+.
121Each $C_i$ representing a conservation law
122has the form  \verb+ {{+$P^1,P^2,\ldots$\verb+},{+$Q^1,Q^2,\ldots$\verb+}}+.
123
124An ansatz for a conservation law can be formulated by specifying one
125or more of the components $P^i$ for {\tt CONLAW1}, one or more of the
126functions $Q^{\mu}$ for {\tt CONLAW2, CONLAW4} or one or more of
127$P^i, Q^{\mu}$ for {\tt CONLAW3}. The $P^i$ are input as {\tt p\_i} where
128{\tt i} in {\tt p\_i} stands for a variable name, and the $Q^{\mu}$ are
129input as {\tt q\_i} where {\tt i} stands for an index - the number of the
130equation in the input list {\it equations} with which {\tt q\_i} is
131multiplied.
132
133There is a restriction in the structure of all the expressions for
134{\tt p\_i, q\_j} that are specified: they must be homogeneous linear
135in the unknown functions or constants which appear in these expressions.
136The reason for this restriction is not
137for CRACK to be able to solve the resulting overdetermined system but for
138{\tt CONLAWi} to be able afterwards to extract the individual conservation
139laws from the general solution of the determining conditions.
140
141All such unknown functions and constants must be
142listed in {\it flist} (see above). The dependencies of such functions
143must be defined before calling {\tt CONLAWi}. This is done with the
144command {\tt DEPEND}, e.g. {\tt DEPEND f,t,x,u\$ } to specify $f$ as a
145function of $t,x,u$. If one wants to have $f$ as a function of derivatives
146of $u(t,x)$, say $f$ depending on $u_{txx}$, then one can {\it not} write \\
147\verb+    DEPEND f,df(u,t,x,2)$ + \\
148but instead \\
149\verb+    DEPEND f,u!`1!`2!`2$ + \\
150if {\it xlist} has been specified as \verb+ {t,x}+, because {\tt t} is the
151first variable and {\tt x} is the second variable in {\it xlist} and {\tt u}
152is differentiated ones wrt.\ {\tt t} and two times wrt.\ {x} we therefore get
153\verb+ u!`1!`2!`2+. The character {\tt !} is the exempt character to allow
154special characters like ` to occur in an identifier name.
155
156It is possible to add extra conditions like PDEs for $P^i, Q^{\mu}$ as a list
157{\tt cl\_condi} of expressions that shall vanish. \hspace{6pt}
158\noindent Remarks:
159\begin{itemize}
160\item The input to {\tt CONLAW1, CONLAW2, CONLAW3, CONLAW4} is the
161same apart from:
162\begin{itemize}
163\item an ansatz for $Q^{\nu}$ is ignored in {\tt CONLAW1}
164\item an ansatz for $P^i$ is ignored in {\tt CONLAW2, CONLAW4}
165\item the meaning of mindensord, maxdensord is different in {\tt CONLAW1}
166on one hand and {\tt CONLAW2,CONLAW3,CONLAW4} on the other (see above).
167\end{itemize}
168
169\item
170It matters how the differential equations are input, i.e. which
171derivatives are eliminated. For example, the Korteweg - de Vries
172equation if input in the form $u_{xxx}=-uu_x-u_t$ instead of
173$u_t=-uu_x-u_{xxx}$
174in {\tt CONLAW1} and choosing {\tt maxdensord}=1 then
175$P^i$ will be of at most first order, Div $P$ of second order and $u_{xxx}$
176will not be substituted and no non-trival conservation laws can be found.
177This does not mean that one will not find low order conservation laws at
178all with the substitution $u_{xxx}$ one only has to go to
179{\tt maxdensord}=2 with longer computations as a consequence compared to the
180input $u_t=-uu_x-u_{xxx}$ where {\tt maxdensord}=0 is enough to find
181non-trivial conservation laws.
182
183\item The drawback of using $u_t=\ldots$ compared with $u_{xxx}=\ldots$
184is that when seeking all conservation laws up to some order
185then one has to investigate a higher order ansatz, because with each
186substitution $u_t=-u_{xxx}+\ldots$ the order increases by 2.
187For example, if all conservation laws of order up to two in $Q^{\nu}$
188are to be determined then in order to include a $u_{tt}$-dependence the
189dependence of $Q^{\nu}$ on $u_x$ up to $u_{6x}$ has to be considered.
190
191\item Although for any equivalence class of conserved currents $P^i$
192differing only by a curl, there exist characteristic functions $Q^{\mu}$,
193this need not be true for any particular $P^i$.
194Therefore one cannot specify a known density $P^i$ for {\tt CONLAW3}
195and hope to calculate the remaining $P^j$ and the corresponding $Q^{\mu}$
196with {\tt CONLAW3}. What one
197can do is to use {\tt CONLAW1} to calculate the remaining components
198$P^j$ and from this a trivial conserved
199density $R$ and characteristic functions $Q^{\nu}$ are computed such that
200\[ \mbox{Div}\,(P-R) = \sum_{\nu} Q^{\nu}\cdot (u^{\nu}_J - w^{\nu}). \]
201
202\item The $Q^{\mu}$ are uniquely determined only modulo $\Delta=0$.
203If one makes an ansatz for $Q^{\mu}$ then this freedom should be removed
204by having
205the $Q^{\mu}$ independent of the LHS's of the equations and independent of
206derivatives of the LHS's of them. If the $Q^{\mu}$ were allowed to depend on
207anything, then (\ref{a3}) could simply be solved for one $Q^{\nu}$ in terms of
208arbitrary $P^j$ and other arbitrary $Q^{\rho}$, giving $Q^{\nu}$ that are
209singular for solutions of the differential equations as the expression
210of the differential equation would appear in the denominator of $Q^{\nu}$.
211
212\item Any ansatz for $P^i,Q^{\nu}$ should
213as well be independent of the LHS's of the equations (\ref{a1}) and
214independent of derivatives of the LHS's of (\ref{a1}).
215
216\item If in equation (\ref{a3}) the right hand side is of order $m$ then
217from the conserved current $P^i$ a trivial conserved current can be
218subtracted such that the remaining conserved current is at most of order $m$.
219If the right hand side is linear in the highest derivatives of order
220$m$ then subtraction of a trivial conserved current can even achieve a
221conserved current of order $m-1$. The relevance of this result is that
222if the right hand side is known to be linear in the highest derivatives
223then for $P^i$ an ansatz of order $m-1$ is only necessary. To take
224advantage of this relation
225if the right hand side is known to be linear in the highest
226derivatives, a flag {\tt quasilin\_rhs} can be set to {\tt t} (see
227below).
228
229\end{itemize}
230
231\section{Flags, parameters}
232
233\verb+    LISP (PRINT_:= NIL/0/1/ ...)$+ \\
234\verb+print_=nil+ suppresses all CRACK output, for \verb+print_=n+
235($n$ an integer)
236{\tt CRACK} prints only equations with at most $n$ factors in its terms.
237
238%\verb+ LISP (LOGOPRINT_:=t/nil)$+ \\
239%to print/not print a logo at the start of {\tt CONLAWi}
240
241\verb+ CRACKHELP()$+ \\
242to show other flags controling the solution of the overdetermined PDE-system,
243
244\verb+ OFF BATCH_MODE$+ \\
245to solve the system of conditions with {\tt CRACK} interactively.
246
247\verb+ LISP(QUASILIN_RHS:=T)$+ \\
248reduces in the ansatz for $P^i$ the order to $m-1$ if the order of the
249right hand side is $m$. This can be used to speed up computations if
250the right hand side is known to be linear in the highest derivatives
251(see the note above).
252
253\section{Requirements}
254
255{\tt REDUCE 3.6} and
256the files {\tt CRACK.RED, CONLAW0.RED}, one of the files
257{\tt CONLAW1.RED, CONLAW2.RED, CONLAW3.RED, CONLAW4.RED} depending which
258program should be used and all files {\tt CR*.RED} which
259are read in from {\tt CRACK.RED}.
260
261One either has to read in files with \\
262\verb+ IN "crack.red","conlaw0.red","conlaw1.red"$+ \\
263\noindent (and appropriate paths) or compile them before with
264
265\begin{verbatim}
266    FASLOUT "crack"$
267    IN "crack.red"$
268    FASLEND$
269    FASLOUT "conlaw0"$
270    IN "conlaw0.red"$
271    FASLEND$
272    FASLOUT "conlaw1"$
273    IN "conlaw1.red"$
274    FASLEND$
275    BYE$
276\end{verbatim}
277and load them afterwards with \verb+ LOAD crack,conlaw0,conlaw1$+ \\
278\verb+conlaw2, conlaw3, conlaw4+ are treated like {\tt conlaw1}.
279
280\section{Examples}
281Below a {\tt CRACK}-procedure {\tt nodepnd} is used to clean up
282after each run and delete all dependencies of each
283function in the list of functions in the argument of {\tt nodepnd}.
284More details concerning these examples are given when running
285the file {\tt conlaw.tst}.
286
287\verb+ lisp(print_:=nil);  +   to suppress output from CRACK
288\begin{itemize}
289\item a single PDE:
290\begin{verbatim}
291   depend u,x,t$
292   conlaw1({{df(u,t)=-u*df(u,x)-df(u,x,3)}, {u}, {t,x}},
293           {0, 1, t, {}, {}})$
294   nodepnd {u}$
295\end{verbatim}
296
297\item a system of equations:
298\begin{verbatim}
299   depend u,x,t$
300   depend v,x,t$
301   conlaw1({{df(u,t)=df(u,x,3)+6*u*df(u,x)+2*v*df(v,x),
302             df(v,t)=2*df(u,x)*v+2*u*df(v,x)           },
303            {u,v}, {t,x}},
304           {0, 1, t, {}, {}})$
305   nodepnd {u,v}$
306\end{verbatim}
307
308\item a system of equations with ansatz:
309\begin{verbatim}
310   depend u,x,t$
311   depend v,x,t$
312   depend r,t,x,u,v,u!`2,v!`2$
313   q_1:=r*df(u,x,2)$
314   conlaw2({{df(u,t)=df(v,x),
315             df(v,t)=df(u,x) }, {u,v}, {t,x}},
316           {2, 2, t, {r}, {r}})$
317   nodepnd {u,v,r}$
318\end{verbatim}
319
320\item for the
321determination of parameters, such that conservation laws exist:
322\begin{verbatim}
323   depend u,x,t;
324   conlaw1({{df(u,t)=-df(u,x,5)-a*u**2*df(u,x)
325                     -b*df(u,x)*df(u,x,2)-c*u*df(u,x,3)},
326            {u}, {t,x}},
327           {0, 1, t, {a,b,c}, {}});
328   nodepnd {u};
329\end{verbatim}
330
331\item for first integrals of an ODE-system including the determination of
332parameter values s,b,r such that conservation laws exist:
333\begin{verbatim}
334   depend {x,y,z},t;
335   depend a1,x,t;
336   depend a2,y,t;
337   depend a3,z,t;
338
339   p_t:=a1+a2+a3;
340   conlaw2({{df(x,t) = - s*x + s*y,
341             df(y,t) = x*z + r*x - y,
342             df(z,t) = x*y - b*z},
343            {x,y,z},{t}
344           },
345           {0,0,t,{a1,a2,a3,s,r,b},{}});
346   nodepnd {x,y,z,a1,a2,a3};
347\end{verbatim}
348
349\end{itemize}
350
351\end{document}
352