applysym.rlg 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438
  1. Tue Apr 15 00:33:27 2008 run on win32
  2. load crack,applysym$
  3. %*******************************************************************%
  4. % %
  5. % A P P L Y S Y M . T S T %
  6. % ----------------------- %
  7. % applysym.tst contains test examples to test the procedure %
  8. % quasilinpde in the file applysym.red. %
  9. % %
  10. % Author: Thomas Wolf %
  11. % Date: 22 May 1998 %
  12. % %
  13. % You need crack.red and applysym.red to run this demo. %
  14. % To use other contents of the program applysym, not demonstrated %
  15. % in this demo you need the program liepde.red. %
  16. % %
  17. % To run this demo you read in files with %
  18. % in "crack.red"$ %
  19. % in "applysym.red"$ %
  20. % or, to speed up the calculation you compile them before with %
  21. % faslout "crack"$ %
  22. % in "crack.red"$ %
  23. % faslend$ %
  24. % faslout "applysym"$ %
  25. % in "applysym.red"$ %
  26. % faslend$ %
  27. % and then load them with %
  28. % load crack,applysym$ %
  29. % %
  30. %*******************************************************************%
  31. load crack;
  32. lisp(depl!*:=nil)$
  33. % clearing of all dependencies
  34. setcrackflags()$
  35. lisp(print_:=nil)$
  36. on dfprint$
  37. comment
  38. -------------------------------------------------------
  39. This file is supposed to provide an automatic test of
  40. the program APPLYSYM. On the other hand the application
  41. of APPLYSYM is an interactive process, therefore the
  42. interested user should inspect the example described
  43. in APPLYSYM.TEX which demonstrates the application
  44. of symmetries to integrate a 2nd order ODE.
  45. Here the program QUASILINPDE for integrating first
  46. order quasilinear PDE is demonstrated.
  47. The following equation comes up in the elimination
  48. of resonant terms in normal forms of singularities
  49. of vector fields (C.Herssens, P.Bonckaert, Limburgs
  50. Universitair Centrum/Belgium, private communication);
  51. write"-------------------"$
  52. -------------------
  53. lisp(print_:=nil)$
  54. depend w,x,y,z$
  55. QUASILINPDE( df(w,x)*x+df(w,y)*y+2*df(w,z)*z-2*w-x*y, w, {x,y,z} )$
  56. x*y
  57. {{-----,
  58. z
  59. - log(z)*x*y + 2*w
  60. ---------------------,
  61. z
  62. x
  63. ---------}}
  64. sqrt(z)
  65. nodepend w,x,y,z$
  66. comment
  67. -------------------------------------------------------
  68. The result means that w is defined implicitly through
  69. x*y - log(z)*x*y + 2*w y
  70. 0 = ff(-----,---------------------,---------)
  71. z z sqrt(z)
  72. with an arbitrary function ff of 3 arguments. As the PDE
  73. was linear, the arguments of ff are such that we can
  74. solve for w:
  75. x*y y
  76. w = log(z)*x*y/2 + z*f(-----,---------)
  77. z sqrt(z)
  78. with an arbitrary function f of 2 arguments.
  79. -------------------------------------------------------
  80. The following PDEs are taken from E. Kamke,
  81. Loesungsmethoden und Loesungen von Differential-
  82. gleichungen, Partielle Differentialgleichungen
  83. erster Ordnung, B.G. Teubner, Stuttgart (1979);
  84. write"-------------------"$
  85. -------------------
  86. % equation 1.4 ----------------------
  87. lisp(depl!*:=nil)$
  88. depend z,x,y$
  89. QUASILINPDE( x*df(z,x)-y, z, {x,y})$
  90. {{log(x)*y - z,y}}
  91. write"-------------------"$
  92. -------------------
  93. % equation 2.5 ----------------------
  94. lisp(depl!*:=nil)$
  95. depend z,x,y$
  96. QUASILINPDE( x**2*df(z,x)+y**2*df(z,y), z, {x,y})$
  97. - x + y
  98. {{----------,z}}
  99. x*y
  100. write"-------------------"$
  101. -------------------
  102. % equation 2.6 ----------------------
  103. lisp(depl!*:=nil)$
  104. depend z,x,y$
  105. QUASILINPDE( (x**2-y**2)*df(z,x)+2*x*y*df(z,y), z, {x,y})$
  106. 2 2
  107. - (x + y )
  108. {{z,--------------}}
  109. y
  110. write"-------------------"$
  111. -------------------
  112. % equation 2.7 ----------------------
  113. lisp(depl!*:=nil)$
  114. depend z,x,y$
  115. QUASILINPDE( (a0*x-a1)*df(z,x)+(a0*y-a2)*df(z,y), z, {x,y})$
  116. a1*y - a2*x
  117. {{----------------,z}}
  118. a1*(a0*x - a1)
  119. write"-------------------"$
  120. -------------------
  121. % equation 2.14 ---------------------
  122. lisp(depl!*:=nil)$
  123. depend z,x,y$
  124. QUASILINPDE( a*df(z,x)+b*df(z,y)-x**2+y**2, z, {x,y})$
  125. 2 3 2 3 2 2 2 3
  126. {{a *y - 3*a*b*x*y - 3*b *z + 3*b *x *y - b *y ,
  127. a*y - b*x}}
  128. write"-------------------"$
  129. -------------------
  130. % equation 2.16 ---------------------
  131. lisp(depl!*:=nil)$
  132. depend z,x,y$
  133. QUASILINPDE( x*df(z,x)+y*df(z,y)-a*x, z, {x,y})$
  134. - a*x
  135. {{a*x - z,--------}}
  136. y
  137. write"-------------------"$
  138. -------------------
  139. % equation 2.20 ---------------------
  140. lisp(depl!*:=nil)$
  141. depend z,x,y$
  142. QUASILINPDE( df(z,x)+df(z,y)-a*z, z, {x,y})$
  143. a*x
  144. {{e ,x - y}}
  145. write"-------------------"$
  146. -------------------
  147. % equation 2.21 ---------------------
  148. lisp(depl!*:=nil)$
  149. depend z,x,y$
  150. QUASILINPDE( df(z,x)-y*df(z,y)+z, z, {x,y})$
  151. x x
  152. {{e *z,e *y}}
  153. write"-------------------"$
  154. -------------------
  155. % equation 2.22 ---------------------
  156. lisp(depl!*:=nil)$
  157. depend z,x,y$
  158. QUASILINPDE( 2*df(z,x)-y*df(z,y)+z, z, {x,y})$
  159. x/2 x/2
  160. {{e *z,e *y}}
  161. write"-------------------"$
  162. -------------------
  163. % equation 2.23 ---------------------
  164. lisp(depl!*:=nil)$
  165. depend z,x,y$
  166. QUASILINPDE( a*df(z,x)+y*df(z,y)-b*z, z, {x,y})$
  167. (b*x)/a y
  168. {{e ,------}}
  169. x/a
  170. e
  171. write"-------------------"$
  172. -------------------
  173. % equation 2.24 ---------------------
  174. lisp(depl!*:=nil)$
  175. depend z,x,y$
  176. QUASILINPDE( x*(df(z,x)-df(z,y))-y*df(z,y), z,{x,y})$
  177. {{x*(x + 2*y),z}}
  178. write"-------------------"$
  179. -------------------
  180. % equation 2.25 ---------------------
  181. lisp(depl!*:=nil)$
  182. depend z,x,y$
  183. QUASILINPDE( x*df(z,x)+y*df(z,y)-az, z, {x,y})$
  184. {{y,x}}
  185. write"-------------------"$
  186. -------------------
  187. % equation 2.26 ---------------------
  188. lisp(depl!*:=nil)$
  189. depend z,x,y$
  190. QUASILINPDE( x*df(z,x)+y*df(z,y)-z+x**2+y**2-1, z, {x,y})$
  191. 2 2
  192. x + y + z + 1 x
  193. {{-----------------,---}}
  194. y y
  195. write"-------------------"$
  196. -------------------
  197. % equation 2.39 ---------------------
  198. lisp(depl!*:=nil)$
  199. depend z,x,y$
  200. QUASILINPDE( a*x**2*df(z,x)+b*y**2*df(z,y)-c*z**2, z, {x,y})$
  201. b*y - c*z
  202. {{-----------,
  203. c*y*z
  204. - a*x + b*y
  205. --------------}}
  206. a*x*y
  207. write"-------------------"$
  208. -------------------
  209. % equation 2.40 ---------------------
  210. lisp(depl!*:=nil)$
  211. depend z,x,y$
  212. QUASILINPDE( x*y**2*df(z,x)+2*y**3*df(z,y)-2*(y*z-x**2)**2, z,
  213. {x,y})$
  214. 4 2 2
  215. log(y)*x - log(y)*x *y*z - y *z
  216. {{----------------------------------,
  217. 2 2
  218. x *(x - y*z)
  219. x
  220. ---------}}
  221. sqrt(y)
  222. write"-------------------"$
  223. -------------------
  224. % equation 3.12 ---------------------
  225. lisp(depl!*:=nil)$
  226. depend w,x,y,z$
  227. QUASILINPDE( x*df(w,x)+(a*x+b*y)*df(w,y)+(c*x+d*y+f*z)*df(w,z), w,
  228. {x,y,z})$
  229. 2
  230. - a*d*x + b*c*x + b*f*z - b*z - c*f*x - d*f*y + d*y - f *z + f*z
  231. {{-------------------------------------------------------------------,
  232. f 2
  233. x *(b*f - b - f + f)
  234. d*(a*x + b*y - y)
  235. -----------------------,
  236. b 2
  237. x *(b - b*f - b + f)
  238. w}}
  239. write"-------------------"$
  240. -------------------
  241. % end -------------------------------
  242. lisp(depl!*:=nil)$
  243. end$
  244. Time for test: 1744 ms, plus GC time: 75 ms