/* Documentation file h_readme.txt for programs hir_sing.max */ /* and hir_sys.max */ /**************************************************************/ /* */ /* *** M A C S Y M A P R O G R A M S *** */ /* */ /* COMPUTER ASSISTED CALCULATION OF SOLITON SOLUTIONS */ /* OF NONLINEAR PARTIAL DIFFERENTIAL EQUATIONS */ /* WITH HIROTA'S METHOD */ /* */ /* program name: HIR_SING.MAX */ /* */ /* purpose: calculate the DISPERSION LAW, the CONDITIONS for */ /* the existence of up to a four soliton solution and the */ /* explicit CONSTRUCTION of the one, two and the three */ /* SOLITON SOLUTION for single evolution or wave equations */ /* of KdV type. */ /* */ /* program name: HIR_SYS.MAX */ /* */ /* purpose: calculate the DISPERSION LAW, the CONDITIONS for */ /* the existence of up to a four soliton solution and the */ /* explicit CONSTRUCTION of the one, two and the three */ /* SOLITON SOLUTION for evolution or wave equations for */ /* the bilinear form is a system of mKdV type */ /* */ /* computers: tested on VAX-8600, and on PC with */ /* Macsyma 417.125 and version 2.0 */ /* */ /* language: MACSYMA release 412 */ /* */ /* authors: W. Hereman and W. Zhuang */ /* Dept. of Mathematical and Computer Sciences */ /* Colorado School of Mines, */ /* Golden, CO 80401, USA */ /* */ /* version 1.0 released on May 29, 1995 */ /* */ /**************************************************************/ The MACSYMA programs HIR_SING.MAX and HIR_SYS.MAX are based on Hirota's bilinear method for finding exact soliton solutions of nonlinear evolution and wave equations. These programs automatically carry out the lengthy algebraic computations for the symbolic calculation of one, two and three soliton solutions. The programs also allow to test if four soliton solutions exist for both single bilinear equations and systems of coupled bilinear equations. The MACSYMA programs are tested by constructing exact solutions of various nonlinear partial differential equations from soliton theory, such as the Korteweg-de Vries, the Sawada-Kotera, the modified Korteweg-de Vries, the Kadomtsev-Petviashvili, the Boussinesq equation, the shallow water wave equations and many others. REMARK: currently the program HIR_SING.MAX works for single evolution equations of KdV type, the program HIR_SYS.MAX works for systems of modified KdV type. The program HIR_SYS.MAX is a prototype for systems. The program HIR_SING.MAX is in final form as of May 29, 1995. For a clear understanding of the limitations on the types of equations consult the references given below. The current version of the program HIR_SYS.MAX can not handle equations such as the nonlinear Schr\"odinger equation, the sine-Gordon equation, etc., which all lead to different types of coupled systems. The development of a computer program that calculates soliton solutions of an entire family of coupled bilinear systems is under development. In this write-up we discuss the program HIR_SING.MAX, the program HIR_SYS.MAX works analogously. It can be found on the disk, together with some sample output. The main programs are called HIR_SING.MAX and HIR_SYS.MAX. The programs are in the subdirectory PROGRAM. These program files, data and output files are regular text files in ASCII code. The demonstration files are in the subdirectory TESTDECK. There are command and output files for the Korteweg-de Vries, the Sawada-Kotera equations, and various other equations. The papers (mentioned below) and documentation are in the subdirectory DOCUMENT. ------------------------------ How to use the program: After the files are in place on your system (that should have Macsyma), you may want to try the simplest cases (the Korteweg-de Vries for HIR_SING.MAX, and the modified Korteweg-de Vries for HIR_SYS.MAX). Before you batch the command file, e.g. h_kdv.com, make sure that the lines in that file specify the correct path. The path specification differs for various platforms (PC, work station or main computer). For example, if you have h_kdv.com (as well as the file hir_sing.max) in the subdirectory c:\macsyma\hirota on your PC, then the command file should read: /* Command file h_kdv.com for Korteweg-de Vries Equation */ writefile("c:\\macsyma\\hirota\\h_kdv.out"); batchload("c:\\macsyma\\hirota\\hir_sing.max")$ n:3$ B(f,g):= Dxt[1,1](f,g) + Dx[4](f,g)$ name:KdV$ hirota(b,name,n,2,3,true,true)$ /* extra information available after the program finishes */ theta[1]; omega[3]; om[2]; factor(a[1,2]); factor(b[1,2,3]); f; expression(f); /* Setting up specific values for the wave numbers */ k[1]:1; k[2]:3/2; k[3]:5/4; cst[1]:0; cst[2]:0; cst[3]:0; fnumer:ev(expression(f)); /* computation of the solution u(x,t) of u_t + 6 u u_x + u_{3x} = 0 */ define(u(x,t),2*ev(diff(log(ev(expression(f))),x,2),diff)); /* starting the plotting in 2D */ plot(u(x,0),x,-9,13); /* starting the plotting in 3D */ plot3D(u(x,t),x,-4,4,t,-5,5); closefile(); kill(all)$ quit(); /* end of the command file h_kdv.com */ Note that in this extended command file we plotted the actual 3 soliton solution to the Korteweg-de Vries equation for selected values of the wave numbers k[i], i=1,2,3. We set the phase constants all equal to zero for simplicity. Similar changes may have to be made for other platforms. Consult the Macsyma guide (or manual) for your system. To run the KdV case at the prompt (c1) under Macsyma on your PC, type batch("c:\\macsyma\\hirota\\h_kdv.com"); ------- The programs require little interaction from the user, who must provide the bilinear operator(s) for the original PDE and specify which soliton solution (one, two or three) should be calculated. The user can also control the execution of the condition and comparison tests discussed above. The main source of information for using this program to calculate soliton solutions and to test whether or not an equation admits soliton solutions is the set of demonstration files. These files look like h_xxx.out, where xxx is the equation name. For example, the command file h_vareqs.com that generated the various output files contains the following lines: /* Various equations in bilinear form */ /* This compilation of command files produces all the output files */ writefile("h_kdv.out"); batchload("hir_sing.max")$ n:3$ B(f,g):= Dxt[1,1](f,g) + Dx[4](f,g)$ name:KdV$ hirota(b,name,n,2,3,true,true)$ kill(all)$ closefile(); writefile("h_sk.out"); batchload("hir_sing.max")$ n:3$ B(f,g):= Dxt[1,1](f,g) + Dx[6](f,g)$ name:Sawada_Kotera$ hirota(b,name,n,3,2,true,true)$ kill(all)$ closefile(); writefile("h_7kdv.out"); batchload("hir_sing.max")$ n:3$ B(f,g):= Dxt[1,1](f,g) + Dx[8](f,g)$ name:Seventh_KdV$ hirota(b,name,n,2,2,true,true)$ kill(all)$ closefile(); writefile("h_m5kdv.out"); batchload("hir_sing.max")$ n:3$ B(f,g):= Dxt[3,1](f,g) + Dx[6](f,g)$ name:modified_5th_KdV$ hirota(b,name,n,1,3,true,true)$ kill(all)$ closefile(); writefile("h_itob4.out"); batchload("hir_sing.max")$ n:3$ B(f,g):= Dxt[1,1](f,g) + Dxt[2,2](f,g)$ name:Ito_b4$ hirota(b,name,n,3,1,true,true)$ kill(all)$ closefile(); writefile("h_itob6.out"); batchload("hir_sing.max")$ n:3$ B(f,g):= Dxt[0,2](f,g) + Dxt[3,1](f,g) +Dy[2](f,g)$ name:Ito_b6$ hirota(b,name,n,2,2,true,true)$ kill(all)$ closefile(); writefile("h_itob8.out"); batchload("hir_sing.max")$ n:3$ B(f,g):= - Dxt[2,2](f,g) - Dxt[0,2](f,g) + Dx[2](f,g)$ name:Ito_b8$ hirota(b,name,n,1,1,true,true)$ kill(all)$ closefile(); writefile("h_itob9.out"); batchload("hir_sing.max")$ n:3$ B(f,g):= Dxt[0,2](f,g) + Dx[6](f,g)$ name:Ito_b9$ hirota(b,name,n,1,1,true,true)$ kill(all)$ closefile(); writefile("h_kp.out"); batchload("hir_sing.max")$ n:3$ B(f,g):= Dxt[1,1](f,g) + Dx[4](f,g) + 3*Dy[2](f,g)$ name:Kadomtsev_Petviashvili$ hirota(b,name,n,1,1,true,false)$ kill(all)$ closefile(); writefile("h_bous.out"); batchload("hir_sing.max")$ n:3$ B(f,g):= Dxt[0,2](f,g) - Dx[2](f,g) - Dx[4](f,g)$ name:Boussinesq$ hirota(b,name,n,1,1,true,false)$ kill(all)$ closefile(); writefile("h_shwat.out"); batchload("hir_sing.max")$ n:3$ B(f,g):= Dxt[3,1](f,g) - Dx[2](f,g) - Dxt[1,1](f,g)$ name:Shallow_Water$ hirota(b,name,n,1,1,true,false)$ kill(all)$ closefile(); writefile("h_param.out")$ batchload("hir_sing.max")$ N:3$ /* kpar:-1/5; */ B(f,g):=kpar*Dt[2](f,g)+Dxt[3,1](f,g)+Dx[6](f,g)$ name:Parameter_Dependent$ hirota(B,name,N,2,2,true,true)$ kill(all)$ closefile(); quit(); /* end of command file h_vareqs.com for various data */ The respective output files h_kdv.out, h_sk.out, h_shal.out, etc... are given on the floppy. On the disk there is also a file h_mkdv.com that starts the test of the modified Korteweg-de Vries equation with the program HIR_SYS.MAX. The corresponding output file is h_mkdv.out Its contents is: /* This is the file h_mkdv.com */ /* for the modified Korteweg-de Vries equation */ showtime:true; writefile("h_mkdv.out"); batchload("hir_sys.max")$ n:3$ B1(f,g):= Dxt[0,1](f,g)+Dx[3](f,g)$ B2(f,g):= Dx[2](f,g)$ name:mkdv$ /* this line is different from the one for hir_sing.max */ hirota(B1,B2,name,n,true,true,true)$ /* explanation: - the first true refers to test for the three soliton solution; - the second true refers to a second check on the form of the coefficients a[i,j] and b[1,2,3]; - the third true refers to test for the four soliton solution; No random-number testing here */ a[1,2]:factor(a[1,2]); b[1,2,3]:factor(b[1,2,3]); f; g; closefile(); kill(all)$ quit(); /* end of the file h_mkdv.com */ Note there are some differences with the hirota routine in hir_sing.max! --------------------------------------------- Explanation of the lines in the command file (for example, h_kdv.com): ---- n:3$ number of solitons to be constructed. ---- B(f,g):= Dxt[1,1](f,g) + Dx[4](f,g)$ bilinear form of the equation. ---- name:KdV$ name given to the equation. --- hirota(b,name,n,3,5,true,true)$ B stands for the bilinear operator B(f,g) for the given PDE. The user can assign a `name' to the PDE, e.g. name: KdV for the KdV equation. The n refers to the N-soliton solution the user wants to calculate. n is either one, two or three. With 3 as the forth argument, the user requires 3 random number tests for the existence of the three soliton solution. With 5 as the fifth argument, the user requires 5 random number tests for the existence of the four soliton solution. With TRUE in the sixth position, the Hirota's condition for the existence of the three soliton solution will be tested symbolically. (provided none of the random number tests failed). With TRUE in the seventh position, the Hirota's condition for the existence of the four soliton solution will be tested symbolically. (provided none of the random number tests failed). With FALSE these symbolic tests would be skipped. NOTE: The algorithm of HIR_SYS.MAX is similar. The source code is on the floppy. The code for HIR_SYS.MAX is still under development! ----------------------------------------------- More information about the program can be found in: W. Zhuang, Symbolic Computation of Exact Solutions of Nonlinear Evolution and Wave Equations. Master's Thesis, Dept. Math. and Comp. Sci., Colorado School of Mines, Golden, Colorado, USA, 1991, 101 pages (not on floppy) and in the following papers: File: jsc.tex W. Hereman and W. Zhuang, ``Symbolic computation of exact solutions of nonlinear evolution and wave equations with Macsyma," Journal of Symbolic Computation (1995), preprint, submitted. (on floppy) File: imacs13.tex W. Hereman and W. Zhuang, ``Symbolic computation of solitons with Macsyma," Computational and Applied Mathematics II: Differential Equations. Proceedings of the 13th IMACS World Congress, Dublin, July 22-26, 1991, Eds.: W.F. Ames and P.J. van der Houwen, Elsevier, Amsterdam, pp. 287-296 (1992). File: pdeimacs.tex W. Hereman ``Symbolic software for the study of nonlinear partial differential equations," Computer Methods for Partial Differential Equations, Proceedings of the IMACS PDE7 International Conference, New Brunswick, New Jersey, June 22-24, 1992. Ed.: G. Richter (1992) in press File: dublin.tex W. Hereman and W. Zhuang, ``A MACSYMA program for the Hirota method", Proceedings of the 13th IMACS World Congress on Computation and Applied Mathematics, Dublin, July 22-26, 1991, Eds: R. Vichnevetsky and J.J.H. Miller, Criterion Press, Dublin, vol. 2, pp. 842-843 (1991) File kdv95.tex: W. Hereman and W. Zhuang, ``Symbolic software for soliton theory", Proceedings of Conference KdV '95, April 1995, Amsterdam, The Netherlands, Eds.: M. Hazewinkel, H. W. Capel and E. M. de Jager, Kluwer Academic Publishers, pp. 361-378 (1995). Also: Acta Applicandae Mathematicae, vol 39, pp. 361-378 (1995) ---------------------------------------- The software is also available via anonymous FTP from our ftp site: ftp.mines.colorado.edu FTP to that site, login with anonymous, use your email address or name as password. Then change to the directory pub/papers/math_cs_dept/software. The symmetry software is in the subdirectory hirota. ----------------------------------------- NOTE about the symbolic testing: For complicated equations MACSYMA can no longer handle all the terms needed to test the existence of a four soliton solution. For example, for the KdV equation the test for the existence of a three soliton solution involves verification that the sum of 8 x 52 x 3 x 9 = 11232 terms vanishes. Similarly, for a four soliton solution to exist the algorithm requires checking whether or not the sum of 16 x 52 x 6 x 9 = 44928 terms vanishes. The computer (VAX 8600) can still handle that case! For the same reason only the test for the existence of a three and four soliton solution are included in the programs. More efficient ways to test the existence of solitons are under investigation. To get around this problem a random number testing algorithm is built in. Check the paper in J. Symbolic Computation for more details. ---------------------------------------- To learn about new updates of the program, or in case of trouble, contact me. By phone: (303) 273-3881 (office, with messages) or 3860 (secretary), or (303) 440-6089 (home, with answering service); By fax: (303) 273-3875 (mention for Dr. Hereman) By email: WHEREMAN@FLINT.MINES.COLORADO.EDU or WHEREMAN@LIE.MINES.COLORADO.EDU By mail: Dr. Willy Hereman Associate Professor Department of Mathematical and Computer Sciences Colorado School of Mines Golden, Colorado 80401-1887, USA Any comments about the program are welcomed by the authors. Good luck! Willy Golden, May 29, 1995. --------------------------