home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / MISC / MATH / LIE33.ZIP / LIE.DOC < prev    next >
Encoding:
Text File  |  1991-08-16  |  12.8 KB  |  375 lines

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