Last updated: January 31, 2007 at 24:00 by Hereman at home. Previous update: September 6, 2000 by Hereman. Open the notebooks (for example, demokdv.nb) in Mathematica to see how to run the program and what the program produces. Data file h_kdv.m is used in demokdv.nb. Datafiles can be opened with any text editor. Read the material before preparing your own data files. Willy Hereman (* ------------------------------------------------------------ *) (* Documentation file hir_read.txt for the program hirota.m *) (* Last updated: January 31, 2007 *) (* Previous update: June 11, 1995 *) (****************************************************************) (* *) (* *** M A T H E M A T I C A P R O G R A M *** *) (* *) (* COMPUTER ASSISTED CALCULATION OF SOLITON SOLUTIONS *) (* OF NONLINEAR PARTIAL DIFFERENTIAL EQUATIONS *) (* WITH HIROTA'S METHOD *) (* *) (* program name: hirota.m *) (* *) (* purpose: calculation of the DISPERSION LAW, verIfication *) (* of the CONDITIONS for the EXISTENCE of two, three, and four *) (* soliton solutions, and the Explicit SOLITON SOLUTIONS *) (* (up to three-soliton solutions). *) (* *) (* input: single bilinear equation of KdV type (type I), *) (* and a set of parameters to control the execution. *) (* *) (* output: the function f and the coupling coefficients *) (* Note that f is related to u via a transformation *) (* of type u = c*d^2 log(f)/dx^2, where c is a *) (* scaling constant. *) (* *) (* computers: tested on IBM RS 6000, and PC *) (* *) (* language: MATHEMATICA 2.2 *) (* *) (* authors: W. Hereman and W. Zhuang *) (* Dept. of Mathematical and Computer Sciences *) (* Colorado School of Mines, *) (* Golden, CO 80401-1887, USA *) (* *) (* last updated: January 31, 2007 (23:30) *) (* previous update: June 11, 1995 (22:30) *) (* *) (* Copyright 1995 *) (* *) (****************************************************************) The Mathematica program HIROTA.M is based on Hirota's bilinear method for finding exact soliton solutions of nonlinear evolution and wave equations of KdV type (type I). The program automatically carries out the lengthy algebraic computations for the symbolic calculation of one, two and three soliton solutions. The program also allows to test if four soliton solutions exist for both single bilinear equations of KdV type. The Mathematica program is tested by constructing exact solutions of various nonlinear partial differential equations from soliton theory, such as the Korteweg-de Vries, the Sawada-Kotera, the Kadomtsev-Petviashvili, the Boussinesq, the shallow water wave equations and many others. REMARK: currently the program HIROTA.M works for single evolution equations of KdV type. The program HIROTA.M is in final form as of June 9, 1995 and slightly updated on January 25, 2007 (to make it run under Mathematica version 5.0). For a clear understanding of the limitations on the types of equations consult the references given below. The current version of the program HIROTA.M can NOT handle equations such as the nonlinear Schr\"odinger equation, the sine-Gordon equation, etc., which all lead to coupled systems of bilinear equations. The development of a Mathematica program that calculates soliton solutions of an entire family of coupled bilinear systems is under development. In this write-up we discuss the program HIROTA.M. It can be found on the disk, together with some sample output. The main program is called HIROTA.M. The program file, data and output files are regular text files in ASCII code. The demonstration files. There are command and output files for the Korteweg-de Vries, the Sawada-Kotera equations, and various other equations. The papers (mentioned below, and previously distributed on floppy) are now available on the internet. ----------------------------- The software is also available via anonymous FTP from our ftp site: ftp.mines.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 hirota software is in the subdirectory hiromath. ------------------------------ There is a similar program in Macsyma. Both the Macsyma and Mathematica code work in a similar fashion. More information about the Macsyma 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 or on the internet) and in the following papers, available on the internet at http://www.mines.edu/fs_home/whereman ---- File: preprint-hereman-zhuang1994.pdf W. Hereman and W. Zhuang, ``Symbolic computation of solitons via Hirota's bilinear method," (1994), preprint, never submitted. (on floppy, but in directory HIROTA\DOCUMENT) Available on Internet as Item 6 under Reports. ---- File: elsevier.pdf: 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). (on floppy, but in directory HIROTA\DOCUMENT) Available on Internet as Item 8 under Refereed Conference Proceedings. ---- File: pde7pub.pdf: W. Hereman ``Symbolic software for the study of nonlinear partial differential equations," in Advances in Computer Methods for Partial Differential Equations VII, Proceedings of the IMACS PDE7 International Conference, New Brunswick, New Jersey, June 22-24, 1992. Eds.: R. Vichnevetsky, D. Knight and G. Richter (1992), pp. 326-332. (on floppy, but in directory HIROTA\DOCUMENT) Available on Internet as Item 2 under Unrefereed Conference Proceedings. ---- File: pap-hereman-zhuang1991.pdf: 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) (on floppy, but in directory HIROTA\DOCUMENT) Available on Internet as Item 11 under Refereed Conference Proceedings. ---- File kdv95.pdf: 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) (on floppy, but in directory HIROTA\DOCUMENT) Available on Internet as Item 25 under Papers in Refereed Journals. ---------------------------------------- How to use the Mathematica program: After the files are in place on your system (that should have Mathematica), you may want to try the simplest cases (the Korteweg-de Vries). For example, the file for the KdV equation, called h_kdv.m should read: Needs["hirota`"] n=3; B[f_,g_]:=Dx[4,x,f,g]+Dxt[1,1,x,t,f,g]; name="KdV"; myfile="h_kdv.o"; OpenLog[myfile]; hirota[B,name,n,1,1,False,False]; (* information available after the program finishes *) THETA[1] OMEGA[3] OM[2] a[1,2] b[1,2,3] F EXPRF (* 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=F (* computation of the solution u(x,t) of u_t + 6 u u_x + u_{3x} = 0 *) U[XX_,TT_]:=2*D[Log[FNUMER],{X,2}] /. {X -> XX, T -> TT} Print["This is U[X,T] ", U[X,T]] (* starting the plotting in 2D *) Plot[Evaluate[U[X,0.0]],{X,-12,17}, PlotRange -> {{-12,17}, All}]; (* starting the plotting in 3D *) Plot3D[Evaluate[U[X,T]],{X,-15,25},{T,-3,15}, PlotPoints -> 50, PlotRange -> {{-15,25},{-3,15},{0,1.25}}]; (* CloseLog[]; *) (* 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. ------- To run the KdV case at the prompt In[1] = under Mathematica on your PC or workstation, type SetDirectory["c:\\yourdirectory"] Get["h_kdv.m"]; The rest will happen automatically... ------- The program requires 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. After the program ran, useful info is available that allows to plot solitons in 2 and 3 dimensions. 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.o, where xxx is the equation name. --------------------------------------------- Explanation of the lines in the command file (for example, h_kdv.m): ---- n:3$ number of solitons to be constructed. ---- B[f_,g_]:=Dx[4,x,f,g]+Dxt[1,1,x,t,f,g]; bilinear form of the equation. Note that the bilinear operator for derivatives with respect to t is called DT instead of Dt, because the latter one already exist in Mathematica to denote total derivatives. ---- name:"KdV"; name given to the equation. --- myfile="h_kdv.o"; name of output file with transcript that will be created. ---- 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. ----------------------------------------------- We reproduce the usage statements, available after the package Hirota has been read in. hirota::usage = " hirota[B,name,n,Rtest3soliton,Rtest4soliton,test3soliton, test4soliton] gives a n-soliton solution of the bilinear equation, after testing its existence. B stands for the bilinear form B(f,g) for the given PDE. The user can assign a name to the PDE, e.g. KdV. The parameter n refers to the n-soliton solution one wants to calculate. The n is either 1, 2 or 3. Random number tests as well as symbolic tests for the existence of n-solitons can be performed." Dx::usage = "Dx[n,x,f,g] is a n_th order Hirota bilinear operator in the variable x. Similar definitions for operators Dy and DT. Note that DT is used instead of Dt (which was defined in Mathematica for total derivative)." Dxt::usage = "Dxt[m,n,x,t,f,g] is a general form of Hirota's bilinear operator, m_th order in the variable x and n_th order in the variable t." P::usage = "P[k,m,l] gives the polynamial corresponding to the bilinear operators." B::usage = "B[f,g] is a given bilinear form of the PDE. For instance, B[f_,g_]:=Dx[4,x,f,g]+Dxt[1,1,x,t,f,g] for the KdV equation." ----------------------------------------------- NOTE about the symbolic testing: For complicated equations Mathematica 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 (a 486 PC with 16 MB RAM) 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 message service), By fax: 303-273-3875 (mention for Dr. Hereman) By email: WHEREMAN@MINES.EDU By mail: Dr. Willy Hereman, 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, January 31, 2007 (based on note June 11, 1995) (* ****************** End of the program HIROTA.M *************** *)