© Copyright Notice

Copyright © by Unal Goktas ((Department of Computer Science and Engineering, Texas A&M University, College Station, Texas, USA) and Willy Hereman (Department of Mathematical and Computer Sciences, Colorado School of Mines, Golden, Colorado, USA). No part of the PDESolitonSolutions package can be sold or reproduced without written consent of the authors. Wolfram Research, Inc. (Champaign, Illinois, USA) is the holder of the copyright to the Mathematica software system.

About the Package: PDESolitonSolutions

Nonlinear partial differential equations (PDEs) possess a number of remarkable properties reflecting their rich mathematical structure. Such properties include the Painleve property, nontrivial prolongation and bi-Hamiltonian structures, soliton solutions, Lax pairs, Backlund transformations, symmetries and conservation laws. These properties reveal the adequacy of PDEs as models for physical relevant phenomena. The search for these intrinsic properties becomes more attractive due to the availability of CAS such as Mathematica. Indeed, Mathematica is well suited and often necessary tool to perform the computations inherent in the investigation of integrability.

PDESolitonSolutions is a collection of Mathematica functions addressing computations of soliton solutions in analyzing nonlinear PDEs.  A description of the simplified Hirota method and code is given in the accompanying paper:  W. Hereman, U. Goktas, Symbolic computation of solitary wave solutions and solitons through homogenization of degree, Proceedings Conference on Nonlinear and Modern Mathematical Physics (NMMP-2022), Springer Proceedings in Mathematics and Statistics, 60pp, submitted (2023). This paper is available on the ArXiv.

A complete set of mathematical definitions and the concepts used in the package and this manual are beyond the scope of this document. For the formal definitions of the concepts and the theory behind the functions in the PDESolitonSolutions package, consult the references given in the References section (below). In this manual, a basic knowledge of Mathematica is assumed. For further information on Mathematica, consult the standard Mathematica references by Wolfram Research, Inc.

To open the closed sections below, double (left) click on the vertical line with the hook at the bottom. To close the cells, double click at the same place again. 

Recall that to execute a Mathematica command one has to (left) click anywhere inside the cell and then hit Enter (bottom right key on a keyboard) or use the regular Shift Enter combination.

Loading the Package

To access all of the functions in PDESolitonSolutions, all you need to do is to load the file PDESolitonSolutions.m by typing the following line in a Mathematica notebook:

Set the directory so that Mathematica knows where to get  the code. For example :

(* SetDirectory["C:\\Users\\gokta\\Dropbox\\Homogenization-Paper-2022\\Homogenization-code-UG"] *)

SetDirectory["C:\\data\\talks\\talks22\\Homogenization-code-UG"]

Load the package. The command below will generate two lines of messages.

Get["PDESolitonSolutions_July10_2023.m"]

Usage

??PDESolitonSolutions

Examples

If you haven't already loaded the package, load it now.

The Burgers Equation

burgerseq:=(∂_t)u[x,t]+2 u[x,t] (∂_x)u[x,t]-(∂_({x,2}))u[x,t]==0

burgerseq

Compute 1-soliton solutions:

burgers1sol = PDESolitonSolutions[burgerseq,u,{x},t,{1},PrintInformation->True]

burgers1sol = PDESolitonSolutions[burgerseq,u,{x},t,{1},PrintInformation->False]

burgerseq/.DSolve`DSolveToPureFunction[burgers1sol]//Simplify

PDESolitonSolutions[burgerseq,u,{x},t,{1},UseTruncatedPainleveExpansion->False,PrintInformation->True]

PDESolitonSolutions[burgerseq,u,{x},t,{1},UseTruncatedPainleveExpansion->False,PrintInformation->False]

Compute 1 and 2-soliton solutions:

burgers1and2sol= PDESolitonSolutions[burgerseq,u,{x},t,2, PrintInformation -> True]

burgerseq/.DSolve`DSolveToPureFunction[burgers1and2sol]//Simplify

Compute only the 2-soliton solution:

burgerseqsoliton2=PDESolitonSolutions[burgerseq,u,{x},t,{2}]

burgerseqsoliton2evaluated=burgerseqsoliton2[[1,1,2]]/.{k[1]->-2,k[2]->3,delta[1]->2,delta[2]->-3}

With[{sol=burgerseqsoliton2evaluated},Manipulate[Plot[sol,{x,-25,25},PlotRange->All],{t,-10,0,0.01},SaveDefinitions->True,ControlPlacement->{Top}]]

Compute 1, 2 and 3-soliton solutions:

burgers3sol =PDESolitonSolutions[burgerseq,u,{x},t,3, PrintInformation -> True]

Compute only the 3-soliton solution:

burgers3solagain = PDESolitonSolutions[burgerseq,u,{x},t,{3}]

Table[PossibleZeroQ[Chop[Quiet[(burgerseq[[1]]/.DSolve`DSolveToPureFunction[burgers3solagain [[1]]])/.((#->RandomReal[{-2,2},WorkingPrecision->200]&)/@{k[1],k[2],k[3],delta[1],delta[2],delta[3],x,t})]]],{10}]

The Korteweg-de Vries (KdV) Equation

kdveq:=(∂_t)u[x,t]+6 u[x,t] (∂_x)u[x,t]+(∂_({x,3}))u[x,t]==0

kdveq

Compute 1-soliton solutions:

kdvsoliton1 = PDESolitonSolutions[kdveq,u,{x},t,{1},PrintInformation->True]

kdveq/.DSolve`DSolveToPureFunction[kdvsoliton1]//Simplify

Compute 1 and 2-soliton solutions:

kdvsoliton1and2 = PDESolitonSolutions[kdveq,u,{x},t,2]

kdveq/.DSolve`DSolveToPureFunction[kdvsoliton1and2]//Simplify

Compute only the 2-soliton solution:

kdvsoliton2=PDESolitonSolutions[kdveq,u,{x},t,{2},PrintInformation->True]

Table[PossibleZeroQ[Chop[Quiet[(kdveq[[1]]/.DSolve`DSolveToPureFunction[kdvsoliton2[[1]]])/.((#->RandomReal[{-2,2},WorkingPrecision->200]&)/@{k[1],k[2],k[3],delta[1],delta[2],delta[3],x,t})]]],{10}]

kdveq/.DSolve`DSolveToPureFunction[kdvsoliton2]//Simplify

kdvsoliton2evaluated=kdvsoliton2[[1,1,2]]/.{k[1]->1,k[2]->-2,delta[1]->2,delta[2]->-3}

With[{sol=kdvsoliton2evaluated},Manipulate[Plot[sol,{x,-30,30},PlotRange->All],{t,-5,5,0.01},SaveDefinitions->True,ControlPlacement->{Top}]
]

Compute only the 3-soliton solution:

kdvsoliton3=PDESolitonSolutions[kdveq,u,{x},t,{3}, PrintInformation -> True]

Table[PossibleZeroQ[Chop[Quiet[(kdveq[[1]]/.DSolve`DSolveToPureFunction[kdvsoliton3[[1]]])/.((#->RandomReal[{-2,2},WorkingPrecision->200]&)/@{k[1],k[2],k[3],delta[1],delta[2],delta[3],x,t})]]],{10}]

kdvsoliton3evaluated=kdvsoliton3[[1,1,2]]/.{k[1]->2,k[2]->3/2,k[3]->1,delta[1]->1,delta[2]->-2,delta[3]->3}

With[{sol=kdvsoliton3evaluated},
Manipulate[Plot[sol,{x,-25,25},PlotRange->All],{t,-10,10,0.01},SaveDefinitions->True,ControlPlacement->{Top}]
]

kdvsolitons1and2=PDESolitonSolutions[kdveq,u,{x},t,2]

kdvsolitons1through3=PDESolitonSolutions[kdveq,u,{x},t,3]

Test the first solution:

Table[PossibleZeroQ[Chop[Quiet[(kdveq[[1]]/.DSolve`DSolveToPureFunction[kdvsolitons1through3[[1]]])/.((#->RandomReal[{-2,2},WorkingPrecision->200]&)/@{k[1],k[2],k[3],delta[1],delta[2],delta[3],x,t})]]],{10}]

Test the second solution:

Table[PossibleZeroQ[Chop[Quiet[(kdveq[[1]]/.DSolve`DSolveToPureFunction[kdvsolitons1through3[[2]]])/.((#->RandomReal[{-2,2},WorkingPrecision->200]&)/@{k[1],k[2],k[3],delta[1],delta[2],delta[3],x,t})]]],{10}]

Test the third solution:

Table[PossibleZeroQ[Chop[Quiet[(kdveq[[1]]/.DSolve`DSolveToPureFunction[kdvsolitons1through3[[3]]])/.((#->RandomReal[{-2,2},WorkingPrecision->200]&)/@{k[1],k[2],k[3],delta[1],delta[2],delta[3],x,t})]]],{10}]

The Lax Equation

Laxfifthorderpde:=(∂_t)u[x,t]+30 ((u[x,t])^2) (∂_x)u[x,t]+20 (∂_x)u[x,t] (∂_({x,2}))u[x,t]+10 u[x,t] (∂_({x,3}))u[x,t]+(∂_({x,5}))u[x,t]==0

Laxfifthorderpde

Compute 1-soliton solutions:

laxonesoliton = PDESolitonSolutions[Laxfifthorderpde,u,{x},t,{1},PrintInformation->True]

Laxfifthorderpde/.DSolve`DSolveToPureFunction[laxonesoliton]//Simplify

Compute only the 2-soliton solution:

laxtwosoliton= PDESolitonSolutions[Laxfifthorderpde,u,{x},t,{2}, PrintInformation -> True]

laxtwosoliton= PDESolitonSolutions[Laxfifthorderpde,u,{x},t,{2}, UseTruncatedPainleveExpansion->False, PrintInformation -> True]

Table[PossibleZeroQ[Chop[Quiet[(Laxfifthorderpde[[1]]/.DSolve`DSolveToPureFunction[laxtwosoliton[[1]]])/.((#->RandomReal[{-2,2},WorkingPrecision->200]&)/@{k[1],k[2],delta[1],delta[2],x,t})]]],{10}]

PDESolitonSolutions[Laxfifthorderpde,u,{x},t,{2}]//FullSimplify

Compute only the 3-soliton solution:

Laxfifthorderpde3soliton=PDESolitonSolutions[Laxfifthorderpde,u,{x},t,{3}, PrintInformation -> True]

Table[PossibleZeroQ[Chop[Quiet[(Laxfifthorderpde[[1]]/.DSolve`DSolveToPureFunction[Laxfifthorderpde3soliton[[1]]])/.((#->RandomReal[{-2,2},WorkingPrecision->200]&)/@{k[1],k[2],k[3],delta[1],delta[2],delta[3],x,t})]]],{10}]

Laxfifthorderpdesoliton1through3=PDESolitonSolutions[Laxfifthorderpde,u,{x},t,3]

Table[PossibleZeroQ[Chop[Quiet[(Laxfifthorderpde[[1]]/.DSolve`DSolveToPureFunction[Laxfifthorderpdesoliton1through3])/.((#->RandomReal[{-2,2},WorkingPrecision->200]&)/@{k[1],k[2],k[3],delta[1],delta[2],delta[3],x,t})]]],{10}]

The Sawada-Kotera Equation

SKfifthorderpde:=(∂_t)u[x,t]+5 ((u[x,t])^2) (∂_x)u[x,t]+5 (∂_x)u[x,t] (∂_({x,2}))u[x,t]+5 u[x,t] (∂_({x,3}))u[x,t]+(∂_({x,5}))u[x,t]==0

SKfifthorderpde

Compute 1-soliton solutions:

SKonesoliton= PDESolitonSolutions[SKfifthorderpde,u,{x},t,{1},PrintInformation->True]//Simplify

SKfifthorderpde/.DSolve`DSolveToPureFunction[SKonesoliton]//Simplify

Compute only the 2-soliton solution:

PDESolitonSolutions[SKfifthorderpde,u,{x},t,{2}]//Simplify

Table[PossibleZeroQ[Chop[Quiet[(SKfifthorderpde[[1]]/.DSolve`DSolveToPureFunction[SKonesoliton[[1]]])/.((#->RandomReal[{-2,2},WorkingPrecision->200]&)/@{k[1],k[2],delta[1],delta[2],x,t})]]],{10}]

SKtwosoliton = PDESolitonSolutions[SKfifthorderpde,u,{x},t,{2},UseTruncatedPainleveExpansion->False, PrintInformation -> True]

Compute only the 3-soliton solution:

SKfifthorderpde3soliton=PDESolitonSolutions[SKfifthorderpde,u,{x},t,{3}]

Table[PossibleZeroQ[Chop[Quiet[(SKfifthorderpde[[1]]/.DSolve`DSolveToPureFunction[SKfifthorderpde3soliton[[1]]])/.((#->RandomReal[{-2,2},WorkingPrecision->200]&)/@{k[1],k[2],k[3],delta[1],delta[2],delta[3],x,t})]]],{10}]

SKsolitons1through3 = PDESolitonSolutions[SKfifthorderpde,u,{x},t,3(* ,UseTruncatedPainleveExpansion->False, *) (*, PrintInformation -> True*)]

The Kaup-Kupershmidt Equation

KKfifthorderpde:=(∂_t)u[x,t]+20 ((u[x,t])^2) (∂_x)u[x,t]+25 (∂_x)u[x,t] (∂_({x,2}))u[x,t]+10 u[x,t] (∂_({x,3}))u[x,t]+(∂_({x,5}))u[x,t]==0

KKfifthorderpde

Compute 1-soliton solutions:

KKonesoliton = PDESolitonSolutions[KKfifthorderpde,u,{x},t,{1},PrintInformation->True](* //Simplify *)

KKfifthorderpde/.DSolve`DSolveToPureFunction[KKonesoliton]//Simplify

Compute only the 2-soliton solution:

KKtwosoliton = PDESolitonSolutions[KKfifthorderpde,u,{x},t,{2}, PrintInformation -> True]

Table[PossibleZeroQ[Chop[Quiet[(KKfifthorderpde[[1]]/.DSolve`DSolveToPureFunction[KKtwosoliton[[1]]])/.((#->RandomReal[{-2,2},WorkingPrecision->200]&)/@{k[1],k[2],delta[1],delta[2],x,t})]]],{10}]

Compute only the 3-soliton solution:

KKfifthorderpde3soliton=PDESolitonSolutions[KKfifthorderpde,u,{x},t,{3}]

Table[PossibleZeroQ[Chop[Quiet[(KKfifthorderpde[[1]]/.DSolve`DSolveToPureFunction[KKfifthorderpde3soliton[[1]]])/.((#->RandomReal[{-2,2},WorkingPrecision->200]&)/@{k[1],k[2],k[3],delta[1],delta[2],delta[3],x,t})]]],{10}]

KKfifthorderpde3soliton=PDESolitonSolutions[KKfifthorderpde,u,{x},t,{3}, PrintInformation -> True]

The Modified KdV Equation

mkdveq:=(∂_t)u[x,t]+24 ((u[x,t])^2) (∂_x)u[x,t]+(∂_({x,3}))u[x,t]==0

mkdveq

Try to compute 1-soliton solutions:

PDESolitonSolutions[mkdveq,u,{x},t,{1},PrintInformation->True]

The Fisher Equation with convection

fisherwithconvection:=(∂_t)u[x,t]+α u[x,t] (∂_x)u[x,t]-(∂_({x,2}))u[x,t]-u[x,t] (1-u[x,t])==0

fisherwithconvection

Compute 1-soliton solutions:

fisherconv1sol = PDESolitonSolutions[fisherwithconvection,u,{x},t,{1},PrintInformation->True]//Simplify

(fisherwithconvection/.DSolve`DSolveToPureFunction[fisherconv1sol[[1]]])//Simplify

FullSimplify[fisherconv1sol//TrigToExp]

Compute only the 2-soliton solution:

fisherconv2sol =PDESolitonSolutions[fisherwithconvection,u,{x},t,{2}, PrintInformation-> True]

So the Fisher equation with convection has only 1-soliton solution.

The Fisher Equation

fisher:=(∂_t)u[x,t]-(∂_({x,2}))u[x,t]-u[x,t] (1-u[x,t])==0

fisher

Compute 1-soliton solutions:

fisher1sol = PDESolitonSolutions[fisher,u,{x},t,{1},PrintInformation->True] (* //Simplify *)

(fisher/.DSolve`DSolveToPureFunction[fisher1sol])//Simplify

FullSimplify[fisher1sol//TrigToExp]

Compute only the 2-soliton solution:

PDESolitonSolutions[fisher,u,{x},t,{2}, PrintInformation -> True]

So the Fisher equation has only 1-soliton solution.

The FitzHugh-Nagumo equation with convection

Replace α by ((mm-2)/(Sqrt[mm])) in the FitzHugh-Nagumo equation:

fitzhughnagumowithm:=(∂_t)u[x,t]+α u[x,t] (∂_x)u[x,t]-(∂_({x,2}))u[x,t]+u[x,t] (1-u[x,t]) (a-u[x,t])==0/. {α->((mm-2)/(Sqrt[mm]))}

fitzhughnagumowithm

Compute 1-soliton solutions:

fitzhughnagumowithm1sol = PDESolitonSolutions[fitzhughnagumowithm,u,{x},t,{1}, PrintInformation -> True] (* //FullSimplify *)

(fitzhughnagumowithm/.DSolve`DSolveToPureFunction[fitzhughnagumowithm1sol])//Simplify

Compute 2-soliton solutions:

fitzhughnagumowithm2sol = PDESolitonSolutions[fitzhughnagumowithm,u,{x},t,{2}, PrintInformation -> True] (* //FullSimplify *)

Note that the solutions returned above are bi-soliton solutions. Test these solutions:

Table[PossibleZeroQ[Chop[Quiet[(fitzhughnagumowithm[[1]]/.DSolve`DSolveToPureFunction[fitzhughnagumowithm2sol])/.((#->RandomReal[{-2,2},WorkingPrecision->200]&)/@{k[1],k[2],delta[1],delta[2],x,t})]]],{10}]

Return back to the original FitzHugh-Nagumo equation:

fitzhughnagumo:=(∂_t)u[x,t]+α u[x,t] (∂_x)u[x,t]-(∂_({x,2}))u[x,t]+u[x,t] (1-u[x,t]) (a-u[x,t])==0

fitzhughnagumo

Compute 1-soliton solutions:

fitzhughnagumo1sol = PDESolitonSolutions[fitzhughnagumo,u,{x},t,{1},PrintInformation->True]

(fitzhughnagumo/.DSolve`DSolveToPureFunction[fitzhughnagumo1sol])//Simplify

A Burgers equation with a cubic source term

burgerswithcubicwithm:=(∂_t)u[x,t]+α u[x,t] (∂_x)u[x,t]-(∂_({x,2}))u[x,t]-3 u[x,t] (2-u[x,t]) (u[x,t]+1)==0 /. α->((3 mm-2)/(Sqrt[mm]))

burgerswithcubicwithm

Compute 1-soliton solutions:

burgerscubicwithm1sol = PDESolitonSolutions[burgerswithcubicwithm,u,{x},t,{1},PrintInformation->True]

(burgerswithcubicwithm/.DSolve`DSolveToPureFunction[burgerscubicwithm1sol ])//Simplify

burgerscubicwithm1sollogderivtf = PDESolitonSolutions[burgerswithcubicwithm,u,{x},t,{1},UseTruncatedPainleveExpansion->False, PrintInformation->True]

(burgerswithcubicwithm/.DSolve`DSolveToPureFunction[burgerscubicwithm1sollogderivtf])//Simplify

Compute 2-soliton solutions:

burgerscubicwithm2sol = PDESolitonSolutions[burgerswithcubicwithm,u,{x},t,{2},PrintInformation->True]

Table[PossibleZeroQ[Chop[Quiet[(burgerswithcubicwithm[[1]]/.DSolve`DSolveToPureFunction[burgerscubicwithm2sol])/.((#->RandomReal[{-2,2},WorkingPrecision->200]&)/@{k[1],k[2],delta[1],delta[2],x,t})]]],{10}]

Return back to the original equation:

burgerswithcubicorg:=(∂_t)u[x,t]+α u[x,t] (∂_x)u[x,t]-(∂_({x,2}))u[x,t]-3 u[x,t] (2-u[x,t]) (u[x,t]+1)==0 (* /. α->((3 mmm-2)/(Sqrt[mmm])) *)

burgerswithcubicorg

Compute 1-soliton solutions:

burgerscubicorg1sol = PDESolitonSolutions[burgerswithcubicorg,u,{x},t,{1},PrintInformation->True]

(burgerswithcubicorg/.DSolve`DSolveToPureFunction[burgerscubicorg1sol ])//Simplify

Compute 2-soliton solutions:

burgerscubicorg2sol=PDESolitonSolutions[burgerswithcubicorg,u,{x},t,{2}, PrintInformation -> True]

The solutions returned above are bi-soliton solutions.

Table[PossibleZeroQ[Chop[Quiet[(burgerswithcubicorg[[1]]/.DSolve`DSolveToPureFunction[burgerscubicorg2sol])/.((#->RandomReal[{-2,2},WorkingPrecision->200]&)/@{k[1],k[2],delta[1],delta[2],x,t})]]],{10}]

A wave equation with cubic source term

waveeqwithcubicterm:=(1/8) (∂_({t,2}))u[x,t]+(∂_t)u[x,t]+u[x,t] (∂_x)u[x,t]-(1/8) (∂_({x,2}))u[x,t]-u[x,t] (u[x,t]-1) (u[x,t]+2)==0

waveeqwithcubicterm

Compute 1-soliton solutions:

waveeqwithcubicterm1sol = PDESolitonSolutions[waveeqwithcubicterm,u,{x},t,{1},PrintInformation->True]

(waveeqwithcubicterm/.DSolve`DSolveToPureFunction[waveeqwithcubicterm1sol])//Simplify

FullSimplify[waveeqwithcubicterm1sol]

Compute only the 2-soliton solution:

waveeqwithcubicterm2sol= PDESolitonSolutions[waveeqwithcubicterm,u,{x},t,{2}, PrintInformation -> True]//FullSimplify

The solution returned above is a bi-soliton solution.

Table[PossibleZeroQ[Chop[Quiet[(waveeqwithcubicterm[[1]]/.DSolve`DSolveToPureFunction[waveeqwithcubicterm2sol[[1]]])/.((#->RandomReal[{-2,2},WorkingPrecision->200]&)/@{k[1],k[2],delta[1],delta[2],x,t})]]],{10}]

Compute only the 3-soliton solution:

waveeqwithcubicterm3sol= PDESolitonSolutions[waveeqwithcubicterm,u,{x},t,{3}, PrintInformation -> True]//FullSimplify

The solution returned above is a tri-soliton solution.

(waveeqwithcubicterm/.DSolve`DSolveToPureFunction[waveeqwithcubicterm3sol])//Simplify

A combined KdV-Burgers equation

combinedkdvburgers:=(∂_t)u[x,t]+6 u[x,t] (∂_x)u[x,t]+(∂_({x,3}))u[x,t]-5 β (∂_({x,2}))u[x,t]==0

combinedkdvburgers

Compute 1-soliton solutions:

combinedkdvburgers1sol = PDESolitonSolutions[combinedkdvburgers,u,{x},t,{1},PrintInformation->True] (* //FullSimplify *)

The first solution in the above result is from the branch k[1] = β .

(combinedkdvburgers/.DSolve`DSolveToPureFunction[combinedkdvburgers1sol])//FullSimplify

An equation due to Calogero

calogeroeq:=(∂_t)u[x,t]-3 (3 u[x,t] ((((∂_x)u[x,t]))^2)+((u[x,t])^4) (∂_x)u[x,t]+((u[x,t])^2) (∂_({x,2}))u[x,t])-(∂_({x,3}))u[x,t]==0

calogeroeq

Compute 1-soliton solutions:

calogeroeq1sol = PDESolitonSolutions[calogeroeq,u,{x},t,{1}, PrintInformation-> True] (* // FullSimplify *)

transformedcalogeroeq=Numerator[Together[calogeroeq[[1]]/.u->Function[{x,t},v[x,t]^(1/2)]]]==0

Compute 1-soliton solutions for the transformed Calogero equation:

transformedcalogeroeq1sol = PDESolitonSolutions[transformedcalogeroeq,v,{x},t,{1},PrintInformation->True] (* //FullSimplify *)

(transformedcalogeroeq/.DSolve`DSolveToPureFunction[transformedcalogeroeq1sol[[1]]])//Simplify

transformedcalogeroeq2sol = PDESolitonSolutions[transformedcalogeroeq,v,{x},t,{2}, PrintInformation -> True]

An equation with two but not three solitons

eqtwonothreesolitons:=(∂_t)u[x,t]+(15/784)*((u[x,t])^3)*(∂_x)u[x,t]+(15/28)*u[x,t]*(∂_x)u[x,t]*(∂_({x,2}))u[x,t]+(15/56)*u[x,t]^2*(∂_({x,3}))u[x,t]+(5/2)*(∂_({x,2}))u[x,t]*(∂_({x,3}))u[x,t]+(∂_x)u[x,t]*(∂_({x,4}))u[x,t]+u[x,t]*(∂_({x,5}))u[x,t]+(∂_({x,7}))u[x,t]==0

eqtwonothreesolitons

eqtwonothreesolitons1sol =PDESolitonSolutions[eqtwonothreesolitons,u,{x},t,{1},PrintInformation->True]

eqtwonothreesolitons/.DSolve`DSolveToPureFunction[eqtwonothreesolitons1sol]//Simplify

eqtwonothreesolitons2sol= PDESolitonSolutions[eqtwonothreesolitons,u,{x},t,{2},PrintInformation->True]

Table[PossibleZeroQ[Chop[Quiet[(eqtwonothreesolitons[[1]]/.DSolve`DSolveToPureFunction[eqtwonothreesolitons2sol[[1]]])/.((#->RandomReal[{-2,2},WorkingPrecision->200]&)/@{k[1],k[2],k[3],delta[1],delta[2],delta[3],x,t})]]],{5}]

(*eqtwonothreesolitons3sol= PDESolitonSolutions[eqtwonothreesolitons,u,{x},t,{3},PrintInformation->True]*)

Above computation did not complete on my machine!

KP equation (KP-II case)

Equation (1):

kppde:=(∂_x)((∂_t)u[x,y,t]+6 u[x,y,t] (∂_x)u[x,y,t]+(∂_({x,3}))u[x,y,t])+3(∂_({y,2}))u[x,y,t]==0

kppde

Compute 1-soliton solutions:

kppde1sol = PDESolitonSolutions[kppde,u,{x,y},t,{1},PrintInformation->True,UseTruncatedPainleveExpansion->False] (* //FullSimplify *)

kppde/.DSolve`DSolveToPureFunction[kppde1sol]//Simplify

Compute 2-soliton solutions:

kppdesoliton2=PDESolitonSolutions[kppde,u,{x,y},t,{2}, PrintInformation -> True](*//Simplify*)

Table[PossibleZeroQ[Chop[Quiet[(kppde[[1]]/.DSolve`DSolveToPureFunction[kppdesoliton2[[1]]])/.((#->RandomReal[{-2,2},WorkingPrecision->400]&)/@{k[1],k[2],l[1],l[2],delta[1],delta[2],x,y,t})],10^-6]],{10}]

kppdesoliton2evaluated=kppdesoliton2[[1,1,2]]/.{k[1]->1,k[2]->-3/2,l[1]->2,l[2]->7/2,delta[1]->1,delta[2]->3/2}

With[{sol=kppdesoliton2evaluated},
Manipulate[Plot3D[sol,{x,-30,10},{y,-30,10},PlotPoints -> 100,PlotRange->All],{t,-1.5,1.5,0.0001},SaveDefinitions->True,ControlPlacement->{Top}]
]

Compute 3-soliton solutions:

kppdesoliton3=PDESolitonSolutions[kppde,u,{x,y},t,{3}];

Table[PossibleZeroQ[Chop[Quiet[(kppde[[1]]/.DSolve`DSolveToPureFunction[kppdesoliton3[[1]]])/.((#->RandomReal[{-3,3},WorkingPrecision->300]&)/@{k[1],k[2],k[3],l[1],l[2],l[3],delta[1],delta[2],delta[3],x,y,t})],10^(-8)]],{5}]

kppdesoliton3evaluated=kppdesoliton3[[1,1,2]]/.{k[1]->1.1,k[2]->1.7,k[3]->2.5,l[1]->1.2,l[2]->1.8,l[3]-> 2.3,delta[1]->0,delta[2]->0,delta[3]->0};

With[{sol=kppdesoliton3evaluated},
Manipulate[Plot3D[sol,{x,-15,15},{y,-15,15},PlotPoints -> 100,PlotRange->All],{t,-2.3,2.5,0.1},SaveDefinitions->True,ControlPlacement->{Top}]
]

A (3+1)-dimensional evolution equation

Reference: Geng, X., Ma, Y.: N-soliton solution and itsWronskian form of a (3+1)-dimensional nonlinear evolution equation. Phys. Lett. A 369(4), 285–289 (2007).

gengpdeinu:=3 (∂_({x,2},z))u[x,y,z,t]-(∂_y)(2 (∂_(x,t))u[x,y,z,t]+(∂_({x,4}))u[x,y,z,t]-2  (∂_x)u[x,y,z,t] (∂_({x,2}))u[x,y,z,t])+2 (∂_({x,1}))((∂_({x,2}))u[x,y,z,t] (∂_y)u[x,y,z,t])==0

gengpdeinu

Compute 1-soliton solutions:

gengpdeinu1sol = PDESolitonSolutions[gengpdeinu,u,{x,y,z},t,{1},PrintInformation->True] (* //FullSimplify *)

gengpdeinu/.DSolve`DSolveToPureFunction[gengpdeinu1sol]//Simplify

Compute 2-soliton solutions:

gengpdeinu2sol=PDESolitonSolutions[gengpdeinu,u,{x,y,z},t,{2},PrintInformation->True]

Table[PossibleZeroQ[Chop[Quiet[(gengpdeinu[[1]]/.DSolve`DSolveToPureFunction[gengpdeinu2sol[[1]]])/.((#->RandomReal[{-2,2},WorkingPrecision->300]&)/@{k[1],k[2],l[1],l[2],m[1],m[2],delta[1],delta[2],x,t})]]],{10}]

(*gengpdeinu3sol = PDESolitonSolutions[gengpdeinu,u,{x,y,z},t,{3},PrintInformation->True]*)

The computation of a three - soliton solution of the gengpdeinu did not finish overnight and not even the next day .

An equation with two but not three solitons

Reference: Il’in, I.A., Noshchenko, D.S., Perezhogin, A.S.: On classification of higher-order integrable nonlinear partial differential equations. Chaos, Solitons & Fractals 76, 278-281 (2015). doi: 10.1016/j.chaos.2015.04.004.

eqtwonothreesolitons:=(∂_t)u[x,t]+(15/784)*((u[x,t])^3)*(∂_x)u[x,t]+(15/28)*u[x,t]*(∂_x)u[x,t]*(∂_({x,2}))u[x,t]+(15/56)*u[x,t]^2*(∂_({x,3}))u[x,t]+(5/2)*(∂_({x,2}))u[x,t]*(∂_({x,3}))u[x,t]+(∂_x)u[x,t]*(∂_({x,4}))u[x,t]+u[x,t]*(∂_({x,5}))u[x,t]+(∂_({x,7}))u[x,t]==0

eqtwonothreesolitons

Compute 1-soliton solutions:

eqtwonothreesolitons1sol =PDESolitonSolutions[eqtwonothreesolitons,u,{x},t,{1},PrintInformation->True]  (* //FullSimplify *)

eqtwonothreesolitons/.DSolve`DSolveToPureFunction[eqtwonothreesolitons1sol]//Simplify

Compute 2-soliton solutions:

eqtwonothreesolitons2sol= PDESolitonSolutions[eqtwonothreesolitons,u,{x},t,{2},PrintInformation->True]

Table[PossibleZeroQ[Chop[Quiet[(eqtwonothreesolitons[[1]]/.DSolve`DSolveToPureFunction[eqtwonothreesolitons2sol[[1]]])/.((#->RandomReal[{-2,2},WorkingPrecision->200]&)/@{k[1],k[2],delta[1],delta[2],x,t})]]],{10}]

Compute 3-soliton solution (which in this example does not exist):

(*eqtwonothreesolitons3sol= PDESolitonSolutions[eqtwonothreesolitons,u,{x},t,{3},PrintInformation->True]*)

The computation of a three-soliton solution: The code stops after a long time (15 minutes) because the perturbation scheme does not terminate. A three-soliton solution can not be computed (actually, it does not exist as explained in our paper).

Scope and Limitations

PDESolitonSolutions can handle equations that are polynomial in the dependent variables. Up to three space variables and one time variable are allowed.

Acknowledgements

We gratefully acknowledge Wuning Zhuang (Master student) who helped with early implementations of the Hirota method in Macsyma and Mathematica, and Ameina Nuseir (Ph.D. student) who first computed the soliton solutions of the Kaup-Kuperschmidt equation. We also thank Andrew Cook (REU student) who helped write Mathematica code for the simplified Hirota method. Thanks to M. Trott (Wolfram Research, Inc.) for many valuable comments and suggestions. The National Science Foundation (USA) is thanked for the support in development of this package.

References

W. Hereman and A. Nuseir, Symbolic Methods to Construct Exact Solutions of Nonlinear Partial Differential Equations, Mathematics and Computers in Simulation, 43, 13-27 (1997).
W. Hereman and U. Goktas, Symbolic computation of solitary wave solutions and solitons through homogenization of degree. In: Nonlinear and Modern Mathematical Physics, Proc. 6th Int. Workshop on Nonlinear and Modern Mathematical Physics (NMMP2022), Eds: Solomon Manukure and Wen-Xiu Ma, Springer Proceedings in Mathematics and Statistics 10533, Springer Verlag, New York (2024), 61 pp, in press.

Contact Information

For information about the features of PDESolitonSolutions, or in case of trouble, contact Unal Goktas (ugoktas@tamu.edu) or Willy Hereman (whereman@mines.edu). Authors will greatly appreciate hearing your comments about the PDESolitonSolutions package. Please acknowledge the paper and code if  you use it in research projects. 
Refer to the paper as follows:  W. Hereman and U. Goktas, Symbolic computation of solitary wave solutions and solitons through homogenization of degree. In: Nonlinear and Modern Mathematical Physics, Proc. 6th Int. Workshop on Nonlinear and Modern Mathematical Physics (NMMP2022), Eds: Solomon Manukure and Wen-Xiu Ma, Springer Proceedings in Mathematics and Statistics 10533, Springer Verlag, New York (2024), 61 pp.
Refer to the code as follows:  U. Goktas and W. Hereman,  PDESolitonSolutions.m: A Mathematica package for the symbolic computation of solitary wave and soliton solutions of polynomial nonlinear PDEs using a simplified version of Hirota’s method. Dept. Appl. Maths. Stats., Colorado School of Mines, Golden, Colorado (2023).   https://inside.mines.edu/~whereman