home *** CD-ROM | disk | FTP | other *** search
/ Best Objectech Shareware Selections / UNTITLED.iso / boss / educ / math / 012 / lie.doc < prev    next >
Encoding:
Text File  |  1993-03-09  |  13.2 KB  |  383 lines

  1.  
  2. LIE.DOC            Instructions for program LIE       (c) 1990,92  A K Head
  3. -------------------------------------------------------------------------------
  4.  
  5. Assumptions 
  6. -----------
  7.             You know why you want to use program LIE that finds the Lie group, 
  8. or rather the Lie algebra, of differential equations, ordinary or partial, 
  9. single or simultaneous, and you can use the output of this program to find 
  10. special similarity solutions, conserved quantities, reductions of order etc. 
  11. For example, you have seen the books "Applications of Lie Groups to 
  12. Differential Equations" by P. J. Olver ( and the worked examples in Chapters 2 
  13. and 3 ) or "Symmetries and Differential Equations" by G. W. Blumen and 
  14. S. Kumei or "Solution of Differential Equations by means of one-parameter 
  15. groups" by J. M. Hill or "Differential equations, their solution using 
  16. symmetries" by H. Stephani or the article "Symmetries of Differential 
  17. Equations: from Sophus Lie to Computer Algebra" by F. Schwarz, SIAM Review, 
  18. vol 30, Sept 1988, pp450-481. Many of the examples in the DAT files are from 
  19. these sources. 
  20.  
  21. Required
  22. --------
  23.         A PC of IBM type with 256k or more of free memory. Faster the better.
  24.  
  25. Warning
  26. -------
  27.         LIE will write two scratch files, SAVEA#.LIE and SAVEA#.BAK, on the 
  28. default disk. Make sure there is space available, 100k bytes should be 
  29. sufficient. If it is a floppy disk then it must NOT be write-protected. 
  30.  
  31. Example
  32. -------
  33.         All the DAT files are examples, mostly from the above references. Like 
  34. them, lets start with HEAT1.DAT which is the one-dimensional heat conduction 
  35. equation
  36.  
  37.                  du      d2u
  38.                  --  =   ---     ( sorry but can't type partial d )
  39.                  dt      dxdx
  40.  
  41.  
  42. Remember that MUMATH is an UPPERCASE SYSTEM. Put on that Caps Lock key.
  43. Remember that CONTROL-P will toggle on/off duplicate output to the printer 
  44. to give you a hardcopy record.
  45.  
  46.  
  47.  
  48. At the DOS prompt type
  49.  
  50. MULIE
  51.  
  52. This reads in MULIE.EXE
  53.  
  54. You now get the startup message then the MUMATH prompt of ?
  55.  
  56.  
  57. In reply to ? prompts type:
  58.  
  59. ? RDS(HEAT1,DAT);           ( yes a comma, reads in HEAT1.DAT )
  60. ? DOLIE();                  ( generates the Defining Equations )
  61. ? A#;                       ( optional, to see the Def Eqns )
  62. ? DOSOLV();                 ( solves the Def Eqns )
  63. ? DOCHECK();                ( checks that it really is a solution )
  64. ? DOVEC();                  ( generates the vectors of the Lie algebra )
  65. ? DONZC();                  ( optional, generates the non-zero commutators )
  66.  
  67. To read the output, U(1) and U1 are u, X1 is x, X2 is t and terms like D#(X1) 
  68. are to be read as partial d/dX1. 
  69.  
  70. Exit
  71. ----
  72.     At a ? prompt, exit to DOS by SYSTEM(); or a CONTROL-C
  73.  
  74.  
  75. Printout from test run of HEAT1.DAT  ( with added comments in " " )
  76. -------------------------------------------------------------------
  77. MULIE                                  " Startup message "
  78. Portions (c) by Soft Warehouse Inc
  79. All rights reserved worldwide
  80.  
  81.  
  82. ? RDS(HEAT1,DAT);
  83. @: HEAT1
  84. ?
  85. NIND#:2 $
  86.  
  87. ?              % 2 independent variables  X1 = x and X2 = t %
  88. NDEP#:1 $
  89.  
  90. ?              % 1 dependent variable  U(1) = u      %
  91. DE#:DV#:{} $
  92.  
  93. ?           % declare DE# and DV# to be arrays    %
  94. DE#[1]:   DIF(U(1),X2) - DIF(U(1),X1,2) $
  95.  
  96. ?        %  only one DE this time % 
  97. DV#[1]:   U(1,2) $
  98.  
  99. ?       % and one DeriVative to substitute %
  100. ECHO:FALSE$
  101. ?
  102. ? DOLIE();
  103. Program LIE  v. 4.1 (c) 1993  A K Head
  104.  
  105. (21)         "There are 21 terms in the prolongation
  106. (16)           becoming 16 terms after substituting for U(1,2)
  107. (4 8)           and this splits into 4 Def Eqns containing 8 terms. "
  108.  
  109. @: Def Eqns =  (4, 8)
  110.  
  111. ? A#;
  112. @: {DIF (F# (1, U1, X1, X2), U1, 2),
  113.     -DIF (F# (1, U1, X1, X2), X1, 2) + DIF (F# (1, U1, X1, X2), X2),
  114.     2*DIF (F# (2, X1, X2), X1) - DIF (F# (3, X2), X2),
  115.     -2*DIF (F# (1, U1, X1, X2), U1, X1) + DIF (F# (2, X1, X2), X1, 2) - DIF (F#
  116.  (2, X1, X2), X2),
  117.     UUU#1 == F# (1, U1, X1, X2),
  118.     XXX#1 == F# (2, X1, X2),
  119.     XXX#2 == F# (3, X2)}
  120.  
  121. " The 4 Def Eqns followed by the Lie transformation functions UUU and XXX with 
  122. UUU#1 for U1, XXX#1 for X1 etc. In the functions F#(...) the initial number is 
  123. an arbitrary sequence number and this is followed by the variables on which 
  124. this function depends. " 
  125.  
  126.  
  127. ? DOSOLV();
  128.  
  129. (4 10 4 1)   "This means there are now 4 Def Eqns containing 10 terms
  130. (3 9 2 3)     after applying Operation 4  to (what was) the 1st Def Eqn. "
  131. (4 9 1 3)
  132. (4 10 4 3)
  133. (4 11 3 3)
  134. (5 11 1 4)
  135. (4 9 2 2)
  136. (4 10 4 4)
  137. (4 14 3 4)
  138. (6 14 1 3)
  139. (8 14 1 6)
  140. (7 12 2 5)
  141. (7 13 4 1)
  142. (6 11 2 2)
  143. (6 12 4 1)
  144. (5 10 2 1)
  145. (5 11 4 1)
  146. (4 9 2 5)
  147. (4 10 4 1)
  148. (3 7 2 3)
  149. (3 8 4 1)
  150. (2 5 2 2)
  151. (2 6 4 2)
  152. (1 2 2 2)
  153.  
  154. @: {DIF (F# (5, X1, X2), X1, 2) - DIF (F# (5, X1, X2), X2),
  155.     UUU#1 == U1*X1*F# (14) + 2*U1*X2*F# (13) + U1*X1^2*F# (13) + U1*F# (17) - 
  156. F# (5, X1, X2),
  157.     XXX#1 == -4*X1*X2*F# (13) - X1*F# (15) - 2*X2*F# (14) - F# (16),
  158.     XXX#2 == -2*X2*F# (15) - 4*X2^2*F# (13) - F# (18)}
  159.  
  160. " One unsolved eqn ( a copy of the heat eqn ) followed by the solution for UUU 
  161. and XXX. An F#(number) is just an arbitrary constant. " 
  162.  
  163. ? DOCHECK();
  164.  
  165.  
  166. @: Check OK, proceed to DOVEC
  167.  
  168.                      "  Alternative message is:  Do DOCHECK again now. "
  169.  
  170. ? DOVEC();
  171.  
  172. Unsolved Equation
  173. DIF (F# (5, X1, X2), X1, 2) - DIF (F# (5, X1, X2), X2) == 0
  174.  
  175. Vectors
  176. VEC# (1) == -F# (5, X1, X2)*D# (U1)
  177. VEC# (2) == -D# (X2)
  178. VEC# (3) == -D# (X1)
  179. VEC# (4) == -X1*D# (X1) - 2*X2*D# (X2)
  180. VEC# (5) == U1*D# (U1)
  181. VEC# (6) == 2*U1*X2*D# (U1) + U1*X1^2*D# (U1) - 4*X1*X2*D# (X1) - 4*X2^2*D# (X2
  182. )
  183. VEC# (7) == U1*X1*D# (U1) - 2*X2*D# (X1)
  184.  
  185.  
  186. " End of test run "
  187.  
  188.  
  189.  
  190. Each vector is a fact about the differential equation so here are 7 facts 
  191. about the heat equation. As there are many ways to use these facts, this 
  192. program stops at this point ( except that the commutators can be calculated by 
  193. those who need them ). Examples of how the vectors can be turned into more 
  194. usable facts are given in the above references. 
  195.  
  196. For example, from Chap 2 of Olver, these vectors imply that if u = f(x,t) is a 
  197. solution of the heat equation then so are the 7 functions 
  198.  
  199. (1)   f(x-c,t)
  200. (2)   f(x,t-c)
  201. (3)   c*f(x,t)
  202. (4)   f(c*x,c^2*t)
  203. (5)   exp( -c*x + c^2*t) * f(u-2*c*t,t) 
  204. (6)   (1 + 4*c*t)^(-1/2) * exp( (-c*x^2)/(1 + 4*c*t) ) *
  205.                   f( x/(1 + 4*c*t), t/(1 + 4*c*t) )
  206. (7)   f(x,t) + c*g(x,t)
  207.  
  208. where c is any real constant and g(x,t) is any other solution of the heat 
  209. equation.
  210.  
  211. A different use is made of these facts in Chap 3 of Olver, namely to reduce 
  212. the heat equation from a partial differential equation to an ordinary 
  213. diffrential equation. Solving these ODEs gives various exact solutions to 
  214. the heat equation. Some of these are :
  215.  
  216. (a):
  217. u(x,t) = k*exp( -c*x + c^2*t) ) + l 
  218. is the most general travelling wave solution.
  219.  
  220. (b):
  221. u(x,t) = t^c * exp(-x^2/(8*t)) * { k*U( 2*c+1/2, x*(2*t)^(-1/2) )
  222.                       +l*V( 2*c+1/2, x*(2*t)^(-1/2) )
  223. is the general scale-invarient solution to the heat equation where U and V are 
  224. parabolic cylinder functions.
  225.  
  226. (c):
  227. A special case of (b) is
  228. u(x,t) = k * erf( x * (2*t)^(-1/2) )
  229. where erf is the error function.
  230.  
  231. (d):
  232. Another special case of (b) is
  233. u(x,t) = t^( (-n-1)/2 ) * exp( -x^2/(4*t) ) * Hn( x*(2*t)^(-1/2) )
  234. where Hn is the n-th Hermite polynomial.
  235.  
  236. (e):
  237. The source solution
  238. u(x,t) = c * t^(-1/2) * exp( -x^2/(4*t) )
  239.  
  240.  
  241.  
  242.  
  243. Your First Question
  244. -------------------
  245.                     Although the 7 vectors agree with the above references, 
  246. these all say that the 1-D heat equation generates 9 Defining Equations.
  247. But DOLIE() generated only 4   ????
  248.  
  249. Answer:  DOLIE() takes a shortcut that is important in saving time and 
  250. particularly memory space. It solves some of the Def Eqns as it generates 
  251. them. If desired, this shortcut can be turned off by changing the value
  252. of the variable SCUT# from TRUE to FALSE.
  253.  
  254.  
  255.  
  256. ---------------------------------------
  257. !  THE MOST IMPORTANT THING  FOR YOU  !
  258. ---------------------------------------
  259.                                         is to prepare correct input data.
  260. RDS(..) will check that the input is legal mathematics. But it cannot check 
  261. that it is what you really wanted.
  262.  
  263.            Most complaints of LIE misfunction have turned out to be typing 
  264. errors that changed the input DEs to other legal, but wrong, DEs.
  265.  
  266.            Next most frequent have been violations of the restrictions on what 
  267. types of DEs are acceptable to LIE.
  268.  
  269.            So read the following instructions on data preperation carefully.
  270. And observe the restrictions that are given.
  271.  
  272.  
  273.            Print out all the example DAT files to see how to prepare you DEs.
  274.  
  275.            You could type the input directly online but it is safer to prepare 
  276. a data file and RDS(... ,...); it in.   Terminate expressions online with ; 
  277. but for a file it is better to use $ . 
  278.  
  279.            The colon : is the MUMATH assignment sign. So NIND#:5 would be read 
  280. as " NIND# equals 5 " or " set the value of NIND# to 5 ". 
  281.            The percent sign % brackets comments. eg % This will be ignored % 
  282.            Square brackets [] index the entries of an array.
  283.  
  284.            The essential items in your input data file are:
  285. ECHO:TRUE$
  286. NIND#: "the number of independent variables" $
  287. NDEP#: "the number of dependent variables"  $
  288. DE#:DV#:{}$       ( This declares DE# and DV# to be arrays )
  289. DE#[1]:   "first DE " $
  290. DV#[1]:   "derivative to substitute from first DE " $
  291. DE#[2]:   "second DE "$
  292. DV#[2]:   "derivative to substitute from second DE "$
  293. etc
  294. ECHO:FALSE$
  295. RDS()$             ( This returns to reading input from the keyboard )
  296.  
  297.  
  298. Rules for writing the input DEs and DVs
  299. ---------------------------------------
  300.  
  301. In the following, "must" means that otherwise the program will probably give 
  302. an incorrect result, "desirable" means that the program is less likely to stop 
  303. from lack of memory and that speed will be greater. 
  304.  
  305.  
  306. The differential equations are written as MUMATH expressions.
  307. It is implied that each expression equals zero.
  308.  
  309. The independent variables must be X1,X2,X3,... up to the number specified by 
  310. NIND#. The dependent variables must be U(1),U(2),U(3),... up to the number 
  311. specified by NDEP#.  It is your choice how these are assigned to the physical 
  312. variables. And of course the number of simultaneous differential equations must 
  313. also equal NDEP#. 
  314.  
  315. Derivatives can be written in either of two ways. One way is as a MUMATH 
  316. derivative say DIF( U(2),X1,X2,3,X3,2) which is a sixth derivative of U(2), 
  317. once wrt X1, three times wrt X2 and twice wrt X3. The other way for the same 
  318. derivative is U(2,1,2,2,2,3,3) in an obvious notation. Use either or both as 
  319. you like, all will be converted to the second form for internal use by DOLIE. 
  320. After reading in the DEs with RDS(), type DE#; to see this internal form of 
  321. the DEs that will be used by DOLIE. It can also be useful to mix the two forms 
  322. ( e.g. KP.DAT ). 
  323.  
  324. The DEs must be polynomial in the derivatives. Derivatives must not appear in 
  325. denominators or in square roots or other fractional powers or in functions.
  326.  
  327. It is desirable that there be no denominators in the DEs.
  328. Multiply your DEs through to remove denominators.       
  329.  
  330. Besides derivatives and the independent and dependent variables and your 
  331. symbolic constants and functions, the expression can contain  + - * / ^ () #PI 
  332. #E #I and the functions SIN COS LOG ( or LN ) ERF EI but must not contain 
  333. square roots or other fractional powers or other trig functions like TAN or 
  334. SEC or inverse trig functions. 
  335.  
  336. Do not use names containing the character # for your symbolics. LIE has a 
  337. number of reserved words but there is no need for a list as they all contain 
  338. the character #.
  339.  
  340. Exponential is the usual MUMATH #E^  , "e to the power ... ".  (eg EXPU.DAT)
  341.  
  342. The arguments of the trig functions SIN and COS can be independent or 
  343. dependent variables or integer multiples of these or linear combinations of 
  344. these. But must not be half-angles etc.
  345.  
  346. Simultaneous DEs are processed in the order [1],[2],...  It is desirable that 
  347. simpler lowest order equations have the lower numbers.
  348.  
  349. Expressions can run over many lines until the terminator $    (eg MZ.DAT)
  350.  
  351. Remember that MUMATH is an UPPERCASE SYSTEM. Put on that Caps Lock key.
  352.  
  353.  
  354. Rules for choosing the DeriVatives in DV#
  355. -----------------------------------------
  356.  
  357.     For each DE#[.] you must choose a DeriVative DV#[.] that occurs in that DE.
  358. The DE will be solved for this DV and substituted in the prolongation, thus 
  359. eliminating that derivative from the prolongation. 
  360.  
  361.     In order for the program to solve for this DV, it must occur linearly in 
  362. the DE. 
  363.  
  364.     For simultaneous DEs, the substitutions will be done in the order 
  365. [1],[2],...    The choice of the DVs must be such that an early DV is not 
  366. reintroduced by a later substitution so giving a circular substitution.
  367. See NAVSTOKE.DAT and IMPOSBLE.DAT for examples.
  368.     If there is a choice left after these musts then it is desirable to:
  369. Pick highest order derivatives.
  370. Pick derivatives with coefficients +1 or -1 or, failing this, with a 
  371. multiplicative coefficient. Worst is a coefficient that is the sum of terms.
  372.  
  373.  
  374.  
  375.  
  376. This is enough to read now.
  377. Try some examples.
  378. Then read MORELIE.DOC
  379.  
  380.         Alan Head
  381.  
  382.