conlaw.txt 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. Help file for CONLAW versions 1,2,3
  2. ___________________________________
  3. Thomas Wolf, Oct. 1997
  4. Purpose:
  5. --------
  6. The procedures CONLAW1, CONLAW2, CONLAW3 try to find conservation laws
  7. for a given single/system of differential equation(s) (ODEs or PDEs)
  8. df(ui,...) = wi(x,uj,...,df(uj,...),...) (1)
  9. CONLAW1 tries to find the conserved current p_i by solving
  10. df(p_t,t) + df(p_x,x) [+ ...] = 0 modulo (1) (2)
  11. directly. CONLAW2 tries to solve determining equations for characteristic
  12. functions q_i such that
  13. df(p_t,t) + df(p_x,x) [+ ...] = sum_i q_i*( df(ui,...) - wi ) (3)
  14. holds. CONLAW3 tries to find p_i and q_j by solving (3) directly.
  15. All three procedures have the same syntax. They have two parameters,
  16. both are lists. The first parameter specifies the equations (1), the second
  17. specifies the computation to be done. One can either specify an ansatz for
  18. p_i, q_j or investigate a general situation, only specifying the order of the
  19. characteristic functions or the conserved current. For a more detailed
  20. description see the file conlaw.tex.
  21. Syntax:
  22. -------
  23. CONLAWi(problem,runmode); where i=1,2,3
  24. problem ~ {equations, ulist, txlist}
  25. equations ... list of equations,
  26. each has the form df(ui,..) = ...
  27. where the LHS (left hand side) df(ui,..)
  28. is selected such that
  29. - The RHS (right h.s.) of an equations must
  30. not include the derivative on the LHS
  31. nor a derivative of it.
  32. - The LHS of any equation must not occur in any
  33. other equation nor any derivative of the
  34. LHS.
  35. - Each of the unknown functions occurs on the
  36. LHS of exactly one equation
  37. ulist ... list of function names, which can be chosen freely
  38. txlist ... list of variable names, which can be chosen freely
  39. runmode ~ {mindensord, maxdensord, expl, flist, inequ}
  40. mindensord ... the minimum of the highest order of derivatives in u
  41. in p_x1 for CONLAW1
  42. in q_j for CONLAW2,CONLAW3
  43. maxdensord ... the maximum of the highest order of derivatives in u
  44. in p_x1 for CONLAW1
  45. in q_j for CONLAW2,CONLAW3
  46. expl ... (t/nil) whether or not the charac. functions q_i
  47. or conserved current may depend explicitly on
  48. the variables of txlist
  49. flist ... unknown functions in any expressions p_i, q_j
  50. which have been assigned before calling CONLAW
  51. in order to investigate a special ansatz for
  52. the p_i or q_j,
  53. also all parameters and parametric functions in
  54. the equation that are to be calculated such that
  55. conservation laws exist,
  56. if there are no such unknown functions then
  57. input the empty list: {}
  58. inequ ... inequ is a list of expressions non of which
  59. may be identically zero for the conservation
  60. law to be found, if there is no such expression
  61. then input an empty list: {}
  62. How to formulate an ansatz:
  63. ---------------------------
  64. An ansatz for a conservation law can be formulated by specifying one
  65. or more of the functions p_i for CONLAW1, one or more of the functions
  66. q_i for CONLAW2, one or more of p_i,q_i for CONLAW3.
  67. The `i' in p_i stands for a variable name, the `i' in q_i stands for
  68. an index - the number of the equation in the input system of equations
  69. with which q_i is multiplied to give the RHS of (1).
  70. There is a restriction in the structure of all the
  71. expressions for p_i, q_j that are specified: they must be homogeneous linear
  72. in some unknown function or constant.
  73. All such functions and constants must be
  74. listed in flist (see above). The dependencies of such functions
  75. must be defined before calling CONLAWi. This is done with the
  76. command DEPEND, e.g.
  77. DEPEND f,t,x,u$
  78. to specify f=f(t,x,u).
  79. If one wants to have f as a function of derivatives of u(t,x), say
  80. f depending on df(u,t,x,2), then one can *not* write
  81. DEPEND f,df(u,t,x,2)$ % wrong
  82. but instead
  83. DEPEND f,u!`1!`2!`2$ % correct
  84. if txlist has been specified as {t,x}. As t is the first variable and
  85. x is the second variable in txlist and u is differentiated ones wrt. t
  86. and two times wrt. x we therefore get u!`1!`2!`2. The character ! is the
  87. exempt character to allow special characters like ` to occur in an
  88. identifier name.
  89. Comments:
  90. ---------
  91. 1. The input to CONLAW1, CONLAW2, CONLAW3 is the same apart from:
  92. - an ansatz for q_i is ignored in CONLAW1
  93. - an ansatz for p_i is ignored in CONLAW2
  94. - the meaning of mindensord, maxdensord is different in CONLAW1 on
  95. one hand and CONLAW2,CONLAW3 on the other (see above).
  96. 2. It matters how the differential equations are input, i.e. which
  97. derivatives are eliminated. For example, the Korteweg - de Vries
  98. equation if input in the form df(u,x,3)=-u*df(u,x)-df(u,t) instead of
  99. df(u,t)=-u*df(u,x)-df(u,x,3) in CONLAW1 and choosing maxdensord=1 then
  100. P_i will be of at most first order, Div P of second order and df(u,x,3)
  101. will not be substituted and no non-trival conservation laws can be found.
  102. This does not mean that one will not find low order conservation laws at
  103. all with the substitution df(u,x,3)=..., one only has to go to
  104. maxdensord=2 with longer computations as a consequence compared to the
  105. input df(u,t)=-u*df(u,x)-df(u,x,3) where maxdensord=0 is enough to find
  106. non-trivial conservation laws.
  107. 3. It is not the case, that for any conserved current p_i, satisfying (2),
  108. there must exist characteristic function(s) q_i such that they satisfy (3).
  109. One can therefore not specify a known density p_t for CONLAW3 and hope to
  110. calculate the remaining p_i and the corresponding q_i with CONLAW3. What one
  111. can do is to use CONLAW1 to calculate the other components of p_i. But this
  112. restriction for CONLAW3 does not imply that it misses conservation laws.
  113. If (1) is a totally non-degenerate system then for each current p_i
  114. satisfying (2) there exists a current P_i differing from p_i only by a curl
  115. (-> trivial conservation law) such that P_i satisfies (3) for some suitable
  116. q_i.
  117. 4. The q_i are uniquely determined only modulo the original equations (1).
  118. If one makes an ansatz for q_i then this freedom should be removed by having
  119. the q_i independent of the LHS's of the equations (1) and independent of
  120. derivatives of the LHS's of (1). If the q_i were allowed to depend on
  121. anything, (3) could be solved for one q_i in terms of arbitrary p_j and other
  122. q_j, giving a triviality and not a conservation law. Also, these q_i would
  123. be singular for solutions of the differential equations as the expression
  124. of the differential equation would appear in the denominator.
  125. 5. Any ansatz for p_i made for CONLAW1 or p_i,q_j made for CONLAW2 should
  126. as well be independent of the LHS's of the equations (1) and independent of
  127. derivatives of the LHS's of (1).
  128. Flags:
  129. ------
  130. LISP (PRINT_:= NIL/0/1/ ...)$
  131. print_=nil suppresses all CRACK output, if print_=n (an integer) then
  132. CRACK prints only equations with at most n terms
  133. LISP (LOGOPRINT_:=t/nil)$
  134. print of a logo at the start of CONLAWi or not
  135. CRACKHELP()$
  136. for other flags regarding the solution of the overdetermined PDE-system
  137. OFF BATCH_MODE$
  138. to solve the system of conditions with CRACK interactively
  139. Requirements:
  140. -------------
  141. REDUCE 3.5 or higher and
  142. the files crack.red, conlaw0.red and one of the files
  143. conlaw1.red, conlaw2.red, conlaw3.red depending which
  144. program should be used
  145. Either read in files with
  146. IN "crack.red","conlaw0.red","conlaw1.red"$
  147. (and appropriate paths) or compile them before with
  148. FASLOUT "crack"$
  149. IN "crack"$
  150. FASLEND$
  151. FASLOUT "conlaw0"$
  152. IN "conlaw0.red"$
  153. FASLEND$
  154. FASLOUT "conlaw1"$
  155. IN "conlaw1.red"$
  156. FASLEND$
  157. BYE$
  158. and load them later with
  159. LOAD crack,conlaw0,conlaw1$
  160. conlaw2, conlaw3 are treated like conlaw1.
  161. Examples: (see also conlaw.tst)
  162. ---------
  163. (A CRACK-procedure nodepnd is used to clean up after each run and
  164. delete all dependencies of each function in the list of functions
  165. in the argument of nodepnd.)
  166. lisp(print_:=nil); % to suppress output from CRACK
  167. - a single PDE:
  168. depend u,x,t$
  169. conlaw1({{df(u,t)=-u*df(u,x)-df(u,x,3)}, {u}, {t,x}},
  170. {0, 1, t, {}, {}})$
  171. nodepnd {u}$
  172. - a system of equations:
  173. depend u,x,t$
  174. depend v,x,t$
  175. conlaw1({{df(u,t)=df(u,x,3)+6*u*df(u,x)+2*v*df(v,x),
  176. df(v,t)=2*df(u,x)*v+2*u*df(v,x) }, {u,v}, {t,x}},
  177. {0, 1, t, {}, {}})$
  178. nodepnd {u,v}$
  179. - a system of equations with ansatz:
  180. depend u,x,t$
  181. depend v,x,t$
  182. depend r,t,x,u,v,u!`2,v!`2$
  183. q_1:=r*df(u,x,2)$
  184. conlaw2({{df(u,t)=df(v,x),
  185. df(v,t)=df(u,x) }, {u,v}, {t,x}},
  186. {2, 2, t, {r}, {r}})$
  187. nodepnd {u,v,r}$
  188. - for the determination of parameters, such that conservation laws exist:
  189. depend u,x,t;
  190. conlaw1({{df(u,t)=-df(u,x,5)-a*u**2*df(u,x)-b*df(u,x)*df(u,x,2)
  191. -c*u*df(u,x,3)},
  192. {u}, {t,x}},
  193. {0, 1, t, {a,b,c}, {}});
  194. nodepnd {u};
  195. - for first integrals of an ODE-system including the determination of
  196. parameter values s,b,r such that conservation laws exist:
  197. depend x,t;
  198. depend y,t;
  199. depend z,t;
  200. depend a1,x,t;
  201. depend a2,y,t;
  202. depend a3,z,t;
  203. p_t:=a1+a2+a3;
  204. conlaw2({{df(x,t) = - s*x + s*y,
  205. df(y,t) = x*z + r*x - y,
  206. df(z,t) = x*y - b*z},
  207. {x,y,z},{t}
  208. },
  209. {0,0,t,{a1,a2,a3,s,r,b},{}});
  210. nodepnd {x,y,z,a1,a2,a3};