crack.tex 62 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235
  1. \documentclass[12pt]{article}
  2. %Sets size of page and margins
  3. \oddsidemargin 10mm \evensidemargin 10mm
  4. \topmargin 0pt \headheight 0pt \headsep 0pt
  5. \textwidth 15cm
  6. \title{The computer algebra package {\sc Crack}
  7. for solving over-determined systems of equations}
  8. \author{Thomas Wolf \\
  9. Department of Mathematics \\
  10. Brock University \\
  11. St.Catharines \\
  12. Ontario, Canada L2S 3A1 \\
  13. twolf@brocku.ca}
  14. \begin{document}
  15. \maketitle
  16. \tableofcontents
  17. \section{Online help}
  18. \subsection{Help to help}
  19. \begin{tabbing}
  20. {\bf hd} \ \= Help to inspect data \\
  21. {\bf hp} \> Help to proceed \\
  22. {\bf hf} \> Help to change flags \& parameters \\
  23. {\bf hc} \> Help to change data of equations \\
  24. {\bf hi} \> Help to work with identities \\
  25. {\bf hb} \> Help to trace and debug
  26. \end{tabbing}
  27. \subsection{Help to inspect data}
  28. \begin{tabbing}
  29. {\bf e}\ \ \ \ \= Print equations \\
  30. {\bf eo} \> Print overview of functions in equations \\
  31. {\bf pi} \> Print inequalities \\
  32. {\bf f} \> Print functions and variables \\
  33. {\bf v} \> Print all derivatives of all functions \\
  34. {\bf s} \> Print statistics \\
  35. {\bf fc} \> Print no of free cells \\
  36. {\bf pe} \> Print an algebraic expression \\
  37. {\bf ph} \> Print history of interactive input \\
  38. {\bf pv} \> Print value of any lisp variable \\
  39. {\bf pd} \> Plot the occurence of functions in equations \\
  40. {\bf ss} \> Find and print sub-systems \\
  41. {\bf w} \> Write equations into a file
  42. \end{tabbing}
  43. \subsection{Help to proceed}
  44. \begin{tabbing}
  45. {\bf a}\ \ \ \ \= Do one step automatically \\
  46. {\bf g} \> Go on for a number of steps automatically \\
  47. {\bf t} \> Toggle between automatic and user selection of
  48. equations ({\tt expert\_mode=nil/t}). \\
  49. {\bf p1} \> Print a list of all modules in batch mode \\
  50. {\bf p2} \> Print a complete list of all modules \\
  51. {\bf \#} \> Execute the module with the number `\#' once \\
  52. {\bf l} \> Execute a specific module repeatedly \\
  53. {\bf sb} \> Save complete backup to file \\
  54. {\bf rb} \> Read backup from file \\
  55. {\bf ep} \> Enable parallelism \\
  56. {\bf dp} \> Disable parallelism \\
  57. {\bf pp} \> Start an identical parallel process \\
  58. {\bf kp} \> Kill a parallel process \\
  59. {\bf x} \> Exit interactive mode for good \\
  60. {\bf q} \> Quit current level or crack if in level 0 \\
  61. \end{tabbing}
  62. \subsection{Help to change flags \& parameters}
  63. \begin{tabbing}
  64. {\bf pl} \ \ \ \= Maximal length of an expression to be printed \\
  65. {\bf pm} \> Toggle to print more or less information about
  66. pdes ({\tt print\_more}) \\
  67. {\bf pa} \> Toggle to print all or not all information
  68. about the pdes ({\tt print\_all}) \\
  69. {\bf cp} \> Change the priorities of procedures \\
  70. {\bf og} \> Toggle ordering between `lexicographical
  71. ordering of functions having\\
  72. \> a higher priority than any ordering of
  73. derivatives' and the opposite \\
  74. \> ({\tt lex\_fc=t}) resp.\ ({\tt lex\_fc=nil}) \\
  75. {\bf od} \> Toggle ordering between `the total order
  76. of derivatives having a higher\\
  77. \> priority than lexicographical ordering'
  78. ({\tt lex\_df=nil}) or not ({\tt lex\_df=t}) \\
  79. {\bf oi} \> Interactive change of ordering on variables \\
  80. {\bf or} \> Reverse ordering on variables \\
  81. {\bf om} \> Mix randomly ordering on variables \\
  82. {\bf of} \> Interactive change of ordering on functions \\
  83. {\bf op} \> Print current ordering \\
  84. {\bf ne} \> Root of the name of new generated equations
  85. (default: e\_) \\
  86. {\bf nf} \> Root of the name of new functions and constants
  87. (default: c\_) \\
  88. {\bf ni} \> Root of the name of new identities
  89. (default: id\_) \\
  90. {\bf na} \> Toggle for the NAT output switch ({\tt !*nat}) \\
  91. {\bf as} \> Input of an assignment \\
  92. {\bf kp} \> Toggle for keeping a partitioned copy of each
  93. equation ({\tt keep\_parti}) \\
  94. {\bf fi} \> Toggle for allowing or not allowing
  95. integrations of equations which \\
  96. \> involve unresolved integrals ({\tt freeint\_}) \\
  97. {\bf fa} \> Toggle for allowing or not allowing solutions of ODEs
  98. involving the \\
  99. \> {\tt abs} function ({\tt freeabs\_}) \\
  100. {\bf cs} \> Switch on/off the confirmation of intended substitutions
  101. and of the \\
  102. \> order of the investigation of subcases
  103. resulting in a factorization \\
  104. {\bf fs} \> Enforce direct separation \\
  105. {\bf ll} \> change of the line length \\
  106. {\bf re} \> Toggle for allowing to re-cycle equation names
  107. ({\tt do\_recycle\_eqn}) \\
  108. {\bf rf} \> Toggle for allowing to re-cycle function names
  109. ({\tt do\_recycle\_fnc}) \\
  110. {\bf st} \> Setting a CPU time limit for un-interrupted run \\
  111. {\bf cm} \> Adding a comment to the history\_ list \\
  112. {\bf lr} \> Adding a LET-rule \\
  113. {\bf cr} \> Clearing a LET-rule
  114. \end{tabbing}
  115. \subsection{Help to change data of equations}
  116. \begin{tabbing}
  117. {\bf r}\ \ \ \ \ \= Replace or add one equation \\
  118. {\bf n} \> Replace one inequality \\
  119. {\bf d} \> Delete one equation \\
  120. {\bf c} \> Change a flag or property of one pde
  121. \end{tabbing}
  122. \subsection{Help to work with identities}
  123. \begin{tabbing}
  124. {\bf i}\ \ \ \ \ \= Print identities between equations \\
  125. {\bf id} \> Delete redundand equations \\
  126. {\bf iw} \> Write identities to a file \\
  127. {\bf ir} \> Remove list of identities \\
  128. {\bf ia} \> Add or replace an identity \\
  129. {\bf ih} \> Start recording histories and identities \\
  130. {\bf ip} \> Stop recording histories and identities \\
  131. {\bf ii} \> Integrate an identity \\
  132. {\bf ic} \> Check the consistency of identity data \\
  133. {\bf iy} \> Print the history of equations
  134. \end{tabbing}
  135. \subsection{Help to trace and debug}
  136. \begin{tabbing}
  137. {\bf tm} \ \= Toggle for tracing the main procedure ({\tt tr\_main}) \\
  138. {\bf tg} \> Toggle for tracing the generalized separation
  139. ({\tt tr\_gensep}) \\
  140. {\bf ti} \> Toggle for tracing the generalized integration
  141. ({\tt tr\_genint}) \\
  142. {\bf td} \> Toggle for tracing the decoupling process
  143. ({\tt tr\_decouple}) \\
  144. {\bf tl} \> Toggle for tracing the decoupling length reduction
  145. process ({\tt tr\_redlength}) \\
  146. {\bf ts} \> Toggle for tracing the algebraic length reduction
  147. process ({\tt tr\_short}) \\
  148. {\bf to} \> Toggle for tracing the ordering procedures
  149. process ({\tt tr\_orderings}) \\
  150. {\bf tr} \> Trace an arbitrary procedure \\
  151. {\bf ut} \> Untrace a procedure \\
  152. {\bf br} \> Lisp break \\
  153. {\bf pc} \> Do a function call \\
  154. {\bf in} \> Reading in a REDUCE file
  155. \end{tabbing}
  156. \section{The purpose of Crack}
  157. The package {\sc Crack} attempts the solution of an overdetermined
  158. system of algebraic or ordinary or partial differential
  159. equations (ODEs/PDEs) with at most polynomial nonlinearities.
  160. Under `normal circumstances' differential
  161. equations (DEs) which describe physical
  162. processes are not overdetermined, i.e.\ the number of DEs
  163. matches the number of unknown functions which are involved.
  164. Applying the package {\sc Crack} to such problems directly may be
  165. successful, especially if these are ODEs, but the main type of
  166. application is to investigate qualitative properties of such DEs/systems
  167. of DEs and to solve the overdetermined PDE-systems that result in these
  168. investigations.
  169. Applications of {\sc Crack} include a program {\sc Conlaw}
  170. for the computation of conservation laws of DEs, a program
  171. {\sc LiePDE} for the computation of infinitesimal symmetries of DEs
  172. and a program {\sc ApplySym} for the computation of symmetry and
  173. similarity variables from infinitesimal symmetries.
  174. \section{Technical details}
  175. \subsection{System requirements}
  176. The required system is {\sc Reduce}, version
  177. 3.6. or 3.7. (either the PSL version of {\sc Reduce} as distributed by
  178. the Konrad Zuse Institut / Berlin or the CSL version of {\sc Reduce}
  179. as distributed by CODEMIST Ltd). The PSL version is faster whereas
  180. the CSL version seems to be more stable under WINDOWS. Also it
  181. provides a portable compiled code.
  182. Memory requirements depend crucially on the
  183. application. The {\tt crack.rlg} file is produced from running
  184. {\tt crack.tst} in a 4MB session running {\sc Reduce}, version 3.7 under
  185. {\sc Linux}. On the other hand it is not difficult to formulate problems that
  186. consume any amount of memory.
  187. \subsection{Installation}
  188. In a running {\sc Reduce} session either do \\
  189. \verb+ in "crack.red"$ + \\
  190. or, in order to speed up computation, either compile it with
  191. \verb+ on comp$ + \\
  192. before the above command, or, generate a fast-loading compiled
  193. file once with \\
  194. \verb+ faslout "crack"$ + \\
  195. \verb+ in "crack.red"$ + \\
  196. \verb+ faslend$ + \\
  197. and load that file to run {\sc Crack} with \\
  198. \verb+ load crack$ +
  199. \subsection{Updates / web demos}
  200. %%{\sc Crack} can be run from a web demo
  201. %A web demo under the address
  202. %\verb+http://cathode.maths.qmw.ac.uk/demo.html+
  203. %that was created by Francis Wright and Arrigo Triulzi
  204. %allows to run problems of restricted size.
  205. The latest version of {\sc Crack} and related programs
  206. is available from \\
  207. \verb+http://lie.math.brocku.ca/twolf/crack/+.
  208. Publications related to {\sc Crack} can be found under \\
  209. \verb+http://lie.math.brocku.ca/twolf/home/publications.html#1+.
  210. \subsection{The files}
  211. The following files are provided with {\sc Crack}
  212. \begin{itemize}
  213. \item {\tt crack.red} contains read-in statements of a number
  214. of files {\tt cr*.red}.
  215. \item {\tt crack.tst} contains test-examples.
  216. \item {\tt crack.rlg} contains the output of {\tt crack.tst}.
  217. \item {\tt crack.tex} is this manual.
  218. \end{itemize}
  219. \subsection{The call}
  220. {\sc Crack} is called by
  221. \begin{tabbing}
  222. {\tt crack}(\=\{{\it equ}$_1$, {\it equ}$_2$, \ldots , {\it equ}$_m$\}, \\
  223. \>\{{\it ineq}$_1$, {\it ineq}$_2$, \ldots , {\it ineq}$_n$\}, \\
  224. \>\{{\it fun}$_1$, {\it fun}$_2$, \ldots , {\it fun}$_p$\}, \\
  225. \>\{{\it var}$_1$, {\it var}$_2$, \ldots , {\it var}$_q$\});
  226. \end{tabbing}
  227. $m,n,p,q$ are arbitrary.
  228. \begin{itemize}
  229. \item
  230. The {\it equ}$_i$ are identically vanishing partial differential expressions,
  231. i.e.\
  232. they represent equations $0 = {\it equ}_i$, which are to be solved for the
  233. functions ${\it fun}_j$ as far as possible, thereby drawing only necessary
  234. conclusions and not restricting the general solution.
  235. \item
  236. The {\it ineq}$_i$ are algebraic or differential expressions which must
  237. not vanish identically for
  238. any solution to be determined, i.e. only such solutions are computed for which
  239. none of the expressions {\it ineq}$_i$ vanishes identically in all independent
  240. variables.
  241. \item
  242. The dependence of the (scalar) functions ${\it fun}_j$ on independent
  243. variables must be defined beforehand with {\tt DEPEND} rather than
  244. declaring these functions
  245. as operators. Their arguments may themselves only be identifiers
  246. representing variables, not expressions.
  247. Also other unknown functions not in ${\it fun}_j$ must not be represented
  248. as operators but only using {\tt DEPEND}.
  249. \item
  250. The functions ${\it fun}_j$ and their derivatives may only occur polynomially.
  251. \item
  252. The ${\it var}_k$ are further independent variables, which are not
  253. already arguments
  254. of any of the ${\it fun}_j$. If there are none then the fourth argument is
  255. the empty list \{\}, although it does no harm to include arguments of
  256. functions ${\it fun}_j$.
  257. \item
  258. The dependence of the ${\it equ}_i$ on the independent variables and on
  259. constants and functions other than ${\it fun}_j$ is arbitrary.
  260. \item
  261. {\sc Crack} can be run in automatic batch mode (by default) or
  262. interactively with the switch {\tt OFF BATCH\_MODE}.
  263. \end{itemize}
  264. \subsection{The result}
  265. The result is a list of solutions
  266. \[ \{{\it sol}_1, \ldots \} \]
  267. where each solution is a list of 4 lists:
  268. \begin{tabbing}
  269. \{\=\{${\it con}_1, \; {\it con}_2, \ldots , \; {\it con}_q$\}, \\
  270. \>\{${\it fun}_a={\it ex}_a, \;\;
  271. {\it fun}_b={\it ex}_b, \ldots , \;\; {\it fun}_p={\it ex}_p$\},\= \\
  272. \>\{${\it fun}_c, \;\; {\it fun}_d, \ldots , \;\; {\it fun}_r$\}, \> \\
  273. \>\{{\it ineq}$_1$, {\it ineq}$_2$, \ldots , {\it ineq}$_s$\}. \> \}
  274. \end{tabbing}
  275. For example, in the case of a linear system, the input consists of at
  276. most one solution ${\it sol}_1$.
  277. If {\sc Crack} finds a contradiction as e.g. $0=1$ then there exists no
  278. solution and it returns the empty list \{\}. If {\sc Crack}
  279. can factorize algebraically a non-linear equation then factors are set
  280. to zero individually and different sub-cases are studied by
  281. {\sc Crack} calling itself recursively.
  282. If during such a recursive call a contradiction results,
  283. then this sub-case will not have a solution but other sub-cases still
  284. may have solutions.
  285. The empty list is also returned if no solution exists
  286. which satisfies the inequalities
  287. {\it ineq}$_i \neq 0.$
  288. The expressions ${\it con}_i$ (if there are any), are the
  289. remaining necessary and sufficient conditions for the functions
  290. ${\it fun}_c,\ldots,{\it fun}_r$ in the third list. Those
  291. functions can be original functions from the equations to be
  292. solved (of the second argument of the call of {\sc Crack}) or new
  293. functions or constants which arose from integrations.
  294. The dependence of new functions on variables is declared with {\tt DEPEND}
  295. and to visualize this dependence the algebraic mode function
  296. ${\tt FARGS({\it fun}_i)}$ can be used.
  297. If there are no ${\it con}_i$ then all equations are solved and the
  298. functions in the third list are unconstrained.
  299. The second list contains
  300. equations ${\it fun}_i={\it ex}_i$ where each ${\it fun}_i$ is an
  301. original function and ${\it ex}_i$ is the computed expression
  302. for ${\it fun}_i$.
  303. The elements of the fourth
  304. list are the expressions who have been assumed to be unequal zero
  305. in the derivation of this solution.
  306. \subsection{Interactive mode, flags, parameters and the list of procedures}
  307. Under normal circumstances one will try to have problems solved
  308. automatically by {\sc Crack}. An alternative is to input
  309. {\tt OFF BATCH\_MODE;} before calling {\sc Crack} and to solve problems
  310. interactively. In interactive mode it is possible to
  311. \begin{itemize}
  312. \item inspect data, like equations and their properties, unknown
  313. functions, variables, identities, a statistics,
  314. \item save, change, add or drop equations,
  315. \item add inequalities,
  316. \item inspect and change flags and parameters which govern individual
  317. modules as well as their interplay,
  318. \item pick a list of methods to be used out of about 30 different
  319. ones, and specify their priorities and in this way very easily
  320. compose an automatic solving strategy,
  321. \item or, for more interactive work, to specify how to proceed, i.e.\
  322. which computational step to do and how often, like doing
  323. \begin{description}
  324. \item one automatic step,
  325. \item one specific step,
  326. \item a number of automatic steps,
  327. \item a specific step as often as possible or a specified number of times.
  328. \end{description}
  329. \end{itemize}
  330. To get interactive help one enters `h' or `?'.
  331. Flags and parameters are stored as symbolic fluid variables
  332. which means that they can be accessed by {\tt lisp( ... )},
  333. like {\tt lisp( print\_:=5 );} before calling {\sc Crack}.
  334. {\tt print\_}, for example, is a measure of the maximal
  335. length of expressions to be printed on the screen
  336. (the number of factors in terms).
  337. A complete list of flags and parameters is given at the beginning of
  338. the file {\tt crinit.red}.
  339. One more parameter shall be mentioned, which is the list of modules/procedures
  340. called {\tt proc\_list\_}. In interactive mode this list can be looked
  341. at with {\tt `p'} or be changed with {\tt `cp'}. This list defines
  342. in which order the different modules/procedures are tried whenever
  343. {\sc Crack} has to decide of what to do next. Exceptions
  344. to this rule may be specified. For example, some procedure, say
  345. $P_1$, requires after its execution another
  346. specific procedure, say $P_2$, to be executed, no matter whether
  347. $P_2$ is next according to {\tt proc\_list\_} or not. This is managed by $P_1$
  348. writing a task for procedure $P_2$ into a hot-list. Tasks listed in
  349. the global variable {\tt `to\_do\_list'} are
  350. dealt with in the {\tt `to\_do'} step which should
  351. always come first in {\tt proc\_list\_}.
  352. A way to have the convenience of running {\sc Crack} automatically
  353. and still being able to break the fixed rhythm prescribed by {\tt
  354. proc\_list\_} is to have the entry {\tt stop\_batch} in {\tt proc\_list\_}
  355. and have {\sc Crack} started in automatic batch mode. Then execution
  356. is continuing
  357. until none of the procedures which come before {\tt stop\_batch} are
  358. applicable any more so that {\tt stop\_batch} is executed next which will
  359. stop automatic execution and go into interactive mode. This allows
  360. either to continue the computation interactively, or to change the
  361. {\tt proc\_list\_} with {\tt `cp'} and to continue in automatic mode.
  362. The default value of {\tt proc\_list\_} does not include all possible
  363. modules because not all are suitable for any kind of overdetermined
  364. system to be solved. The complete list is shown in interactive mode
  365. under {\tt `cp'}. A few basic modules are described in the following
  366. section. The efficiency of {\sc Crack} in automatic mode is very much
  367. depending on the content of {\tt proc\_list\_} and the sequence of its
  368. elements. Optimizing {\tt proc\_list\_} for a given task needs
  369. experience which can not be formalized in a few simple rules and will
  370. therefore not be explained in more detail here. The following remarks
  371. are only guidelines.
  372. \begin{description}
  373. \item[{\tt to\_do :}] hot list of steps to be taken next, should
  374. always come first,
  375. \item[{\tt subst\_level\_? :}] substitutions of functions by
  376. expressions, substitutions differ by their maximal allowed size and other
  377. properties,
  378. \item[{\tt separation :}] what is described as direct separation in the
  379. next section,
  380. \item[{\tt gen\_separation :}] what is described as indirect separation in the
  381. next section, only to be used for linear problems,
  382. \item[{\tt quick\_gen\_separation :}] generalized separation of
  383. equations with an upper size limit,
  384. \item[{\tt quick\_integration :}] integration of very specific short equations,
  385. \item[{\tt full\_integration :}] integration of equations which lead
  386. to a substitution,
  387. \item[{\tt integration :}] any integration,
  388. \item[{\tt factorization :}] splitting the computation into the
  389. investigation of different subcases resulting from the algebraic
  390. factorization of an equation, only useful for non-linear problems,
  391. \item[{\tt change\_proc\_list :}] reserved name of a procedure to be
  392. written by the user that does nothing else but changing proc\_list\_ in
  393. a fixed manner. This is to be used if the computation splits naturally
  394. into different parts and if it is clear from the beginning what the
  395. computational methods (proc\_list\_) have to be.
  396. \item[{\tt stop\_batch :}] If the first steps to simplify or partially
  397. solve a system of equations are known and should be done automatically
  398. and afterwards {\sc Crack} should switch into interactive mode
  399. then {\tt stop\_batch} is added to {\tt proc\_list} with a priority
  400. just below the steps to be done automatically.
  401. \item[{\tt drop\_lin\_dep :}] module to support
  402. solving big linear systems (still experimental),
  403. \item[{\tt find\_1\_term\_eqn :}] module to support
  404. solving big linear systems (still experimental),
  405. \item[{\tt trian\_lin\_alg :}] module to support
  406. solving big linear systems (still experimental),
  407. \item[{\tt undetlinode :}] parametric solution of single under determined
  408. linear ODE (with non-constant coefficients), only applicable for
  409. linear problems (Too many redundant functions resulting from
  410. integrations may prevent further integrations. If they are involved in
  411. single ODEs then the parametric solution of such ODEs treated as
  412. single underdetermined equations is useful. Danger: new generated
  413. equations become very big if the minimal order of any function in the ODE is high.),
  414. \item[{\tt undetlinpde :}] parametric solution of single under determined
  415. linear PDE (with non-constant coefficients), only applicable for
  416. linear problems (still experimental),
  417. \item[{\tt alg\_length\_reduction :}] length reduction by algebraic
  418. combination, only for linear problems, one has to be careful when
  419. combining it with decoupling as infinite loops may occur when
  420. shortening and lowering order reverse each other,
  421. \item[{\tt diff\_length\_reduction :}] length reduction by differential
  422. reduction,
  423. \item[{\tt decoupling :}] steps towards the computation of a
  424. differential Gr\"{o}bner Basis,
  425. \item[{\tt add\_differentiated\_pdes :}] only useful for non-linear
  426. differential equations with leading derivative occuring non-linearly,
  427. \item[{\tt add\_diff\_star\_pdes :}] for the treatment of non-linear
  428. indirectly separable equations,
  429. \item[{\tt multintfac :}] to find integrating factors for a system
  430. of equations, should have very slow priority if used at all,
  431. \item[{\tt alg\_solve\_deriv :}] to be used for equations quadratic in
  432. the leading derivative,
  433. \item[{\tt alg\_solve\_system :}] to be used if a (sub-)system of
  434. equations shall be solved for a set of functions or their derivatives
  435. algebraically,
  436. \item[{\tt subst\_derivative :}] substitution of a derivative of a
  437. function everywhere by a new function if such a derivative exists
  438. \item[{\tt undo\_subst\_derivative :}] undo the above substitution.
  439. \item[{\tt del\_redundant\_fc :}] Drop redundant functions and
  440. constants. An overdetermined PDE-system is
  441. formulated and solved to set
  442. redundant constants / functions of integration to zero. This may take longer
  443. if many functions occur.
  444. \item[{\tt point\_trafo :}] An interactive point transformation not to
  445. be used in automatic batch mode,
  446. \item[{\tt sub\_problem :}] Solve a subset of equations first (still
  447. experimental),
  448. \item[{\tt del\_redundant\_de :}] Delete redundant equations,
  449. \item[{\tt idty\_integration :}] Integrate an identity (still experimental).
  450. \end{description}
  451. \subsection{Performing long computations}
  452. \subsubsection{The backup facility}
  453. If one does a long computation automatically then the computer or the
  454. link to it may go down and the computation may have to be started again.
  455. Even worse in a longer interactive session which is of an
  456. exploring nature, i.e.\ where every step may blow up the size of
  457. expressions or where a step (for example, decoupling, solving a subsystem,
  458. searching for a length-reduction, dropping redundant functions,...)
  459. may just take too long and where
  460. one would want to go back to the situation before this step and try
  461. something else. For these situations there is an interactive command
  462. for saving a bakup:
  463. {\tt sb "file\_name"} which saves all global variables + data into an
  464. ASCII file and a command {\tt rb "file\_name"} which reads these data from a file.
  465. The format is independent of the computer used and independent
  466. of the underlying {\sc Lisp} version. This has been used
  467. by the author to set up long and complex computations on a small
  468. computer and to continue the same interactive session on larger computers
  469. later. To continue such a session one calls {\sc Crack} without data:
  470. \verb+ CRACK({},{},{},{})$ +\\ %$
  471. and loads the complete environment with {\tt rb "file\_name"}.
  472. \subsubsection{The history facility}
  473. Sometimes one does not only want to store an environment but also how one
  474. got there in an interactive session, to repeat the same steps or only
  475. some of them in a later session.
  476. In the global variable {\tt history\_} all interactive
  477. input during one call of {\sc Crack} is recorded and can be looked at
  478. during a {\sc Crack} run with the {\tt pv} (print-variable) command {\tt
  479. pv history\_}. In order to save typing the same input in a later
  480. session the program {\sc Crack} always tries to read any expected input
  481. first from the global variable {\tt old\_history}. All that is needed
  482. is to do is typing\\
  483. {\tt lisp reverse history\_;}\\
  484. after a run of {\sc Crack} and to assign the result to the {\sc Lisp}
  485. variable {\tt old\_history}. The next run of {\sc Crack} will try to read
  486. any expected interactive input first from {\tt old\_history} and only
  487. if that is {\tt nil} then read it from the keyboard.
  488. \subsection{Global variables}
  489. The following is a complete list of identifiers used as global
  490. lisp variables (to be precise symbolic fluid variables)
  491. within {\sc Crack}. Some are flags and parameters, others are glaboal
  492. variables, some of them can be accessed after the {\sc Crack}
  493. run. \vspace{6pt} \\
  494. \noindent
  495. {\tt !*allowdfint\_bak !*dfprint\_bak !*exp\_bak !*ezgcd\_bak !*fullroots\_bak \\
  496. !*gcd\_bak !*mcd\_bak !*nopowers\_bak !*ratarg\_bak !*rational\_bak \\
  497. !*batch\_mode abs\_ adjust\_fnc allflags\_ batchcount\_ backup\_ \\
  498. collect\_sol confirm\_subst cont\_ contradiction\_ cost\_limit5 \\
  499. current\_dir default\_proc\_list\_ do\_recycle\_eqn do\_recycle\_fnc \\
  500. eqname\_ expert\_mode explog\_ facint\_ flin\_ force\_sep fname\_ \\
  501. fnew\_ freeabs\_ freeint\_ ftem\_ full\_proc\_list\_ gcfree!* genint\_ \\
  502. glob\_var global\_list\_integer global\_list\_ninteger \\
  503. global\_list\_number high\_gensep homogen\_ history\_ idname\_ \\
  504. idnties\_ independence\_ ineq\_ inter\_divint keep\_parti last\_steps \\
  505. length\_inc level\_ lex\_df lex\_fc limit\_time lin\_problem \\
  506. lin\_test\_const logoprint\_ low\_gensep max\_gc\_counter \\
  507. max\_gc\_elimin max\_gc\_fac max\_gc\_red\_len max\_gc\_short \\
  508. max\_gc\_ss max\_red\_len maxalgsys\_ mem\_eff my\_gc\_counter \\
  509. nequ\_ new\_gensep nfct\_ nid\_ odesolve\_ old\_history \\
  510. orderings\_ target\_limit\_0 target\_limit\_1 target\_limit\_2 \\
  511. target\_limit\_3 target\_limit\_4 poly\_only potint\_ print\_ \\
  512. print\_all print\_more proc\_list\_ prop\_list pvm\_able \\
  513. quick\_decoup record\_hist recycle\_eqns recycle\_fcts recycle\_ids \\
  514. reducefunctions\_ repeat\_mode safeint\_ session\_ simple\_orderings \\
  515. size\_hist size\_watch sol\_list solvealg\_ stepcounter\_ stop\_ \\
  516. struc\_dim struc\_eqn subst\_0 subst\_1 subst\_2 subst\_3 subst\_4 \\
  517. time\_ time\_limit to\_do\_list tr\_decouple tr\_genint tr\_gensep \\
  518. tr\_main tr\_orderings tr\_redlength tr\_short trig1\_ trig2\_ \\
  519. trig3\_ trig4\_ trig5\_ trig6\_ trig7\_ trig8\_ userrules\_ vl\_}
  520. \subsection{Global flags and parameters}
  521. The list below gives a selection of
  522. flags and global parameters that are available
  523. to fine tune the performance according to specific needs of the system
  524. of equations that is studied. Usually they are not needed and very few
  525. are used regularly by the author. The interactive command that changes the
  526. flag/parameter is given in [ ], default values of the flags/parameters
  527. are given in (). The values of the flags and parameters can either be
  528. set after loading {\sc Crack} and before starting {\sc Crack} with a
  529. lisp assignment, for example,\\
  530. \verb+lisp(print_:=8)$+ \\ %$
  531. or after starting {\sc Crack} in interactive mode with specific commands,
  532. like {\tt pl} to change specifically the print length determining parameter
  533. {\tt print\_}, or the command {\tt as} to do an assignment. The values of
  534. parameters/flags can be inspected interactively using {\tt pv}.
  535. \begin{description}
  536. \item[{\tt !*batch\_mode [x] (t) :}] running crack in interactive mode
  537. ({\tt !*batch\_mode=nil}) or not ({\tt !*batch\_mode=t}). It can also be
  538. set in algebraic mode before starting {\sc Crack}
  539. by {\tt ON/OFF BATCH\_MODE}. Interactive mode can be left and automatic
  540. computation be started by the interactive commant {\tt x}.
  541. \item[{\tt expert\_mode [t] (nil) :}] For {\tt expert\_mode=t} the
  542. equations that are involved in the next computational step are
  543. selected by {\sc Crack}, for {\tt expert\_mode=nil} the user is asked
  544. to select one or two equations which are to be worked with in the next
  545. computational step.
  546. %\item[{\tt repeat\_mode [] () :}]
  547. \item[{\tt nfct\_ (1) :}] index of the next new function or constant
  548. \item[{\tt nequ\_ (1) :}] index of the next new equation
  549. \item[{\tt nid\_ (1) :}] index of the next new identity
  550. \item[{\tt fname\_ [nf] ('c\_) :}] name of new functions and constants
  551. (integration)
  552. \item[{\tt eqname\_ [ne] ('e\_) :}] name of new equations
  553. \item[{\tt idname\_ [ni] ('id\_) :}] name of new equations
  554. %\item[{\tt level\_ (nil) :}] actual level of crack recursion
  555. \item[{\tt cont\_ (nil) :}] interactive user control for integration
  556. or substitution of large expressions (enabled = t)
  557. \item[{\tt independence\_ (nil) :}] interactive control of linear
  558. independence (enabled = t)
  559. \item[{\tt genint\_ (15) :}] if =nil then generalized integration disabled
  560. else equal the maximal number of new functions and extra
  561. equations due to the generalized integration of
  562. one equation
  563. \item[{\tt facint\_ (1000) :}] if equal nil then no search for
  564. integrating factors otherwise equal the max
  565. product terms*kernels for searching an integrating
  566. factor
  567. \item[{\tt potint\_ (t) :}] allowing `potential integration'
  568. \item[{\tt safeint\_ (t) :}] uses only solutions of ODEs with
  569. non-vanishing denominator
  570. \item[{\tt freeabs\_ [fi] (t) :}] Do not use solutions of ODEs that
  571. involve the {\tt abs} function
  572. \item[{\tt freeint\_ [fi] (t) :}] Do only integrations if expl.\ part
  573. is integrable
  574. \item[{\tt odesolve\_ (100) :}] maximal length of a de (number of terms) to be
  575. integrated as ode
  576. \item[{\tt max\_factor (400) :}] maximal number of terms to be factorized
  577. \item[{\tt low\_gensep (6) :}] max.\ size of expressions to be separated in a
  578. generalized way by `quick\_gen\_separation'
  579. \item[{\tt high\_gensep (300) :}] min. size of expressions to separate in a
  580. generalized way by `quick\_gen\_separation'
  581. \item[{\tt new\_gensep (nil) :}] whether or not a newer (experimental)
  582. form of gensep should be used
  583. \item[{\tt subst\_* :}] maximal length of an expression to be substituted,
  584. used with different values for different
  585. procedures {\tt subst\_level\_*}
  586. \item[{\tt cost\_limit5 (100) :}] maximal number of extra terms
  587. generated by a subst.
  588. \item[{\tt max\_red\_len (50000) :}] maximal product of lengths of two
  589. equations to be combined with length-reducing decoupling
  590. \item[{\tt target\_limit\_* (nil) :}] maximal product
  591. length(pde)*length(substituted expression) for
  592. PDEs in which substitutions are to be made,
  593. nil ==> no length limit,
  594. used with different values for different
  595. procedures {\tt subst\_level\_*}
  596. \item[{\tt length\_inc (1.0) :}] factor by which the length of an
  597. expression may grow when performing
  598. {\tt diff\_length\_reduction}
  599. \item[{\tt tr\_main [tm] (nil) :}] Trace main procedure
  600. \item[{\tt tr\_gensep [ts] (nil) :}] Trace generalized separation
  601. \item[{\tt tr\_genint [ti] (nil) :}] Trace generalized integration
  602. \item[{\tt tr\_decouple [td] (nil) :}] Trace decoupling process
  603. \item[{\tt tr\_redlength [tr] (nil) :}] Trace length reduction
  604. \item[{\tt tr\_orderings [to] (nil) :}] Trace orderings stuff
  605. \item[{\tt homogen\_ (nil) :}] Test for homogeneity of each equation
  606. (for debugging)
  607. \item[{\tt solvealg\_ (nil) :}] Use SOLVE for algebraic equations
  608. \item[{\tt print\_ [pl] (12) :}] maximal length of an expression to be printed
  609. \item[{\tt print\_more [pm] (t) :}] Print more informations about the pdes
  610. \item[{\tt print\_all [pa] (nil) :}] Print all informations about the pdes
  611. \item[{\tt logoprint\_ (t) :}] print logo after crack call
  612. \item[{\tt poly\_only (nil) :}] all equations are polynomials only
  613. \item[{\tt time\_ (nil) :}] print the time needed for running crack
  614. \item[{\tt dec\_hist (0) :}] length of pde history list during decoupling
  615. \item[{\tt maxalgsys\_ (20) :}] max. number of equations to be solved
  616. in specialsol
  617. \item[{\tt adjust\_fnc (nil) :}] if t then free constants/functions
  618. are scaled and redundant ones are dropped to
  619. simplify the result after the computation has been
  620. completed
  621. %\item[{\tt orderings\_ (nil) :}] Stores the orderings list, nil initially
  622. %\item[{\tt simple\_orderings (t) :}] Turn off orderings support
  623. % except for trivial case
  624. \item[{\tt lex\_df [od] (nil) :}] if t then use lexicographical
  625. instead of total degree ordering of derivatives
  626. \item[{\tt lex\_fc [og] (t) :}] if t then lexicographical ordering of
  627. functions has higher priority than any ordering of
  628. derivatives
  629. \item[{\tt collect\_sol (t) :}] whether solutions found shall be collected and
  630. returned together at the end or not (to save
  631. memory), matters only for non-linear problems with
  632. very many special solutions. If a computation has
  633. to be performed with any solution that is found,
  634. then these commands can be put into a procedure
  635. {\tt algebraic procedure crack\_out(eqns,assigns,freef,ineq)}
  636. which is currently empty in file {\tt crmain.red}
  637. but which is called for each solution.
  638. \item[{\tt struc\_eqn (nil) :}] whether the equations has the form of
  639. structural equations (an application are the
  640. Killing vector and Killing tensor computations)
  641. \item[{\tt quick\_decoup (nil) :}] whether decoupling should be done
  642. faster with less care for saving memory
  643. \item[{\tt idnties\_ (nil) :}] list of identities resulting from reductions and
  644. integrability conditions
  645. \item[{\tt record\_hist (nil) :}] whether the history of equations is
  646. to be recorded
  647. \item[{\tt keep\_parti [kp] (nil) :}] whether for each equation a copy
  648. in partitioned form is to be stored to speed up
  649. several simplifications but which needs more memory
  650. \item[{\tt size\_watch (nil) :}] whether before each computational step
  651. the size of the system shall be recorded in the
  652. global variable size\_hist
  653. \item[{\tt inter\_divint (nil) :}] whether the integration of divergence
  654. identities with more than 2 differentiation variables
  655. shall be confirmed interactively
  656. \item[{\tt do\_recycle (nil) :}] whether function names shall be recycled
  657. or not (saves memory but computation is less clear to follow)
  658. \item[{\tt old\_history (nil) :}]
  659. old\_history is interactive input to be read from
  660. this list
  661. \item[{\tt confirm\_subst [cs] (nil) :}] whether substitutions have to be
  662. confirmed interactively
  663. \item[{\tt mem\_eff (t) :}] whether to be memory efficient even if slower
  664. \item[{\tt force\_sep (nil) :}] whether direct separation should be forced even
  665. if functions occur in the supposed to be linear
  666. independent explicit expressions (for non-lin. prob.)
  667. \end{description}
  668. \section{Contents of the Crack package}
  669. The package {\sc Crack} contains a number of modules.
  670. The basic ones are for computing a pseudo differential Gr\"{o}bner
  671. Basis (using integrability conditions in a systematic way), integrating
  672. exact PDEs, separating PDEs, solving DEs containing functions of only
  673. a subset of all variables and solving standard ODEs (of Bernoulli or
  674. Euler type, linear, homogeneous and separable ODEs). These facilities
  675. will be described briefly together with examples. The test file
  676. {\tt crack.tst} demonstrates these and others.
  677. \subsection{Pseudo Differential Gr\"{o}bner Basis}
  678. This module (called `decoupling' in {\tt proc\_list\_})
  679. reduces derivatives in equations by using other equations and it applies
  680. integrability conditions to formulate additional equations which are
  681. subsequently reduced, and so on.
  682. A general algorithm to bring a system of PDEs into a standard form
  683. where all integrability conditions are satisfied by applying
  684. a finite number of additions, multiplications and differentiations
  685. is based on the general theory of involutive systems \cite{Riq,Th,Ja}.
  686. Essential to this theory is a total ordering of partial derivatives
  687. which allows assignment to each PDE of a {\em Leading Derivative}
  688. (LD) according to a chosen ordering of functions
  689. and derivatives. Examples for possible orderings are
  690. \begin{description}
  691. \item lex.\ order of functions $>$ lex.\ order of variables,
  692. \item lex.\ order of functions $>$ total differential order $>$ lex.\
  693. order of variables,
  694. \item total order $>$ lex.\ order of functions $>$ lex.\ order of variables
  695. \end{description}
  696. or mixtures of them by giving weights to individual functions and variables.
  697. Above, the `$>$' indicate ``before'' in priority of criteria. The principle
  698. is then to
  699. \begin{description}
  700. \item take two equations at a time and differentiate them as often as
  701. necessary to get equal LDs,
  702. \item regard these two equations as algebraic equations in
  703. the common LD and calculate the remainder w.r.t.\ the LD, i.e.\ to
  704. generate an equation without the LD by the Euclidean algorithm, and
  705. \item add this equation to the system.
  706. \end{description}
  707. Usually pairs of equations are taken first, such that only one must be
  708. differentiated. If in such a generation step one of both equations is not
  709. differentiated then it is called a
  710. simplification step and this equation will be replaced by the new equation.
  711. The algorithm ends if each combination of two equations yields only equations
  712. which simplify to an identity modulo the other equations.
  713. A more detailed description is given e.g. in \cite{Alex,Reid1}.
  714. Other programs implementing this algorithm are described e.g. in
  715. \cite{FS,Alex,Fush,Reid1,Reid2,Reid3} and \cite{Mans}.
  716. In the interactive mode of {\sc Crack} it is possible to change the
  717. lexicographical ordering of variables, of functions, to choose between
  718. `total differential order' ordering of variables or lexicographical
  719. ordering of variables and to choose whether lexicographical ordering
  720. of functions should have a higher priority than the ordering of the
  721. variables in a derivative, or not.
  722. An example of the computation of a differential Gr\"{o}bner Basis is
  723. given in the test file {\tt crack.tst}.
  724. \subsection{Integrating exact PDEs}
  725. The technical term `exact' is adapted for PDEs from exterior calculus and
  726. is a small abuse of language but it is useful to characterize the kind of PDEs
  727. under consideration.
  728. The purpose of the integration module in {\sc Crack} is to decide
  729. whether a given differential
  730. expression $D$ which involves unknown functions $f^i(x^j),\;\; 1\leq i\leq m$
  731. of independent variables $x^j, 1\leq j\leq n$
  732. is a total derivative of another expression $I$
  733. w.r.t. some variable $x^k, 1\leq k\leq n$
  734. \[ D(x^i,\; f^j,\; f^j,_p,\; f^j,_{pq}, \ldots)
  735. = \frac{d I(x^i,\; f^j,\; f^j,_p,\; f^j,_{pq}, \ldots)}{d x^k}. \]
  736. The index $k$ is
  737. reserved in the following for the integration variable $x^k.$
  738. With an appropriate function of integration $c^r,$
  739. which depends on all variables except $x^k$ it is no loss of generality
  740. to replace $0 = D$ by $0 = I + c^r$ in a system of equations.
  741. Of course there
  742. always exists a function $I$ with a total derivative equal to $D$ but
  743. the question is whether for \underline{arbitrary} $f^i$ the integral
  744. $I$ is functionally dependent only on the $f^i$ and their derivatives,
  745. and \underline{not on integrals of $f^i.$} \\
  746. \underline{Preconditions:} \\
  747. $D$ is a polynomial in the $f^i$ and their derivatives. The number of
  748. functions and variables is free.
  749. For deciding the existence of $I$ only, the explicit occurrence of the
  750. variables $x^i$ is arbitrary. In order to actually
  751. calculate $I$ explicitly, $D$ must have the property that all terms in $D$
  752. must either contain an unknown function of $x^k$ or
  753. must be formally integrable w.r.t. $x^k.$
  754. That means if $I$ exists then
  755. only a special explicit occurrence of $x^k$ can prevent the
  756. calculation of $I$
  757. and furthermore only in those terms which do not contain
  758. any unknown function of $x^k.$
  759. If such terms occur in $D$ and $I$ exists then $I$ can still be expressed
  760. as a polynomial in the $f^i, f^i,_j, \ldots$ and terms containing
  761. indefinite integrals with integrands explicit in $x^k.$ \\
  762. \underline{Algorithm:} \\
  763. Successive partial integration of the term with the highest
  764. $x^k$-derivative of any $f^i.$ By that the
  765. differential order w.r.t. $x^k$ is reduced
  766. successively. This procedure is always applicable because steps involve only
  767. differentiations and the polynomial
  768. integration $(\int h^n\frac{\partial h}{\partial x}dx =
  769. h^{n+1}/(n+1))$ where $h$ is a partial derivative of some function
  770. $f^i.$ For a more detailed description see \cite{WoInt}.\\
  771. \underline{Stop:} \\
  772. Iteration stops if no term with any $x^k$-derivative of any $f^i$ is left.
  773. If in the remaining un-integrated terms any $f^i(x^k)$ itself occurs,
  774. then $I$ is not expressible with $f^i$ and its derivatives only. In
  775. case no $f^i(x^k)$ occurs then any remaining terms can contain $x^k$ only
  776. explicitly. Whether they can be integrated depends on their formal
  777. integrability. For their integration the {\sc Reduce} integrator is
  778. applied. \\
  779. \underline{Speed up:} \\
  780. The partial integration as described above preserves derivatives with
  781. respect to other variables. For example, the three terms $f,_x, f
  782. f,_{xxx}, f,_{xxy}$ can not combine somehow to the same terms in the
  783. integral because if one ignores $x$-derivatives then it is clear that
  784. $f, f^2$ and $f,_y$ are like three completely different expressions
  785. from the point of view of $x$-integrations.
  786. This allows the following drastic speed up
  787. for large expressions. It is possible to partition the complete sum of
  788. terms into partial sum such that each of the partial sum has to be
  789. integrable on its own. That is managed by generating a label for each
  790. term and collecting terms with equal label into partial sums. The
  791. label is produced by dropping all $x$-derivatives from all functions
  792. to be computed and dropping all factors which are not powers of derivatives of
  793. functions to be computed.
  794. The partitioning into partial sums has two effects. Firstly, if the
  795. integration of one partial sum fails then the remaining sums do not have
  796. to be tried for integration. Secondly, doing partial integration for
  797. each term means doing many subtractions. It is much faster to subtract
  798. terms from small sums than from large sums.
  799. \underline{Example :} \\
  800. We apply the above algorithm to
  801. \begin{equation}
  802. D := 2f,_yg' + 2f,_{xy}g + gg'^3 + xg'^4 + 3xgg'^2g'' = 0
  803. \label{D}
  804. \end{equation}
  805. with $f = f(x,y), \, g = g(x), \, '\equiv d/dx.$
  806. Starting with terms containing $g$
  807. and at first with the highest derivative $g,_{xx},$ the steps are
  808. \[
  809. \begin{array}{rcccl}
  810. \int 3xgg,_x^2g,_{xx} dx
  811. & = & \int d(xgg,_x^3)
  812. & - & \int \left( \partial_x(xg) g,_x^3\right) dx \\ \\
  813. & = & xgg,_x^3 & - & \int g,_x^3(g + xg,_x) dx,
  814. \end{array} \]
  815. \[ I := I + xgg,_x^3 \]
  816. \[ D := D - g,_x^3(g + xg,_x) - 3xgg,_x^2g,_{xx} \]
  817. The new terms $- g,_x^3(g + xg,_x)$ are of lower order than $g,_{xx}$
  818. and so in the expression $D$ the maximal order of $x$-derivatives
  819. of $g$ is lowered. The conditions that $D$ is exact are the following.
  820. \begin{description}
  821. \item The leading derivative must occur linearly before each partial
  822. integration step.
  823. \item After the partial integration of the terms with first order
  824. $x$-derivatives of $f$ the remaining $D$ must not contain $f$
  825. or other derivatives of $f$, because such terms cannot
  826. be integrated w.r.t.\ $x$ without specifying $f$.
  827. \end{description}
  828. The result of $x$- and $y$-integration in the above example is
  829. (remember $g=g(x)$)
  830. \begin{equation}
  831. 0 = 2fg + xygg,_x^3 + c_1(x) + c_2(y) \; \; (=I). \nonumber
  832. \end{equation}
  833. {\sc Crack} can now eliminate $f$ and substitute
  834. for it in all other equations. \\
  835. \underline{Generalization:} \\
  836. If after applying the above basic algorithm, terms are left which contain
  837. functions of $x^k$ but each of these functions depends only on a subset of
  838. all $x^i, 1\leq i\leq n,$ then a generalized version of the above algorithm
  839. can still provide a formal expression for the integral $I$
  840. (see \cite{WoInt}). The price consists of
  841. additional differential conditions, but they are equations in less variables
  842. than occur in the integrated equation. Integrating for example
  843. \begin{equation}
  844. \tilde{D} = D + g^2(y^2 + x\sin y + x^2e^y) \label{Dnew}
  845. \end{equation}
  846. by introducing as few
  847. new functions and additional conditions as possible gives as the integral
  848. $\tilde{I}$
  849. \begin{eqnarray*}
  850. \tilde{I} & = & 2fg + xygg,_{x}^{3} + c_1(x) + c_2(y) \\
  851. & & + \frac{1}{3}y^3c_3'' - \cos y(xc_3'' - c_3)
  852. + e^y(x^2c_3'' - 2xc_3' + 2c_3)
  853. \end{eqnarray*}
  854. with $c_3 = c_3(x), \, '\equiv d/dx$ and the single additional
  855. condition $g^2 = c_3'''.$
  856. The integration of the new terms of (\ref{Dnew}) is
  857. achieved by partial integration again, for example
  858. \begin{eqnarray*}
  859. \int g^2x^2 dx & = & x^2\int g^2 dx - \int (2x\!\int g^2 dx) dx \\
  860. & = & x^2\int g^2 dx - 2x\int\!\!\int g^2 dx
  861. + 2 \int\!\!\int\!\!\int g^2 dx \\
  862. & = & x^2c_3'' - 2xc_3' + 2c_3.
  863. \end{eqnarray*}
  864. \underline{Characterization:} \\
  865. This algorithm is a decision algorithm which does not involve any
  866. heuristic.
  867. After integration the new equation is still a polynomial
  868. in $f^i$ and in the new constant or function of integration.
  869. Therefore the algorithms for bringing the system into standard form can still
  870. be applied to the PDE-system
  871. after the equation $D = 0$ is replaced by $I = 0.$
  872. The complexity of algorithms for bringing a PDE-system into a standard
  873. form depends nonlinearly on the order of these equations because of
  874. the nonlinear increase of the number of different leading derivatives
  875. and by that the number of equations generated intermediately by such
  876. an algorithm. It therefore in general pays off to integrate equations
  877. during such a standard form algorithm.
  878. If an $f^i,$ which depends on all variables, can be eliminated after an
  879. integration, then depending on its length
  880. it is in general helpful to substitute $f^i$ in other equations and
  881. to reduce the number of equations and functions by one. This is especially
  882. profitable if the replaced expression is short and
  883. contains only functions of less variables than $f^i.$ \\
  884. \underline{Test:} \\
  885. The corresponding test input is
  886. \begin{verbatim}
  887. depend f,x,y;
  888. depend g,x;
  889. crack({2*df(f,y)*df(g,x)+2*df(f,x,y)*g+g*df(g,x)**3
  890. +x*df(g,x)**4+3*x*g*df(g,x)**2*df(g,x,2)
  891. +g**2*(y**2+x*sin y+x**2*e**y)},
  892. {},{f,g},{});
  893. \end{verbatim}
  894. The meaning of the {\sc Reduce} command {\tt depend} is to declare that $f$
  895. depends in an unknown way on $x$ and $y$. For more details on the
  896. algorithm see \cite{WoInt}.
  897. \subsection{Direct separation of PDEs}
  898. As a result of repeated integrations the functions in the
  899. remaining equations have less and less variables. It therefore may happen
  900. that after a substitution an equation results where at least one variable
  901. occurs only explicitly and not as an argument of an unknown function.
  902. Consequently all coefficients of linearly independent expressions in this
  903. variable can be set to zero individually. \\
  904. {\em Example:} \\
  905. $f = f(x,y), \;\; g = g(x), \;\; x,y,z$ are independent variables.
  906. The equation is
  907. \begin{equation}
  908. 0 = f,_y + z(f^2+g,_x) + z^2(g,_x+yg^2) \label{sep}
  909. \end{equation}
  910. $x$-separation? $\rightarrow$ no \\
  911. $y$-separation? $\rightarrow$ no \\
  912. $z$-separation? $\rightarrow$ yes: $0 \,=\, f,_y \,=\, f^2+g,_x \,=\,
  913. g,_x+yg^2$ \\
  914. $y$-separation? $\rightarrow$ yes: $0 = g,_x = g^2\;\;$
  915. (from the third equation from the $z$-separation)
  916. If $z^2$ had been replaced in (\ref{sep}) by a third
  917. function $h(z)$ then direct separation would not have been possible.
  918. The situation changes if $h$ is a parametric function which is
  919. assumed to be independently given and which should not be
  920. calculated, i.e.\ $f$ and $g$ should be calculated for any
  921. arbitrary given $h(z)$. Then the same separation could have been
  922. done with an extra treatment of the special case $h,_{zz} = 0,$
  923. i.e.\ $h$ linear in $z$. This different treatment of unknown functions
  924. makes it necessary to input explicitly the functions to be
  925. calculated as the third argument to {\sc Crack}. The input
  926. in this case would be
  927. \begin{verbatim}
  928. depend f,x,y;
  929. depend g,x;
  930. depend h,z;
  931. crack({df(f,y)+z*f**2+(z+h)*df(g,x)+h*y*g**2},{},{f,g},{z});
  932. \end{verbatim}
  933. The fourth parameter for {\sc Crack} is necessary to make clear that
  934. in addition to the variables of $f$ and $g$, $z$ is also an independent
  935. variable.
  936. If the flag {\tt independence\_} is not {\tt nil} then {\sc Crack} will
  937. stop if linear independence of the explicit expressions of the
  938. separation variable (in the example $1,z,z^2$) is not clear and ask
  939. interactively whether separation should be done or not.
  940. \subsection{Indirect separation of PDEs}
  941. For the above direct separation a precondition is that at least one
  942. variable occurs only explicitly or as an argument of parametric
  943. functions. The situation where each variable is an argument of at least
  944. one function but no function contains all independent variables of an
  945. equation needs a more elaborate treatment.
  946. The steps are these
  947. \begin{description}
  948. \item A variable $x_a$ is chosen which occurs in as few functions as possible.
  949. This variable will be separated directly later which
  950. requires that all unknown functions $f_i$ containing $x_a$ are to be
  951. eliminated. Therefore, as long as $F:=\{f_i\}$ is not empty do the following:
  952. \begin{description}
  953. \item Choose the function $f_i(y_p)$ in $F$ with the smallest number of
  954. variables $y_p$ and with $z_{ij}$ as those variables on which $f_i$ does
  955. not depend.
  956. \item Identify all different products $P_{ik}$ of powers of
  957. $f_i$-derivatives and of $f_i$ in the equation.
  958. Determine the $z_{ij}$-dependent factors $C_{ik}$ of the coefficients
  959. of $P_{ik}$ and store them in a list.
  960. \item For each $C_{il}$ ($i$ fixed, $l=1,\ldots)$ choose a $z_{ij}$ and :
  961. \begin{description}
  962. \item divide by $C_{il}$ the equation and all following elements
  963. $C_{im}$ with $m>l$ of this list, such that these elements are
  964. still the actual coefficients in the equation after the division,
  965. \item differentiate the equation and the $C_{im}, m>l$ w.r.t.\ $z_{ij}$
  966. \end{description}
  967. \end{description}
  968. \item The resulting equation no longer contains any unknown function of $x_a$
  969. and can be separated w.r.t.\ $x_a$ directly in case $x_a$ still occurs
  970. explicitly. In both cases the equation(s) is (are) free of $x_a$ afterwards
  971. and inverting the sequence of integration and multiplication
  972. of all those equations (in case of direct separability) will also result
  973. in an equation(s) free of $x_a.$ More exactly, the steps are
  974. \begin{description}
  975. \item multiplication of the equation(s) and the $C_{im}$ with
  976. $m<l$ by the elements
  977. of the $C_{ik}$-lists in exactly the inverse order,
  978. \item integration of these exact PDEs and the $C_{im}$ w.r.t.\ $z_{ij}$.
  979. \end{description}
  980. \item The equations originating that way are used to evaluate those
  981. functions which do not depend on $x_a$ and which survived in the above
  982. differentiations. Substituting these functions in the original equation,
  983. may enable direct separability w.r.t. variables on which the $f_i$
  984. do not depend on.
  985. \item The whole procedure is repeated for another variable $x_b$ if the
  986. original DE could not be separated directly and still has the property that
  987. it contains only functions of a subset of all variables in the equation.
  988. \end{description}
  989. The additional bookkeeping of coefficients $C_{ik}$ and their updating by
  990. division, differentiation, integration and multiplication is done to use
  991. them as integrating factors for the backward integration.
  992. The following example makes this clearer. The equation is
  993. \begin{equation}
  994. 0 = f(x) g(y) - \frac{1}{2}xf'(x) - g'(y) - (1+x^2)y. \label{isep}
  995. \end{equation}
  996. The steps are (equal levels of indentation in the example correspond to
  997. those in the algorithm given above)
  998. \begin{description}
  999. \item $x_1:=x, \, F=\{f\}$
  1000. \begin{description}
  1001. \item Identify $f_1:=f, \; \; \; \; \; y_1:=x, \; \; \; \; \; z_{11}:=y$
  1002. \item and $P_1=\{f',f\}, \; \; \; \; \; C_1=\{1,g\}$
  1003. \begin{description}
  1004. \item Divide $C_{12}$ and
  1005. (\ref{isep}) by $C_{11}=1$ and differentiate w.r.t. $z_{11}=y:$
  1006. \begin{eqnarray}
  1007. 0 & = & fg' - g'' - (1+x^2) \label{isep2} \\
  1008. C_{12} & = & g' \nonumber
  1009. \end{eqnarray}
  1010. \item Divide (\ref{isep2}) by $C_{12}=g'$ and differentiate w.r.t. $z_{11}=y:$
  1011. \[ 0 = - (g''/g')' - (1+x^2)(1/g')' \]
  1012. \end{description}
  1013. \end{description}
  1014. \item Direct separation w.r.t.\ $x$ and integration:
  1015. \[\begin{array}{rclclcl}
  1016. x^2: 0 & = & (1/g')' & \Rightarrow & c_1g' = 1 & \Rightarrow &
  1017. g = y/c_1 + c_2 \\
  1018. x^0: 0 & = & (g''/g')' & \Rightarrow & c_3g' = g'' & \Rightarrow &
  1019. c_3 = 0
  1020. \end{array} \]
  1021. \item Substitution of $g$ in the original DE
  1022. \[0 = (y/c_1+c_2)f - \frac{1}{2}xf' - 1/c_1 - (1+x^2)y \]
  1023. provides a form which allows {\sc Crack} standard methods to succeed
  1024. by direct separation w.r.t.\ $y$
  1025. \[\begin{array}{rclcl}
  1026. y^1: 0 & = & f/c_1 - 1 - x^2 & \Rightarrow & f' = 2c_1x \\
  1027. y^0: 0 & = & c_2f - \frac{1}{2}xf' - 1/c_1 & \Rightarrow & 0 =
  1028. c_2c_1(1+x^2) - c_1x^2 - 1/c_1
  1029. \end{array}\]
  1030. and direct separation w.r.t.\ $x$:
  1031. \begin{eqnarray*}
  1032. x^0: 0 & = & c_2c_1 - c_1 \\
  1033. x^2: 0 & = & c_2c_1 - 1/c_1 \\
  1034. & \Rightarrow & 0 = c_1 - 1/c_1 \\
  1035. & \Rightarrow & c_1 = \pm 1 \Rightarrow c_2 = 1.
  1036. \end{eqnarray*}
  1037. \end{description}
  1038. We get the two solutions $f = 1 + x^2, g = 1 + y$ and
  1039. $f = - 1 - x^2, g = 1 - y.$ The corresponding input to {\sc Crack} would be
  1040. \begin{verbatim}
  1041. depend f,x;
  1042. depend g,y;
  1043. crack({f*g-x*df(f,x)/2-df(g,y)-(1+x**2)*y},{},{f,g},{});
  1044. \end{verbatim}
  1045. \subsection{Solving standard ODEs}
  1046. For solving standard ODEs the package {\sc ODESolve} by Malcalm MacCallum and
  1047. Francis Wright
  1048. \cite{Mal} is applied. This package is distributed with {\sc Reduce}
  1049. and can be used independently of {\sc Crack}. The syntax of
  1050. {\sc ODESolve} is quite similar to that of {\sc Crack} \\
  1051. \verb+depend+ {\it function}, {\it variable}; \\
  1052. \verb+odesolve(+ODE, {\it function}, {\it variable}); \\
  1053. In the present form (1998) it solves standard first order ODEs
  1054. (Bernoulli and Euler type, with separable variables, $\ldots$) and linear
  1055. higher order ODEs with constant coefficients.
  1056. An improved version is currently under preparation by Francis Wright.
  1057. The applicability of {\sc ODESolve} is
  1058. increased by a {\sc Crack}-subroutine which recognizes such PDEs in which
  1059. there is only one unknown function of all variables and all occurring
  1060. derivatives of this function
  1061. are only derivatives w.r.t. one variable of only one partial derivative.
  1062. For example the PDE for $f(x,y)$
  1063. \[ 0 = f,_{xxy} + f,_{xxyy} \]
  1064. can be viewed as a first order ODE in $y$ for $f,_{xxy}.$
  1065. \section{General hints}
  1066. \subsection{Problems involving $\sin, \cos$ or other special functions}
  1067. If the equations to be solved involve special functions, like $\sin$
  1068. and $\cos$ then one is inclined to add {\tt let}-rules for simplifying
  1069. expressions. Before doing this the simplification rules at the end of
  1070. the file {\tt crinit.red} should be inspected such that new rules do
  1071. not lead to cycles with existing rules. One possibility is to replace
  1072. existing rules, for example to substitute the existing rule \\
  1073. \verb+ trig1\_:={sin(~x)**2 => 1-cos(x)**2}$ + by the new rule \\
  1074. \verb+ trig1\_:={cos(~x)**2 => 1-sin(x)**2}$ +.
  1075. These rules are switched off when integrations are performed in order
  1076. not to interfere with the {\sc Reduce} Integrator.
  1077. \subsection{Exchanging time for memory}
  1078. The optimal order of applying different methods to the equations of a system
  1079. is not fixed. It does depend, for example, on the distributions of
  1080. unknown functions in the
  1081. equations and on what the individual methods would produce in the next
  1082. step. For example, it is possible that the
  1083. decoupling module which applies integrability conditions through cross
  1084. differentiations of equations is going well up to a stage when it
  1085. suddenly produces huge equations. They not only occupy much memory,
  1086. they also are slow to handle.
  1087. Right {\em before} this explosion started other methods should
  1088. have been tried (shortening of equations, any integrations, solution of
  1089. underdetermined ODEs if there are any,...). These alternative methods are normally
  1090. comparatively slow or unfavourable as they introduce new functions but
  1091. under the current circumstances they may be perfect to avoid any growth
  1092. and to complete the calculation. How could one have known beforehand that some
  1093. method will lead to an explosion? One does not know. But one can
  1094. regularly make a backup with the interactive {\tt sb} command and
  1095. restart at this situation if necessary.
  1096. \section*{Acknowledgement}
  1097. Andreas Brand is the author of a number of core modules of {\sc
  1098. Crack}. The currently used data structure and program structure of the
  1099. kernel of {\sc Crack} are due to him. He contributed to the
  1100. development of {\sc Crack} until 1997.
  1101. Francis Wright contributed a module that provides simplifications
  1102. of expressions involving symbolic derivatives and integrals. Also, {\sc Crack}
  1103. makes extensive use of the {\sc Reduce} program {\sc ODESolve} written
  1104. by Malcolm MacCallum and Francis Wright.
  1105. Arrigo Triulzi contributed in supporting the use of different total
  1106. orderings of derivatives in doing pseudo differential Gr\"{o}bner
  1107. basis computations.
  1108. Work on this package has been supported by the Konrad Zuse
  1109. Institute / Berlin through a fellowship of T.W.. Winfried
  1110. Neun and Herbert Melenk are thanked for many discussions and
  1111. constant support.
  1112. Anthony Hearn provided free copies of {\sc Reduce} to us as a
  1113. {\sc Reduce} developers group which also is thankfully acknowledged.
  1114. \begin{thebibliography}{99}
  1115. \bibitem{Riq} C. Riquier, Les syst\`{e}mes d'\'{e}quations aux d\'{e}riv\'{e}es
  1116. partielles, Gauthier--Villars, Paris (1910).
  1117. \bibitem{Th} J. Thomas, Differential Systems, AMS, Colloquium
  1118. publications, v. 21, N.Y. (1937).
  1119. \bibitem{Ja} M. Janet, Le\c{c}ons sur les syst\`{e}mes d'\'{e}quations aux
  1120. d\'{e}riv\'{e}es, Gauthier--Villars, Paris (1929).
  1121. \bibitem{Topu} V.L. Topunov, Reducing Systems of Linear Differential
  1122. Equations to a Passive Form, Acta Appl. Math. 16 (1989) 191--206.
  1123. \bibitem{Alex} A.V. Bocharov and M.L. Bronstein, Efficiently
  1124. Implementing Two Methods of the Geometrical Theory of Differential
  1125. Equations: An Experience in Algorithm and Software Design, Acta. Appl.
  1126. Math. 16 (1989) 143--166.
  1127. \bibitem{Reid1} G.J. Reid, A triangularization algorithm which
  1128. determines the Lie symmetry algebra of any system of PDEs, J.Phys. A:
  1129. Math. Gen. 23 (1990) L853-L859.
  1130. \bibitem{Reid2} G. J. Reid, A. D. Wittkopf and A. Boulton, Reduction
  1131. of systems of nonlinear partial differential equations to simplified
  1132. involutive forms, European Journal of Applied Mathematics,
  1133. Vol 7. (1996) 604-635.
  1134. \bibitem{Reid3} G. J. Reid, A. D. Wittkopf and P. Lin,
  1135. Differential-Elimination Completion Algorithms for Differential Algebraic
  1136. Equations and Partial Differential Algebraic Equations, to appear in
  1137. Studies in Applied Mathematics (Submitted July 1995).
  1138. \bibitem{FS} F. Schwarz, Automatically Determining Symmetries of Partial
  1139. Differential Equations, Computing 34, (1985) 91-106.
  1140. \bibitem{Fush} W.I. Fushchich and V.V. Kornyak, Computer Algebra
  1141. Application for Determining Lie and Lie--B\"{a}cklund Symmetries of
  1142. Differential Equations, J. Symb. Comp. 7, (1989) 611--619.
  1143. \bibitem{Mans} E.L. Mansfield,
  1144. The differential algebra package diffgrob2, Mapletech 3, (1996) 33-37 .
  1145. \bibitem{Ka} E. Kamke, Differentialgleichungen, L\"{o}sungsmethoden
  1146. und L\"{o}sungen, Band 1, Gew\"{o}hnliche Differentialgleichungen,
  1147. Chelsea Publishing Company, New York, 1959.
  1148. \bibitem{Wo} T. Wolf, An Analytic Algorithm for Decoupling and Integrating
  1149. systems of Nonlinear Partial Differential Equations, J. Comp. Phys.,
  1150. no. 3, 60 (1985) 437-446 and, Zur analytischen Untersuchung und exakten
  1151. L\"{o}sung von Differentialgleichungen mit Computeralgebrasystemen,
  1152. Dissertation B, Jena (1989).
  1153. \bibitem{WoInt} T. Wolf, The Symbolic Integration of Exact PDEs,
  1154. preprint, (1991).
  1155. \bibitem{WM} M.A.H. MacCallum, F.J. Wright, Algebraic Computing with REDUCE,
  1156. Clarendon Press, Oxford (1991).
  1157. \bibitem{Mal} M.A.H. MacCallum, An Ordinary Differential Equation
  1158. Solver for REDUCE, Proc. ISAAC'88, Springer Lect. Notes in Comp Sci.
  1159. 358, 196--205.
  1160. \bibitem{Step} H. Stephani, Differential equations, Their solution using
  1161. symmetries, Cambridge University Press (1989).
  1162. \bibitem{LIEPDE} T. Wolf, An efficiency improved program {\sc LiePDE}
  1163. for determining Lie - symmetries of PDEs, Proceedings of the workshop on
  1164. Modern group theory methods in Acireale (Sicily) Nov. (1992)
  1165. \bibitem{Karp} V.I. Karpman, Phys. Lett. A 136, 216 (1989)
  1166. \bibitem{Cham} B. Champagne, W. Hereman and P. Winternitz, The computer
  1167. calculation of Lie point symmetries of large systems of differential
  1168. equation, Comp. Phys. Comm. 66, 319-340 (1991)
  1169. \end{thebibliography}
  1170. \end{document}