conlaw.tex 14 KB

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