Symbolic computation of exact solutions expressible in hyperbolic and elliptic

advertisement
Article Submitted to Journal of Symbolic Computation
Symbolic computation of exact solutions
expressible in hyperbolic and elliptic
functions for nonlinear PDEs ∗
D. Baldwin1 , Ü. Göktaş2 , W. Hereman1,3 , L. Hong4 , R. S.
Martino1 and J. C. Miller5
1
Department of Mathematical and Computer Sciences, Colorado School of
Mines, Golden, CO 80401-1887, U.S.A.
2
Wolfram Research, Inc., 100 Trade Center Drive, Champaign, IL 61820,
U.S.A.
3
Department of Applied Mathematics, University of Stellenbosch, Private Bag
X1, 7602 Matieland, South Africa
4
Department of Engineering and Applied Sciences, Harvard University,
Cambridge, MA 02138, U.S.A.
5
Department of Applied Mathematics and Theoretical Physics, Churchill
College, University of Cambridge, Cambridge CB3 0DS, England, U.K.
Abstract
Algorithms are presented for the tanh- and sech-methods, which lead to
closed-form solutions of nonlinear ordinary and partial differential equations (ODEs and PDEs). New algorithms are given to find exact polynomial solutions of ODEs and PDEs in terms of Jacobi’s elliptic functions.
For systems with parameters, the algorithms determine the conditions
on the parameters so that the differential equations admit polynomial
solutions in tanh, sech, combinations thereof, Jacobi’s sn or cn functions.
Examples illustrate key steps of the algorithms.
The new algorithms are implemented in Mathematica. The package
PDESpecialSolutions.m can be used to automatically compute new special solutions of nonlinear PDEs. Use of the package, implementation
issues, scope, limitations, and future extensions of the software are addressed.
A survey is given of related algorithms and symbolic software to compute exact solutions of nonlinear differential equations.
∗
This material is based upon research supported by the National Science Foundation under
Grants Nos. DMS-9732069, DMS-9912293 and CCR-9901929.
?Correspondence: whereman@mines.edu
1
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
2
1. Introduction
The appearance of solitary wave solutions in nature is quite common. Bell shaped
sech-solutions and kink shaped tanh-solutions model wave phenomena in fluids,
plasmas, elastic media, electrical circuits, optical fibers, chemical reactions, biogenetics, etc. The travelling wave solutions of the Korteweg-de Vries (KdV) and
Boussinesq equations, which describe water waves, are famous examples.
Apart from their physical relevance, the knowledge of closed-form solutions of
nonlinear ordinary and partial differential equations (ODEs and PDEs) facilitates the testing of numerical solvers, and aids in the stability analysis. Indeed,
the exact solutions given in this paper correspond to homoclinic and heteroclinic
orbits in phase space, which are the separatrices of stable and unstable regions.
Travelling wave solutions of many nonlinear ODEs and PDEs from soliton
theory (and beyond) can often be expressed as polynomials of the hyperbolic
tangent and secant functions. An explanation is given in, for example, Hereman
and Takaoka (1990). The existence of solitary wave solutions of evolution equations is addressed in Kichenassamy and Olver (1993). The tanh-method provides
a straightforward algorithm to compute such particular solutions for a large class
of nonlinear PDEs. Consult Malfliet (1992, 2004), Malfliet and Hereman (1996),
and Das and Sarma (1999) for a multitude of references to tanh-based techniques
and applications.
The tanh-method for, say, a single PDE in u(x, t) works as follows: In a travelling frame of reference, ξ = c1 x + c2 t + ∆, one transforms the PDE into an ODE
in the new independent variable T = tanh ξ. Since the derivative of tanh is polynomial in tanh, i.e., T 0 = 1 − T 2 , all derivatives of T are polynomials of T. Via a
chain rule, the polynomial PDE in u(x, t) is transformed into an ODE in U (T ),
which has polynomial coefficients in T . One then seeks polynomial solutions of
the ODE, thus generating a subset of the set of all solutions.
Along the path, one encounters ODEs which are nonlinear, higher-order versions of the ultraspherical differential equation,
(1 − x2 )y 00 (x) − (2α + 1)xy 0 (x) + n(n + 2α)y(x) = 0,
(1)
with integer n ≥ 0 and α real, whose solutions are the Gegenbauer polynomials.
Eq. (1) includes the Legendre equation (α = 21 ), satisfied by the Legendre polynomials, and the ODEs for Chebeyshev polynomials of type I (α = 0) and type
II (α = 1). Likewise, the associated Legendre equation,
(1 − x2 )2 y 00 (x) − 2x(x2 − 1)y 0 (x) + [n(n + 1)(1 − x2 ) − m2 ]y(x) = 0,
(2)
with m and n non-negative integers, appears in solving the Sturm-Liouville problem for the KdV with a sech-square potential (see Drazin and Johnson, 1989).
The appeal and success of the tanh-method lies in the fact that one circumvents integration to get explicit solutions. Variants of the method appear in
mathematical physics, plasma physics, and fluid dynamics. For early references
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
3
see e.g. Malfliet, 1992; Yang, 1994; and Das and Sarma, 1999. Recently, the
tanh-methods have been applied to many nonlinear PDEs in multiple independent variables (see Fan, 2002abc, 2003abc; Fan and Hon, 2002, 2003ab; Gao and
Tian, 2001; Li and Liu, 2002; Yao and Li, 2002ab).
In this paper we present three flavors of tanh- and sech-methods as they apply
to nonlinear polynomial systems of ODEs and PDEs. Based on the strategy of
the tanh-method, we also present algorithms to compute polynomial solutions
in terms of the Jacobi sn and cn functions. Applied to the KdV equation, the
so-called cnoidal solution (Drazin and Johnson, 1989) is obtained. For Duffing’s
equation (Lawden, 1989), we recover known sn and cn-solutions which model
vibrations of a nonlinear spring. Sn- and cn-methods are quite effective for symbolically solving nonlinear PDEs as shown in Fu et al. (2001), Parkes et al.
(2002), Liu and Li (2002ab), Fan and Zhang (2002), Fan (2003abc), Chen and
Zhang (2003ab), and Yan (2003).
We also present our package, PDESpecialSolutions.m (Baldwin et al., 2001)
in Mathematica, which implements the five methods. Without intervention by
the user, our software computes travelling wave solutions as polynomials in either
T = tanh ξ, S = sech ξ, combinations thereof,
P CN = cn(ξ; m), or SN = sn(ξ; m)
with ξ = c1 x + c2 y + c3 z + . . . + cn t + ∆ = N
j=0 cj xj + ∆. The coefficients of the
spatial coordinates are the components of the wave vector; the time coefficient
is the angular frequency of the wave. The wave travels in the direction of the
wave vector; its plane wave front is perpendicular to that wave vector. ∆ is the
constant phase. For systems of ODEs or PDEs with constant parameters, the
software automatically determines the conditions on the parameters so that the
equations might admit polynomial solutions in tanh, sech, both, sn or cn .
Parkes and Duffy (1996) mention the difficulty of using the tanh-method by
hand for anything but simple PDEs. Therefore, they automated to some degree
the tanh-method using Mathematica. Their code ATFM carries out some (but
not all) steps of the method. Parkes et al. (1998) also considered solutions to
(odd-order generalized KdV) equations in even powers of sech . The code ATFM
does not cover solutions involving odd powers of sech . Recently, Parkes et al.
(2002) extended their methods to cover the Jacobi elliptic functions. Abbott et al.
(2002) produced the function SeriesSn to partially automate the elliptic function
method. Li and Liu (2002) designed the Maple package RATH to automate the
tanh-method. In Liu and Li (2002a) they announce their Maple code AJFM for
the Jacobi elliptic function method. In Section 8.2 we review the codes ATFM,
RATH, AJFM, and SeriesSn and compare them with PDESpecialSolutions.m.
The paper is organized as follows: In Sections 2 and 3, we give the main steps
of the algorithms for computing tanh- and sech-solutions of nonlinear polynomial
PDEs. We restrict ourselves to polynomial solutions in either tanh or sech . The
Boussinesq equation and Hirota-Satsuma system of coupled KdV equations illustrate the steps. For references to both equations see e.g. Ablowitz and Clarkson
(1991). In Section 4 we consider a broader class of polynomial solutions involving
both tanh and sech . The tanh-sech algorithm is used to solve a system of PDEs
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
4
due to Gao and Tian (2001). In Section 5 we show how modifying the chain
rule allows us to find polynomial solutions in cn and sn. The KdV equation is
used to illustrates the steps. In Section 6 we give details of the algorithms to
compute the highest-degree of the polynomials, to analyze and solve nonlinear
algebraic systems with parameters, and to numerically and symbolically test solutions. The coupled KdV equations illustrate the subtleties of these algorithms.
In Section 7 we present exact solutions for several nonlinear ODEs and PDEs.
In Section 8 we address other perspectives and extensions of the algorithms, and
review related software packages. We discuss the results and draw some conclusions in Section 9. The use of the package PDESpecialSolutions.m is shown in
Appendix A.
2. Algorithm to compute tanh-solutions for nonlinear PDEs
In this section we outline the tanh-method (Malfliet and Hereman, 1996) for
the computation of closed-form tanh-solutions for nonlinear PDEs (and ODEs).
Each of the five main steps of our algorithm is illustrated for the Boussinesq
equation. Details of steps T2, T4 and T5 are postponed to Section 6.
Given is a system of polynomial PDEs with constant coefficients,
∆(u(x), u0 (x), u00 (x), · · · , u(k) (x), · · · , u(m) (x)) = 0,
(3)
where the dependent variable u has M components ui , the independent variable
x has N components xj , and u(k) (x) denotes the collection of mixed derivative
terms of order k. Lower-case Greek letters will denote parameters in (3).
For notational simplicity, in Section 7 we will use dependent variables u, v, w,
etc. and independent variables x, y, z, and t.
Example: The classical Boussinesq equation,
utt − uxx + 3uuxx + 3u2x + αuxxxx = 0,
(4)
with real parameter α, was proposed by Boussinesq to describe surface water waves whose horizontal scale is much larger than the depth of the water
(Ablowitz and Clarkson, 1991). Variants of (4) were recently solved by Fan and
Hon (2003a).
While one could apply the tanh-method directly to (4), we recast it as a first
order system in time to show the method for a simple system of PDEs. So,
u1,x2 + u2,x1 = 0,
u2,x2 + u1,x1 − 3u1 u1,x1 − αu1,3x1 = 0,
(5)
where x1 = x, x2 = t, u1 (x1 , x2 ) = u(x, t), and u2 (x1 , x2 ) = ut (x, t). We use
def
ui,kxj =
through out this paper.
∂ k ui
,
∂xkj
def
ui,pxj rxk sx` =
∂ p+r+s ui
, etc.
∂xpj ∂xrk ∂xs`
(6)
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
5
Step T1: Transform the PDE into a nonlinear ODE
We seek solutions in the travelling frame of reference,
ξ=
N
X
cj xj + ∆,
(7)
j=1
where cj and ∆ are constant.
The tanh-method seeks polynomial solutions expressible in the hyperbolic
tangent, T = tanh ξ. Based on the identity cosh2 ξ − sinh2 ξ = 1 one computes
tanh0 ξ = sech2 ξ = 1 − tanh2 ξ,
tanh00 ξ = −2 tanh ξ + 2 tanh3 ξ, etc.
(8)
Therefore, the first and, consequently, all higher-order derivatives are polynomials in T. Since T 0 = 1 − T 2 , repeatedly applying the chain rule,
∂ξ dT d•
d•
∂•
=
= cj (1 − T 2 ) ,
∂xj
∂xj dξ dT
dT
(9)
transforms the system of PDEs into a coupled system of nonlinear ODEs,
∆(T, U(T ), U0 (T ), U00 (T ), . . . , U(m) (T )) = 0,
(10)
with U(T ) = u(x). Each component of ∆ is a nonlinear ODE with polynomial
coefficients in T.
Example: Substituting
ui,xj = cj (1 − T 2 )Ui0 ,
0
ui,2xj = c2j (1 − T 2 ) (1 − T 2 )Ui0 = c2j (1 − T 2 )[−2T Ui0 + (1 − T 2 )Ui00 ],
0
ui,3xj = c3j (1 − T 2 ) −2T (1 − T 2 )Ui0 + (1 − T 2 )2 Ui00
= c3j (1 − T 2 ) −2(1 − 3T 2 )Ui0 − 6T (1 − T 2 )Ui00 + (1 − T 2 )2 Ui000 ,
(11)
into (5), and cancelling common (1 − T 2 ) factors, yields
c2 U10 + c1 U20 = 0,
c2 U20 +c1 U10 −3c1 U1 U10 +αc31 2(1−3T 2 )U10 +6T (1−T 2 )U100 −(1−T 2 )2 U1000 = 0,
(12)
where U1 (T ) = u1 (x1 , x2 ) and U2 (T ) = u2 (x1 , x2 ).
Step T2: Determine the degree of the polynomial solutions
Seeking polynomial solutions of the form
Ui (T ) =
Mi
X
aij T j ,
(13)
j=0
we must determine the leading exponents Mi before the aij can be computed.
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
6
We assume that Mi ≥ 1 to avoid trivial solutions. Substituting Ui into (10), the
coefficients of every power of T in every equation must vanish. In particular, the
highest degree terms must vanish. Since the highest degree terms depend only on
T Mi in (13), it suffices to substitute Ui (T ) = T Mi into the left hand side of (10).
In the resulting polynomial system P(T ), equating every two possible highest
exponents in every component Pi gives a linear system for the Mi . That linear
system is then solved.
If one or more exponents Mi remain undetermined, assign an integer value to
the free Mi so that every equation in (10) has at least two different terms with
equal highest exponents. Carry each solution to step T3.
Example: For the Boussinesq system, substituting U1 (T ) = T M1 and U2 (T ) =
T M2 into (12), and equating the highest exponents of T for each equation, gives
M1 − 1 = M2 − 1,
2M1 − 1 = M1 + 1.
(14)
Then, M1 = M2 = 2, and
U1 (T ) = a10 + a11 T + a12 T 2 , U2 (T ) = a20 + a21 T + a22 T 2 .
(15)
Step T3: Derive the algebraic system for the coefficients aij
To generate the system for the unknown coefficients aij and wave parameters
cj , substitute (13) into (10) and set the coefficients of T i to zero. The resulting
nonlinear algebraic system for the unknowns aij is parameterized by the cj , and
the external parameters (in lower-case Greek letters) of system (3), if any.
Example: Continuing with the Boussinesq system, after substituting (15) into
(12), and collecting the terms of like degree in T, we get (in order of complexity):
a21 c1 + a11 c2 = 0,
a22 c1 + a12 c2 = 0,
a11 c1 (3a12 + 2α c21 ) = 0,
a12 c1 (a12 + 4α c21 ) = 0,
a11 c1 − 3a10 a11 c1 + 2αa11 c31 + a21 c2 = 0,
−3a211 c1 + 2 a12 c1 − 6a10 a12 c1 + 16α a12 c31 + 2a22 c2 = 0,
(16)
with unknowns a10 , a11 , a12 , a20 , a21 , a22 , and parameters c1 , c2 , and α.
Step T4: Solve the nonlinear parameterized algebraic system
The most difficult step is solving the nonlinear algebraic system. To do so, we
designed a customized, yet powerful, nonlinear solver (see Section 6.2 for details).
The nonlinear algebraic system is solved with the following assumptions:
(i) all parameters, α, β, etc., in (3) are strictly positive. Vanishing parameters
may change the exponents Mi in step T2. To compute solutions corresponding
to negative parameters, reverse the signs of the parameters in the PDE. For
example, replace α by −α in (4).
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
7
(ii) the coefficients of the highest power terms (ai Mi , i = 1, · · · , M ) in (13) are
all nonzero (for consistency with step T2).
(iii) all cj are nonzero (demanded by the physical nature of the solutions).
Example: Assuming c1 , c2 , a12 , a22 , and α nonzero, the solution of (16) is
a10 = (c21 − c22 + 8αc41 )/(3c21 ), a11 = 0, a12 = −4αc21 ,
a20 = arbitrary, a21 = 0, a22 = 4αc1 c2 .
(17)
In this case, there are no conditions on the parameters c1 , c2 and α.
Step T5: Build and test the solitary wave solutions
Substitute the solutions obtained in step T4 into (13) and reverse step T1 to
obtain the explicit solutions in the original variables. It is prudent to test the
solutions by substituting them into (3). For details about testing see Section 6.3.
Example: Inserting (17) into (15), and replacing T = tanh(c1 x + c2 t + ∆), the
closed form solution for (5) (or (4)) is
u(x, t) = u1 (x, t) = (c21 − c22 + 8αc41 )/(3c21 ) − 4αc21 tanh2 (c1 x + c2 t + ∆),
R
u2 (x, t) = − u1,t (x, t)dx = a20 + 4αc1 c2 tanh2 (c1 x + c2 t + ∆),
(18)
where a20 , c1 , c2 , α and ∆ are arbitrary. Steps T1-T5 must be repeated if one or
more of the external parameters (lower-case Greeks) are set to zero.
3. Algorithm to compute sech-solutions for nonlinear PDEs
In this section we restrict ourselves to polynomial solutions of (3) in sech . Polynomial solutions involving both sech and tanh are dealt with in Section 4. Details
of the algorithms for steps S2, S4 and S5 are in Section 6.
Using tanh2 ξ + sech2 ξ = 1, solution (18) of (5) can be expressed as
u1 (x, t) = (c21 − c22 − 4αc41 )/(3c21 ) + 4αc21 sech2 (c1 x + c2 t + ∆),
u2 (x, t) = a20 + 4αc1 c2 − 4αc1 c2 sech2 (c1 x + c2 t + ∆).
(19)
Obviously, any even order solution in tanh can be written in even orders of
sech . Some PDEs however have polynomial solutions of odd-order in sech . For
example, the modified KdV equation (Ablowitz and Clarkson, 1991),
ut + αu2 ux + uxxx = 0,
(20)
has the solution
u(x, t) = ±c1
p
6/α sech(c1 x − c31 t + ∆),
(21)
which cannot be found using the tanh-method.
Example: The five main steps of the sech-algorithm are illustrated with the
Hirota-Satsuma system of coupled KdV equations (Ablowitz and Clarkson, 1991),
ut − α(6uux + uxxx ) + 2βvvx = 0,
vt + 3uvx + vxxx = 0,
(22)
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
8
with real parameters α, β. Sech-type solutions were reported in Hereman (1991)
and Fan and Hon (2002). Variants and generalizations of (22) were solved in
Chen and Zhang (2003a) and Yan (2003).
Letting u1 (x1 , x2 ) = u(x, t) and u2 (x1 , x2 ) = v(x, t), Eq. (22) is then
u1,x2 − α(6u1 u1,x1 + u1,3x1 ) + 2βu2 u2,x1 = 0,
u2,x2 + 3u1 u2,x1 + u2,3x1 = 0.
(23)
Step S1: Transform the PDE into a nonlinear ODE
Adhering to the travelling frame of reference (7), and using tanh2 ξ + sech2 ξ = 1,
q
0
sech ξ = −sech ξ tanh ξ = −sech ξ 1 − sech2 ξ.
(24)
Setting S = sech ξ and repeatedly applying the chain rule,
√
∂•
∂ξ dS d•
d•
=
= −cj S 1 − S 2 ,
∂xj
∂xj dξ dS
dS
(3) is transformed into a system of nonlinear ODEs of the form:
√
Γ(S, U(S), U0 (S), . . .) + 1 − S 2 Π(S, U(S), U0 (S), . . .) = 0,
(25)
(26)
where U(S) = u(x), and all components of Γ and Π are ODEs with polynomial
coefficients in S. If either Γ or Π is identically 0, then
∆(S, U(S), U0 (S), . . .) = 0,
(27)
where ∆ is either Γ or Π, whichever is nonzero. For this to occur, the order of
all terms in any equation in (3) must be even or odd (as is the case in (23)).
Any term in (3) for which the total number of derivatives is even contributes
to the first term in (26); while any term of odd order contributes to the second
term. Section 4 deals with any case for which neither Γ or Π is identically 0.
Example: Substituting
√
ui,xj = −cj S 1 − S 2 Ui0 ,
h √
i0
√
ui,xj xk = cj ck S 1 − S 2 S 1 − S 2 Ui0
(28)
= cj ck S[(1 − 2S 2 )Ui0 + S(1 − S 2 )Ui00 ],
√
0
ui,xj xk xl = −cj ck cl S 1 − S 2 S(1 − 2S 2 )Ui0 + S(1 − S 2 )Ui00
√
= −cj ck cl S 1−S 2 (1−6S 2 )Ui0 +3S(1−2S 2 )Ui00 +S 2 (1−S 2 )Ui000 ,
√
into (23), and cancelling the common S 1 − S 2 factors yields
c2 U10−6αc1 U1 U10−αc31 (1−6S 2 )U10+3S(1−2S 2 )U100+S 2 (1−S 2 )U1000 +2βc1 U2 U20 = 0,
(29)
c2 U20 +3c1 U1 U20 +c31 (1−6S 2 )U20 +3S(1−2S 2 )U200 +S 2 (1−S 2 )U2000 = 0,
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
9
with U1 (T ) = u1 (x1 , x2 ) and U2 (T ) = u2 (x1 , x2 ). Note that (29) matches (27)
with ∆ = Π, since Γ = 0.
Step S2: Determine the degree of the polynomial solutions
We seek polynomial solutions of the form,
Ui (S) =
Mi
X
aij S j .
(30)
j=0
To determine the Mi exponents, substitute Ui (S) = S Mi into the left hand side
of (27) and proceed as in step T2. Continue with step S3 for each solution of
Mi . If some of the Mi exponents are undetermined, try all legitimate values for
the free Mi . See Section 6.1 for more details.
Example: For (23), substituting U1 (S) = S M1 , U2 (S) = S M2 into (29) and
equating the highest exponents in the second equation yields M1 + M2 − 1 =
1 + M2 , or M1 = 2. The maximal exponents coming from the first equation are
2M1 − 1 (from the U1 U10 term), M1 + 1 (from U1000 ), and 2M2 − 1 (from U2 U20 ).
Using M1 = 2, two cases emerge: (i) the third exponent is less than the first two
(equal) exponents, i.e., 2M2 − 1 < 3, so M2 = 1, or (ii) all three exponents are
equal, in which case M2 = 2. For the case M1 = 2 and M2 = 1,
U (S) = a10 + a11 S + a12 S 2 ,
V (S) = a20 + a21 S,
(31)
V (S) = a20 + a21 S + a22 S 2 .
(32)
and, for the case M1 = M2 = 2,
U (S) = a10 + a11 S + a12 S 2 ,
Step S3: Derive the algebraic system for the coefficients aij
Follow the strategy in step T3.
Example: After substituting (31) into (29), cancelling common numerical factors, and organizing the equations (according to complexity) one obtains
a11 a21 c1 = 0,
αa11 c1 (3a12 − c21 ) = 0,
αa12 c1 (a12 − 2c21 ) = 0,
a21 c1 (a12 − 2c21 ) = 0,
a21 (3a10 c1 + c31 + c2 ) = 0,
6αa10 a11 c1 − 2βa20 a21 c1 + αa11 c31 − a12 c2 = 0,
3αa211 c1 + 6αa10 a12 c1 − βa221 c1 + 4αa12 c31 − a12 c2 = 0.
Similarly, after substitution of (32) into (29), one gets
a22 c1 (a12 − 4c21 ) = 0,
a21 (3a10 c1 + c31 + c2 ) = 0,
c1 (a12 a21 + 2a11 a22 − 2a21 c21 ) = 0,
(33)
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
c1 (3αa11 a12 − βa21 a22 − αa11 c21 )
c1 (3αa212 − βa222 − 6αa12 c21 )
6αa10 a11 c1 − 2βa20 a21 c1 + αa11 c31 − a11 c2
3a11 a21 c1 + 6a10 a22 c1 + 8a22 c31 + 2a22 c2
3αa211 c1 + 6αa210 a12 c1 − βa221 c1 − 2βa20 a22 c1 + 4αa12 c31 − a12 c2
=
=
=
=
=
10
0, (34)
0,
0,
0,
0.
Step S4: Solve the nonlinear parameterized algebraic system
Similar strategy as in step T4.
Example: For α, β, c1 , c2 , a12 and a21 all nonzero, the solution of (33) is
a10 = −(c31 + c2 )/(3c1 ), a11 = 0, a12 = 2c21 ,
q
a20 = 0, a21 = ± (4αc41 − 2(1 + 2α)c1 c2 )/β.
(35)
For α, β, c1 , c2 , a12 and a22 nonzero, the solution of (34) is
a10 = −(4c31 + c2 )/(3c1 ), a11 = 0, a12 = 4c21 ,
p
p
a20 = ±(4αc31 + (1 + 2α)c2 )/(c1 6αβ), a21 = 0, a22 = ∓2c21 6α/β.
(36)
Step S5: Build and test the solitary wave solutions
Substitute the result of step S4 into (30) and reverse step S1. Test the solutions.
Example: The solitary wave solutions of (23) are
u(x, t) = −(c31 + c2 )/(3c1 ) + 2c21 sech2 (c1 x + c2 t + ∆),
q
v(x, t) = ± [4αc41 − 2(1 + 2α)c1 c2 ]/β sech(c1 x + c2 t + ∆),
(37)
u(x, t) = −(4c31 + c2 )/(3c1 ) + 4c21 sech2 (c1 x + c2 t + ∆),
p
p
v(x, t) = ±(4αc31 +(1+2α)c2 )/(c1 6αβ) ∓ 2c21 6α/β sech2 (c1 x+c2 t+∆).
(38)
and
In both cases c1 , c2 , α, β, and ∆ are arbitrary. These solutions contain the solutions reported in Hereman (1991).
Steps S1-S5 must be repeated if any of the parameters in (3) are set to zero.
4. Algorithm for mixed tanh-sech solutions for PDEs
The five main steps of our algorithm to compute mixed tanh-sech solutions for
(3) are presented below. Here we seek particular solutions of (26) when Γ 6= 0
and Π 6= 0. On could apply the method of Section 3 to (26) in ‘squared’ form
Γ2 (S, U(S), U0 (S), . . .) − (1 − S 2 ) Π2 (S, U(S), U0 (S), . . .) = 0. For anything
but
√
simple cases, the computations are unwieldy. Alternatively, since T = 1 − S 2 ,
Eq. (26) may admit solutions of the form
Ui (S) =
M̃i X
Ñi
X
j=0 k=0
ãi,jk S j T k .
(39)
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
11
However, (39) can always be rearranged such that
Ui (S) =
Mi
X
j=0
j
aij S + T
Ni
X
j=0
j
bij S =
Mi
X
j
aij S +
j=0
√
1−
S2
Ni
X
bij S j .
(40)
j=0
The polynomial solutions in S √from Section 3 are special cases of this broader
class. Remarkably, (27) where 1 − S 2 is not explicitly present also admits solutions of the form (40). See Section 7.6 for an example.
Computing solutions of type (30) with the tanh-sech method is inefficient and
costly, as the following example and the examples in Sections 7.5 and 7.6 show.
Example: We illustrate this algorithm with the system (Gao and Tian, 2001):
ut − ux − 2v = 0,
vt + 2uw = 0,
wt + 2uv = 0.
Step ST1: Transform the PDE into a nonlinear ODE
Same as step S1.
Example: Use (25) to transform (41) into
√
(c1 − c2 )S 1 − S 2 U10 − 2U2 = 0,
√
c2 S 1 − S 2 U20 − 2U1 U3 = 0,
√
c2 S 1 − S 2 U30 − 2U1 U2 = 0.
(41)
(42)
with Ui (S) = ui (x1 , x2 ), i = 1, 2, 3.
Step ST2: Determine the degree of the polynomial solutions
Seeking solutions of form (40), we must first determine
the leading Mi and Ni
√
Mi
exponents. Substituting Ui (S) = ai0 + ai Mi S + 1 − S 2 (bi0 + bi Ni S Ni ) into
the left hand side of (26), we get an expression of the form
√
P(S) + 1 − S 2 Q(S),
(43)
where P and Q are polynomials in S.
Consider separately the possible balances of highest exponents in all Pi and Qi .
Then solve the resulting linear system(s) for the unknowns Mi and Ni . Continue
with each solution in step ST3.
In contrast to step S2, we no longer assume Mi ≥ 1, Ni ≥ 1. Even with
some Mi or Ni zero, non-constant solutions Ui (S) often arise. In most examples,
however, the sets of balance equations for Mi and Ni are too large or the corresponding linear systems are under-determined (i.e., several leading exponents
remain arbitrary). To circumvent the problem, we set all Mi = 2 and all Ni = 1,
restricting the solutions to (at most) quadratic in S and T.
Example: For (42), we set all Mi = 2, Ni = 1, and continue with
√
Ui (S) = ai0 + ai1 S + ai2 S 2 + 1 − S 2 (bi0 + bi1 S), i = 1, 2, 3.
(44)
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
12
Step ST3: Derive the algebraic system for the coefficients aij and bij
√
e
e
Substituting (40) into (26) gives P(S)
+ 1 − S 2 Q(S),
which must vanish identically. Hence, equate to zero the coefficients of the power terms in S so that
e = 0 and Q
e = 0.
P
Example: After substitution of (44) into (42), the resulting nonlinear algebraic
system for the coefficients aij and bij contains 25 equations (not shown).
Step ST4: Solve the nonlinear parameterized algebraic system
In contrast to step S4 we no longer assume that ai Mi and bi Ni are nonzero (at
the cost of generating some constant solutions, which we discard later).
Example: For (41), there are 11 solutions. Three are trivial, leading to constant
Ui . Eight are nontrivial solutions giving the results below.
Step ST5: Build and test the solitary wave solutions
Proceed as in step S5.
Example: The solitary wave solutions of (41) are:
u(x, t) = ±c2 tanh ξ,
v(x, t) = ∓ 12 c2 (c1 − c2 ) sech2 ξ,
w(x, t) = − 21 c2 (c1 − c2 ) sech2 ξ,
(45)
which could have been obtained with the tanh-method of Section 2;
u(x, t) = ±ic2 sech ξ,
v(x, t) = ± 12 ic2 (c1 − c2 ) tanh ξ sech ξ,
w(x, t) = 41 c2 (c1 − c2 ) 1 − 2 sech2 ξ ,
(46)
reported in Gao and Tian (2001); and the two complex solutions
u(x, t) = ± 12 ic2 (sech ξ ± i tanh ξ) ,
v(x, t) = 14 c2 (c1 − c2 ) sech ξ (sech ξ ± i tanh ξ) ,
w(x, t) = − 14 c2 (c1 − c2 ) sech ξ (sech ξ ± i tanh ξ) .
(47)
In all solutions ξ = c1 x + c2 t + ∆, with c1 , c2 and ∆ arbitrary. The complex
conjugates of (47) are also solutions.
5. Algorithms to compute sn and cn solutions for PDEs
In this section we give the main steps (labelled CN1-CN5) of our algorithm to
compute polynomial solutions of (3) in terms of Jacobi’s elliptic cosine function
(cn). Modifications needed for solutions involving the sn function are given at the
end of this section. Details for steps CN2, CN4 and CN5 are shown in Section 6.
Example: Consider the KdV equation (Ablowitz and Clarkson, 1991),
ut + αuux + uxxx = 0,
(48)
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
13
with real constant α. The KdV equation models, among other things, waves in
shallow water and ion-acoustic waves in plasmas.
Step CN1: Transform the PDE into a nonlinear ODE
Similar to the strategy in T1 and S1, using (Lawden, 1989)
sn2 (ξ; m) = 1 − cn2 (ξ; m), dn2 (ξ; m) = 1 − m + m cn2 (ξ; m),
(49)
and
cn0 (ξ; m) = −sn(ξ; m)dn(ξ; m),
(50)
p
one has CN0 = − (1 − CN2 )(1 − m + m CN2 ) where CN = cn(ξ; m) is the
Jacobi elliptic cosine with argument ξ and modulus 0 ≤ m ≤ 1.
Repeatedly applying the chain rule
q
d•
∂•
∂ξ dCN d•
=
= −cj (1 − CN2 )(1 − m + m CN2 )
,
(51)
∂xj
∂xj dξ dCN
dCN
system (3) is transformed into a nonlinear ODE system. In addition to the cj ,
the algorithm introduces m as an extra parameter.
Example: Using (51) to transform (48) we have
c31 (1 − 2m + 6m CN2 ) − c2 − αc1 U1 U10
(52)
+ 3c31 CN(1 − 2m + 2m CN2 )U100 −c31 (1− CN2 )(1 − m + m CN2 )U1000 = 0
Step CN2: Determine the degree of the polynomial solutions
Follow the strategy in step T2.
Example: For (48), substituting U1 (CN) = CNM1 into (52) and equating the
highest exponents gives 1 + M1 = −1 + 2 M1 . Then, M1 = 2, and
U1 (CN) = a10 + a11 CN + a12 CN2 .
(53)
Step CN3: Derive the algebraic system for the coefficients aij
Proceed as in step T3.
Example: For (48), after substituting (53) into (52), one finds
a11 c1 (α a12 − 2 m c21 ) = 0,
a12 c1 (α a12 − 12 m c21 ) = 0,
a11 (α a10 c1 − c31 + 2 m c31 + c2 ) = 0,
α a211 c1 + a12 (2 α a10 c1 − 16m c31 − 8 c31 + 2 c2 ) = 0.
(54)
Step CN4: Solve the nonlinear parameterized algebraic system
Solve the system as in step T4.
Example: For c1 , c2 , m, α and a12 nonzero, the solution of (54) is
a10 = [4c31 (1 − 2 m) − c2 ]/(α c1 ), a11 = 0, a12 = (12 m c21 )/α.
(55)
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
14
Step CN5: Build and test the solitary wave solutions
Substitute the results of step CN4 into (53). Reverse step CN1. Test the solutions.
Example: The cnoidal wave solution of (48) is
u(x, t) = [4c31 (1 − 2m) − c2 ]/(αc1 ) + (12m c21 )/(α) cn2 (c1 x + c2 t + ∆; m), (56)
where c1 , c2 , α, ∆ and modulus m are arbitrary. If any of the parameters in (3)
are zero, steps CN1-CN5 should be repeated.
Computation of solutions involving Sn
To find solutions in terms of Jacobi’s sn function, one uses the identities,
cn2 (ξ; m) = 1 − sn2 (ξ; m), dn2 (ξ; m) = 1 − m sn2 (ξ; m),
(57)
sn0 (ξ; m) = cn(ξ; m) dn(ξ; m).
p
Then, SN0 = (1 − SN2 )(1 − m SN2 ), where SN = sn(ξ; m) is the Jacobi elliptic
sine with argument ξ and modulus 0 ≤ m ≤ 1. The steps are identical to the cn
case, except one uses the chain rule
q
∂ξ dSN d•
d•
∂•
=
= cj (1 − SN2 )(1 − m SN2 )
.
(58)
∂xj
∂xj dξ dSN
dSN
Since (51) and (58) involve roots, as in Sections 3 and 4 there is no reason to
restrict the solutions to polynomials in only cn or sn . Solutions involving both
sn and cn (or combinations with dn) are beyond the scope of this paper.
Finally, from the sn and cn solutions, sin, cos, sech, and tanh-solutions can be
obtained by taking the appropriate limits for the modulus (m → 0, and m → 1).
Indeed, sn(ξ; 0) = sin(ξ), sn(ξ; 1) = tanh(ξ), cn(ξ; 0) = cos(ξ),
cn(ξ; 1) = sech(ξ).
√
No need to compute solutions in dn explicitly since cn( mξ; 1/m) = dn(ξ; m).
6. Key Algorithms
In this section we present in a uniform manner the details of steps two, four and
five of the algorithms in Sections 2-5.
6.1. Algorithm to compute the degree of the polynomials
Step M1: Substitute the leading-order ansatz
A tracking variable is attached to each term in the original system of PDEs. Let
Tr[i] denote the tracking variable of the ith term in (3).
The first step of the main algorithms leads to a system of parameterized ODEs
in U, U0 , U00 , . . . , U(m) . These ODEs match the form
p
(59)
Γ(F, U(F ), U0 (F ), . . .) + R(F ) Π(F, U(F ), U0 (F ), . . .) = 0,
where F is either T, S, CN, or SN, and R(F ) is defined in Table 1.
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
F
T
S
CN
SN
15
R(F )
0
1 − S2
(1 − CN2 )(1 − m + m CN2 )
(1 − SN2 )(1 − m SN2 )
Table 1: Values for R(F ) in (59).
Since the highest degree term only depends on F Mi , it suffices to substitute
Ui (F ) → F Mi
(60)
into (59).
Example: We use the coupled KdV equations (22) as our leading example:
Tr[1]ut − 6αTr[2]uux + 2βTr[3]vvx − αTr[4]uxxx = 0,
Tr[5]vt + 3Tr[6]uvx + Tr[7]vxxx = 0.
(61)
Step S1 resulted in (29) with Π = 0. Substituting (60) into (61), we get
(Tr[1]c2 M1 − αTr[4]c31 M13 )S M1 −1 + αTr[4]c31 M1 (M1 + 1)(M1 + 2)S M1 +1
−6αTr[2]c1 M1 S 2M1 −1 + 2βTr[3]c1 M2 S 2M2 −1 = 0,
(62)
(Tr[5]c2 M2 + Tr[7]c31 M23 )S M2 −1 − Tr[7]c31 M2 (M2 + 1)(M2 + 2)S M2 +1
+3Tr[6]c1 M2 S M1 +M2 −1 = 0.
Step M2: Collect exponents and prune sub-dominant branches
The balance of highest exponents must come from different terms in (3). For each
equation ∆i and for each tracking variable, collect the exponents of F, remove
duplicates, and non-maximal exponents. For example, M1 − 1 can be removed
from {M1 + 1, M1 − 1} because M1 + 1 > M1 − 1.
Example: Collecting the exponents of S in (62), we get the unpruned list:
∆1
∆2
{M1 −1}
Tr[5] : {M2 −1}
{2M1 −1}
Tr[6] : {M1 +M2 −1}
Tr[7] : {M2 +1, M2 +1, M2 +1, M2 −1}
{2M2 −1}
{M1 +1, M1 +1, M1 +1, M1 −1}
(63)
We prune by removing duplicates and non-maximal expressions, and get
Tr[1] :
Tr[2] :
Tr[3] :
Tr[4] :
from ∆1 : {M1 + 1, 2M1 − 1, 2M2 − 1},
from ∆2 : {M2 + 1, M1 + M2 − 1}.
(64)
Step M3: Combine expressions and compute relations for Mi
For each ∆i separately, equate all possible combinations of two elements. Construct relations between the Mi by solving for one Mi .
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
16
Example: Combining the expressions in (64), we get
∆1
∆2
M1 + 1 = 2M1 − 1 M2 + 1 = M1 + M2 − 1
M1 + 1 = 2M2 − 1
2M1 − 1 = 2M2 − 1
(65)
We construct relations between the Mi by solving for M1 (in this case):
∆1
∆2
M1 = 2
M1 = 2
M1 = 2M2 − 2
M1 = M 2
(66)
Step M4: Combine relations and solve for exponents Mi
By combining the lists of expressions in an outer product like fashion, we generate
all the possible linear equations for Mi . Solving this linear system, we form a list
of all the possible solutions for Mi .
Example: Combining the equations in ∆1 and ∆2 , we obtain
{M1 = 2, M1 = 2}, {M1 = 2, M1 = M2 }, {M1 = 2, M1 = 2M2 − 2}.
(67)
Solving, we find
M1 = 2
M2 = 2
M1 = 2
M2 = Free
(68)
Step M5: Discard invalid exponents Mi
The solutions are substituted into the unpruned list of exponents (in step M2).
For every solution (without free exponents) we test whether or not there is a
highest-power balance between at least two different tracking variables. If not,
the solution is rejected. Non-positive, fractional, and complex exponents are
discarded (after showing them to the user). Negative exponents (Mi = −pi ) and
fractional exponents (Mi = pi /qi ) indicate that a change of dependent variables
(u1 = ũi −pi or ui = ũi 1/qi ) should be attempted in (3). Presently, such nonlinear
transformations are only carried out automatically for single equations.
Example: Removing the case {M1 = 2, M2 = Free} from (68), we substitute
{M1 = 2, M2 = 2} into (63). Leading exponent (3 in this case) occurs for Tr[2],
Tr[3] and Tr[4] in ∆1 , and for Tr[6] and Tr[7] in ∆2 . The solution is accepted.
Step M6: Fix undetermined Mi and generate additional solutions
When some solutions involve one or more arbitrary Mi we produce candidate
solutions with a countdown procedure and later reject invalid candidates.
Based on the outcome of step M5, scan for freedom in one or more of Mi by
gathering the highest-exponent expressions from the unpruned list in step M2.
If the dominant expressions are free of any of the Mi , a countdown mechanism
generates valid integer values for those Mi . These values of Mi must not exceed
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
17
those computed in step M5. Candidate solutions are tested (and rejected, if
necessary) by the procedure in step M5.
Example: The dominant expressions from (63) with {M1 = 2, M2 = 2} are
∆1
∆2
Tr[2] : {2M1 − 1} Tr[6] : {M1 + M2 − 1}
Tr[3] : {2M2 − 1} Tr[7] : {M2 + 1}
Tr[4] : {M1 + 1}
(69)
Substituting M1 = 2, the highest exponent (3 in this case) matches for Tr[2]
and Tr[4] in ∆1 when M2 ≤ 2. The highest exponent (M2 + 1) matches for
Tr[6] and Tr[7] in ∆2 .
A countdown mechanism then generates the following list of candidates
M1 = 1
M1 = 1
M1 = 2
M1 = 2
(70)
M2 = 1
M2 = 2
M2 = 1
M2 = 2
Verifying these candidate solutions, we are left with
M1 = 2
M1 = 2
M2 = 1
M2 = 2
(71)
Notice that for the new solution {M1 = 2, M2 = 1} only the exponents corresponding to Tr[2] and Tr[4] in ∆1 are equal.
Currently, for the mixed tanh-sech method, the code sets Mi = 2 and Ni = 1.
6.2. Algorithm to analyze and solve nonlinear algebraic systems
In this section, we detail our algorithm to analyze and solve nonlinear parameterized algebraic systems (as generated in step 3 of the main algorithms). Our solver
is custom-designed for systems that are (initially) polynomial in the primary unknowns (aij ), the secondary unknowns (ci ), and parameters (m, α, β, γ, . . .).
The goal is to compute the coefficients aij in terms of the wave numbers
ci and the parameters m, α, β, etc. In turn, the ci must be solved in terms of
these parameters. Possible compatibility conditions for the parameters (relations
amongst them or specific values for them) must be added to the solutions.
Algebraic systems are solved recursively, starting with the simplest equation,
and continually back-substituting solutions. This process is repeated until the
system is completely solved.
To guide the recursive process, we designed functions to (i) factor, split, and
simplify the equations; (ii) sort the equations according to their complexity;
(iii) solve the equations for sorted unknowns; (iv) substitute solutions into the
remaining equations; and (v) collect the solution branches and constraints.
This strategy is similar to what one would do by hand. If there are numerous
parameters in the system or if it is of high degree, there is no guarantee that our
solver will return a suitable result, let alone a complete result.
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
18
Step R1: Split and simplify each equation
For all but the mixed tanh-sech algorithm, we assume that the coefficients aiMi
of the highest power terms are nonzero and that ci , m, α, β, etc. are nonzero. For
the mixed sech-tanh method, aiMi = ai2 and biNi = bi1 are allowed to be zero.
We first factor equations and set admissible factors equal to zero (after clearing
possible exponents). For example, {φ1 φ2 3 φ3 2 = 0} → {φ1 = 0, φ2 = 0, φ3 = 0},
where φi is a polynomial in primary and secondary unknowns along with the
parameters. Equations where non-zero expressions are set to zero are disgarded.
Example: Consider (34), which was derived in the search for sech-solutions of
(22) for case M1 = M2 = 2. Taking a12 , a22 , c1 , c2 , α, β, to be nonzero, splitting
equations, and removing non-zero factors leads to
a12 − 4c21 = 0,
a21 = 0 ∨ (3a10 c1 + c31 + c2 ) = 0,
a12 a21 + 2a11 a22 − 2a21 c21 = 0,
3αa11 a12 − βa21 a22 − αa11 c21 = 0,
3αa212 − βa222 − 6αa12 c21 = 0,
6αa10 a11 c1 − 2βa20 a21 c1 + αa11 c31 − a11 c2 = 0,
3a11 a21 c1 + 6a10 a22 c1 + 8a22 c31 + 2a22 c2 = 0,
3αa211 c1 + 6αa10 a12 c1 − βa221 c1 − 2βa20 a22 c1 + 4αa12 c31 − a12 c2 = 0,
(72)
where ∨ is the logical or.
Step R2: Sort equations according to complexity
A heuristic measure of complexity is assigned to each φi by computing a weighted
sum of the degrees of nonlinearity in the primary and secondary unknowns, parameters, and the length of φi . Linear and quasi-linear equations (with products
like a11 a21 ) are of lower complexity than polynomial equations of higher degree
or non-polynomial equations. Solving the equation of the lowest complexity first,
forestalls branching, avoids expression swell, and conserves memory.
Example: Sorting (72), we get
a12 − 4c21 = 0,
3αa11 a12 − βa21 a22 − αa11 c21 = 0,
a12 a21 + 2a11 a22 − 2a21 c21 = 0,
a21 = 0 ∨ (3a10 c1 + c31 + c2 ) = 0,
3αa212 − βa222 − 6αa12 c21 = 0,
6αa10 a11 c1 − 2βa20 a21 c1 + αa11 c31 − a11 c2 = 0,
3a11 a21 c1 + 6a10 a22 c1 + 8a22 c31 + 2a22 c2 = 0,
3αa211 c1 + 6αa10 a12 c1 − βa221 c1 − 2βa20 a22 c1 + 4αa12 c31 − a12 c2 = 0.
(73)
Step R3: Solve equations for ordered unknowns
The ordering of unknowns is of paramount importance. The unknowns from
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
19
the first equation from step R2 are ordered so that the lowest exponent primaryunknowns precede the primary-unknowns that the equation is not polynomial in.
If there are not any primary-unknowns, the lowest exponent secondary-unknowns
precede the secondary-unknowns that the equation is not polynomial in. Likewise, in the absence of primary- or secondary-unknowns, the lowest exponent
parameters precede the non-polynomial parameters.
The equation is solved using the built-in Mathematica function Reduce, which
produces a list of solutions and constraints. Constraints of the form a 6= b (where
neither a or b is zero) are pruned, and the remaining constraints and solutions
are collected.
Example: In this example, a12 − 4c21 = 0 is solved for a12 and the solution
a12 = 4c21 is added to a list of solutions.
Step R4: Recursively solve the entire system
The solutions and constraints from step R3 are applied and added to the previously found solutions and constraints. In turn, all the solutions are then applied
to the remaining equations. The updated system is simplified by clearing common denominators in each equation and continuing with the numerators. Steps
R1-R4 are then repeated on the simplified system.
Example: Substituting a12 = 4c21 and clearing denominators, we obtain
βa21 a22 − 11αa11 c21 = 0
a11 a22 + a21 c21 = 0,
a21 = 0 ∨ (3a10 c1 + c31 + c2 ) = 0,
βa222 − 24αc41 = 0,
6αa10 a11 c1 − 2βa20 a21 c1 + αa11 c31 − a11 c2 = 0,
3a11 a21 c1 + 6a10 a22 c1 + 8a22 c31 + 2a22 c2 = 0,
3αa211 − βa221 − 2βa20 a22 + 24αa10 c21 + 16αc41 − 4c1 c2 = 0.
(74)
The recursive process terminates when the system is completely solved. The
solutions (including possible constraints) are returned.
Repeating steps R1-R4 seven more times the global solution of (34) is obtained:
a10 = −(4c31 + c2 )/(3c1 ), a11 = 0, a12 = 4c21 ,
p
p
a20 = ±(4αc31 + (1 + 2α)c2 )/(c1 6αβ), a21 = 0, a22 = ∓2c21 6α/β.
(75)
where c1 , c2 , α and β are arbitrary.
This solution of (33), corresponds to the M1 = 2, M2 = 1 case given in (35).
6.3. Algorithm to build and test solutions
The solutions to the algebraic system found in Section 6.2 are substituted into
ui (x) =
Mi
X
j=0
j
aij F (ξ) +
p
R(F )
Ni
X
j=0
bij F j (ξ),
(76)
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
20
where F and R(F ) are defined in Section 6.1. The constraints on the parameters
(m, α, β, etc.) are also collected and applied to system (3).
Since the algorithm used to solve the nonlinear algebraic system continually
clears denominators, it is important to test the final solutions for ui . While
Mathematica’s Reduce function generates constraints that should prevent any
undetermined or infinite coefficients aij after back-substitution, it is still prudent
to check the solutions.
To present solutions in the simplest format, we assume that all parameters
(ci , m, α, β,
numbers. √
This allows
√ etc.) are√positive, real √
p us to repeatedly apply
2
2
rules like α → α, −α → i α, −β → i β and −(c1 + c2 )2 → i (c1 + c2 ).
We allow for two flavors of testing: a numeric test for complicated solutions and
a symbolic test which guarantees the solution. In either test, we substitute the
solutions into (3) after casting the solutions into exponential form, i.e., tanh ξ →
(eξ − e−ξ )/(eξ + e−ξ ) and sech ξ → 2/(eξ + e−ξ ).
For the numeric test of solutions:
• after substituting the solution, substitute random real numbers in [−1, 1]
for xi , ci , and ∆ in the left hand side of (3),
• expand and factor the remaining expressions,
• substitute random real numbers in [−1, 1] for arbitrary aij , bij , m, α, . . . ,
• expand and factor the remaining expressions,
• if the absolute value of each of the expressions < ≈ MachinePrecision/2,
then accept the solution as valid, else reject the solution (after showing it
to the user).
√
√
2
Mathematica evaluates a2 → a when a is numeric, but does
√ not evaluate a →
2
|a| when a is symbolic. Our simplification routines use a = a instead of |a|
when a is symbolic. This has two consequences: (i) valid solutions may be missed,
and (ii) solutions have a 1/2 probability of evaluating to matching signs during
the numeric test. The numeric test being inconclusive, we perform a symbolic
test.
For the symbolic test of solutions:
• after substituting the solution, expand and factor the left hand side of (3),
√
√
• apply simplification rules like a2 → a, −a2 → i a, 1 − sech2 ξ → tanh2 ξ,
and sn2 (x; m) → 1 − cn2 (x; m),
• repeat the above simplifications until the expressions are static,
• if the final expressions are identically equal to zero, then accept the solution,
else reject the solution and report the unresolved expressions to the user.
7. Examples of solitary wave solutions for ODEs and PDEs
The algorithms from Sections 2-5 were implemented in our Mathematica package
PDESpecialSolutions.m, which was used to solve the equations in this Section.
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
21
7.1. The Zakharov-Kuznetsov KdV-type equations
The KdV-Zakharov-Kuznetsov (KdV-ZK) equation,
ut + αuux + uxxx + uxyy + uxzz = 0,
(77)
models ion-acoustic waves in magnetized multi-component plasmas including
negative ions (see e.g. Das and Verheest, 1989).
With PDESpecialSolutions (Tanh and Sech options) we found the solution
8c1 (c21 + c22 + c23 ) − c4 12(c21 + c22 + c23 )
−
tanh2 ξ,
αc1
α
2
2
2
2
4c1 (c1 + c2 + c3 ) + c4 12(c1 + c22 + c23 )
+
sech2 ξ,
=−
αc1
α
u(x, y, z, t) =
(78)
where ξ = c1 x + c2 y + c3 z + c4 t + ∆, with c1 , c2 , c3 , c4 , ∆ and α arbitrary.
For c2 = c3 = 0 and replacing c4 by c2 , one gets the solitary wave solution
8c31 − c2 12c21
tanh2 (c1 x + c2 t + ∆),
−
αc1
α
3
4c + c2 12c21
=− 1
+
sech2 (c1 x + c2 t + ∆),
αc1
α
u(x, t) =
(79)
of the ubiquitous KdV equation (48).
The function PDESpecialSolutions does not take boundary or initial conditions as input. One can a posteriori impose conditions on solutions. For example,
requiring limx→±∞ u(x, t) = 0 in (79) would fix c2 = −4c31 .
For the modified KdV-ZK equation (Das and Verheest, 1989),
ut + αu2 ux + uxxx + uxyy + uxzz = 0,
(80)
using the Tanh and Sech options, PDESpecialSolutions returns
q
u(x, y, z, t) = ±i 6(c21 + c22 + c23 )/α tanh ξ,
(81)
with ξ = c1 x + c2 y + c3 z + 2c1 (c21 + c22 + c23 )t + ∆, and
q
u(x, y, z, t) = ± 6(c21 + c22 + c23 )/α sech ξ,
(82)
with ξ = c1 x + c2 y + c3 z − c1 (c21 + c22 + c23 )t + ∆. For c2 = c3 = 0, (81) and (82)
reduce to the well-known solitary wave solutions
p
u(x, t) = ±ic1 6/α tanh(c1 x + 2c31 t + ∆),
(83)
p
u(x, t) = ±c1 6/α sech(c1 x − c31 t + ∆)
(84)
(c1 , ∆ and α arbitrary real numbers) of the modified KdV (mKdV) equation
(Ablowitz and Clarkson, 1991),
ut + αu2 ux + uxxx = 0.
(85)
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
22
For a three dimensional modified KdV (3D-mKdV) equation,
ut + 6u2 ux + uxyz = 0,
(86)
one obtains the solitary wave solution
√
u(x, y, z, t) = ± c2 c3 sech(c1 x + c2 y + c3 z − c1 c2 c3 t + ∆),
(87)
where c1 , c2 , c3 and ∆ are arbitrary.
7.2. The generalized Kuramoto-Sivashinsky equation
Consider the generalized Kuramoto-Sivashinsky (KS) equation (see e.g. Parkes
and Duffy, 1996):
ut + uux + uxx + αuxxx + uxxxx = 0.
(88)
Ignoring complex solutions, PDESpecialSolutions (Tanh option) automatically
determines the special values of the real parameter α and the corresponding
closed form solutions. For α = 4,
u(x, t) = 9 ± 2c2 ± 15 tanh ξ − 15 tanh2 ξ ∓ 15tanh3 ξ,
with ξ = ∓ 21 x + c2 t + ∆. For α =
u(x, t) =
√12 ,
47
45 ∓ 4418c2
45
45
15
√
± √ tanh ξ − √ tanh2 ξ ± √ tanh3 ξ, (90)
47 47
47 47
47 47
47 47
where ξ = ± 2√147 x + c2 t + ∆. For α =
u(x, t) =
(89)
√16 ,
73
2(30 ∓ 5329c2 )
75
60
15
√
± √ tanh ξ − √ tanh2 ξ ± √ tanh3 ξ, (91)
73 73
73 73
73 73
73 73
where ξ = ± 2√173 x + c2 t + ∆.
The remaining solutions produced by PDESpecialSolutions are either complex (not shown here) or can be obtained from the solutions above via the inversion symmetry of (88): u → −u, x → −x, α → −α.
A separate run of the code after setting α = 0 in (88) yields
r
r
r
19
135 11
165 11
c2 −
tanh ξ +
tanh3 ξ,
(92)
u(x, t) = −2
11
19 19
19 19
q
1
with ξ = 2 11
x + c2 t + ∆. In all solutions above c2 is arbitrary.
19
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
23
7.3. Coupled KdV equations
In Section 3 we gave the sech-solutions for the Hirota-Satsuma system (22). Here
we list the tanh, cn and sn solutions for (22) computed by PDESpecialSolutions
(Tanh, JacobiCN and JacobiSN options):
2c31 − c2
− 2c21 tanh2 (ξ),
3c1
q
v(x, t) = ± [8αc41 + 2(1 + 2α)c1 c2 ]/β tanh(ξ),
u(x, t) =
8c31 − c2
− 4c21 tanh2 (ξ),
3c1
p
8αc31 − (1 + 2α)c2
√
v(x, t) = ±
∓ 2c21 6α/β tanh2 (ξ),
c1 6αβ
(93)
u(x, t) =
(1 + m)c31 − c2
− 2m c21 sn2 (ξ; m),
3c1
q
v(x, t) = ± [4αm(1 + m)c41 + 2(1 + 2α)m c1 c2 ]/β sn(ξ, m),
u(x, t) =
4(1 + m)c31 − c2
− 4m c21 sn2 (ξ; m),
3c1
p
4α(1 + m)c31 − (1 + 2α)c2
√
∓ 2c21 6α/β sn2 (ξ; m),
v(x, t) = ±
c1 6αβ
u(x, t) =
(94)
(1 − 2m)c31 − c2
+ 2m c21 cn2 (ξ; m),
3c1
q
v(x, t) = ± [4αm(2m − 1)c41 − 2(1 + 2α)m c1 c2 ]/β cn(ξ; m),
u(x, t) =
4(1 − 2m)c31 − c2
+ 4m c21 cn2 (ξ; m),
3c1
p
4α(1 − 2m)c31 − (1 + 2α)c2
√
± 2c21 6α/β cn2 (ξ; m),
v(x, t) = ±
c1 6αβ
(95)
u(x, t) =
with ξ = c1 x + c2 t + ∆, and c1 , c2 , α, β, ∆, and modulus m arbitrary. These
solutions correspond with those given in Fan and Hon (2002).
With the SechTanh option we obtained two dozen (real and complex) solutions. The real solutions coincide with the ones given above.
Another coupled system of KdV-type equations was studied by Guha-Roy
(1987)
ut + αvvx + βuux + γuxxx = 0,
vt + δ(uv)x + vvx = 0,
(96)
where α through are real constants. The package PDESpecialSolutions (Sech
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
24
option) computed:
42 γc31 + (4αδ + 2 )c2 122 γc21
u(x, t) = −
+
sech2 (c1 x + c2 t + ∆),
Ac1
A
2[4δγc31 + (δ − β)c2 ] 24δγc21
−
sech2 (ξ),
v(x, t) =
Ac1
A
(97)
where ξ = c1 x+c2 t+∆, A = 4αδ 2 +β2 , with c1 , c2 , ∆ and α through arbitrary.
For = 0, (96) reduces to Kawamoto’s system; for = 0, δ = −2 to Ito’s system.
Neither of these systems has polynomial solutions in sech or tanh .
7.4. The Fisher and FitzHugh-Nagumo equations
For the Fisher equation (Malfliet, 1992),
ut − uxx − u(1 − u) = 0,
(98)
with PDESpecialSolutions (Tanh option) we found the (real) solution
u(x, t) =
1
4
± 21 tanh ξ + 41 tanh2 ξ,
(99)
5
with ξ = ± 2√1 6 x ± 12
t + ∆. In addition, there are 4 complex solutions.
Obviously, PDESpecialSolutions handles ODEs also. For example, we can
put the FitzHugh-Nagumo (FHN) equation (Hereman, 1990),
ut − uxx + u(1 − u)(α − u) = 0,
(100)
where −1 ≤ α < 1, into a travelling frame,
√
√
√
√
βvz + 2vzz − 2v(1 − 2v)(α − 2v) = 0,
(101)
√
with v(z) = v(x − √β2 t) = 2 u(x, t). Ignoring the inversion symmetry z →
−z, β → −β of (101), we find with PDESpecialSolutions (Tanh option)
"
#
√
1
2
v(z) = √ β + (β − 2) tanh[
(2 − β)z + ∆] ,
(102)
4
2 2
if α = β − 1;
#
"
√
(β + 2)
2
v(z) = √
1 − tanh[
(β + 2)z + ∆] ,
4
2 2
if α = β + 2; and
"
#
√
1
2
v(z) = √ 1 + tanh[
z + ∆] ,
4
2 2
(103)
(104)
if α = 12 (β +1). In these solutions (see e.g. Hereman, 1990) β and ∆ are arbitrary.
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
25
7.5. A degenerate Hamiltonian system
Gao and Tian (2001) considered the following degenerate Hamiltonian system,
ut − ux − 2v = 0,
vt − 2 uv = 0, = ±1,
(105)
which was shown to be completely integrable by admitting infinitely many conserved densities. Our code does not find sech-solutions. With the SechTanh option, PDESpecialSolutions returns the solutions:
u(x, t) = −c2 tanh ξ,
v(x, t) = 21 c2 (c1 − c2 ) sech2 ξ,
(106)
which could have been obtained with the tanh-method in Section 2; and
u(x, t) = 21 ic2 (sech ξ + i tanh ξ),
v(x, t) = 14 c2 (c1 − c2 ) sech ξ (sech ξ + i tanh ξ),
(107)
plus their two complex conjugates. There are no constraints on c1 , c2 , and , and
ξ = c1 x + c2 t + ∆. The above solutions were reported in Gao and Tian (2001).
7.6. The combined KdV-mKdV equation
The combined KdV-mKdV equation (see Gao and Tian, 2001)
ut + 6αuux + 6βu2 ux + γuxxx = 0,
(108)
describes a variety of wave phenomena in plasma, solid state, and quantum
physics.
We chose this example to show that ODEs of type (27), which are free
√
of 1 − S 2 , can admit mixed tanh-sech solutions.
First, PDESpecialSolutions with the Tanh option, produces
r
α
γ
c1
±i
u(x, t) = −
c1 tanh(c1 x +
(3α2 + 4βγc21 )t + ∆).
(109)
2β
β
2β
Next, with the Sech option, PDESpecialSolutions computes
r
α
γ
c1
±
c1 sech[c1 x +
(3α2 − 2βγc21 )t + ∆].
u(x, t) = −
2β
β
2β
Third, with the SechTanh option, PDESpecialSolutions finds
q
α
u(x, t) = −
+ 21 βγ c1 (sech ξ ± i tanh ξ),
2β
and
u(x, t) = −
q
α
− 21 βγ c1 (sech ξ ∓ i tanh ξ),
2β
(110)
(111)
(112)
where ξ = c1 x + 12 cβ1 (3α2 + βγc21 )t + ∆. In all solutions c1 , ∆, α, β and γ are
arbitrary. The solutions were reported in Gao and Tian (2001), although there
were minor misprints.
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
26
7.7. The Duffing Equation
Duffing’s equation (Lawden, 1989),
u00 + u + αu3 = 0,
models a nonlinear spring problem. Its cn and sn solutions
s
2m
x
+ ∆; m), = ±1,
cn( √
u(x) = ±
(1 − 2m)α
1 − 2m
s
−2m
x
u(x) = ±
sn( √
+ ∆; m), = ±1,
(1 + m)α
1+m
(113)
(114)
are computed by PDESpecialSolutions with the JacobiCN and JacobiSN options. There are four sign combinations in (114). Since 0 ≤ m ≤ 1, the cn solution
is real when α > 0 and m < 21 . The sn solution is real for α < 0. Such conditions
are not automatically generated. During simplifications the code assumes α > 0
(see Section 6.2 for details).
Initial conditions fix
√ the modulus 2in (114). For2 example, u(0) = a and u̇(0) = 0
lead to u(x) = a cn( 1 + αa2 x; (αa )/(2 + 2αa )).
7.8. A class of fifth-order PDEs with three parameters
To illustrate the limitations of PDESpecialSolutions consider the family of
fifth-order KdV equations (Göktaş and Hereman, 1997),
ut + αu2 ux + βux uxx + γuuxxx + uxxxxx = 0,
(115)
where α, β, and γ are nonzero parameters.
An investigation of the scaling properties of (115) reveals that only the ratios
α
and βγ are important, but let us proceed with (115).
γ2
Special cases
Several special cases of (115) are well known (for references see Göktaş and
Hereman, 1997). Indeed, for α = 30, β = 20, γ = 10, Eq. (115) reduces to
ut + 30u2 ux + 20ux uxx + 10uuxxx + uxxxxx = 0,
(116)
which belongs to the completely integrable hierarchy of higher-order KdV equations constructed by Lax. Equation (116) has two tanh-solutions:
u(x, t) = 4c21 − 6c21 tanh2 (c1 x − 56c51 t + ∆),
(117)
and
u(x, t) = a10 − 2c21 tanh2 [c1 x − 2(15a210 c1 − 40a10 c31 + 28c51 )t + ∆],
where a10 , c1 , ∆ are arbitrary.
(118)
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
27
For α = β = γ = 5, one gets the equation,
ut + 5u2 ux + 5ux uxx + 5uuxxx + uxxxxx = 0,
(119)
due to Sawada and Kotera (SK) and Dodd and Gibbon, which has tanh-solutions:
u(x, t) = 8c21 − 12c21 tanh2 (c1 x − 16c51 t + ∆),
(120)
and
u(x, t) = a10 − 6c21 tanh2 [c1 x − (5a210 c1 − 40a10 c31 + 76c51 )t + ∆],
(121)
where a10 , c1 , ∆ are arbitrary.
The KK equation due to Kaup and Kupershmidt,
ut + 20u2 ux + 25ux uxx + 10uuxxx + uxxxxx = 0,
(122)
corresponding to α = 20, β = 25, γ = 10, and again admits two tanh-solutions:
3
u(x, t) = c21 − c21 tanh2 (c1 x − c51 t + ∆),
2
(123)
u(x, t) = 8c21 − 12c21 tanh2 (c1 x − 176c51 t + ∆),
(124)
and
with c1 , ∆ arbitrary, but no additional arbitrary coefficients.
The equation
ut + 2u2 ux + 6ux uxx + 3uuxxx + uxxxxx = 0,
(125)
for α = 2, β = 6, γ = 3, was studied by Ito. It has one tanh solution:
u(x, t) = 20c21 − 30c21 tanh2 (c1 x − 96c51 t + ∆),
(126)
again with c1 and ∆ arbitrary. PDESpecialSolutions (Tanh option) produces
all these solutions.
General case
Eq. (115) is hard to analyze by hand or with the computer. After a considerably
amount of time, PDESpecialSolutions (Tanh option) produced the solutions
given below (but not in as nice a form). Our write-up of the solutions is the
result of additional interactive work with Mathematica.
The coefficients a10 , a11 , and a12 in
u(x, t) = a10 + a11 tanh(ξ) + a12 tanh2 (ξ),
(127)
with ξ = c1 x + c2 + ∆, must satisfy the following nonlinear algebraic system with
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
28
parameters c1 , c2 , α, β, and γ :
αa212 + 6βa12 c21 + 12γa12 c21 + 360c41 = 0,
a11 (αa212 + 2βa12 c21 + 6γa12 c21 + 24c41 ) = 0,
a11 (αa210 c1 − 2γa10 c31 + 2βa12 c31 + 16c51 + c2 ) = 0,
a11 (αa211 + 6αa10 a12 + 6γa10 c21 − 12βa12 c21 − 18γa12 c21 − 120c41 ) = 0,
2αa211 a12 + 2αa10 a212 + βa211 c21 + 3γa211 c21 + 12γa10 a12 c21
−8βa212 c21 − 8γa212 c21 − 480a12 c41 = 0,
αa10 a211 c1 + αa210 a12 c1 − βa211 c31 − γa211 c31 − 8γa10 a12 c31 + 2βa212 c31
+136a12 c51 + a12 c2 = 0.
(128)
Assuming nonzero a12 , c1 , c2 , α, β, and γ, two cases must be distinguished:
Case 1: a11 = 0. In turn, this case splits into two sub-cases:
Case 1a:
3
a11 = 0, a12 = − a10 , c2 = c31 (24c21 − βa10 ),
(129)
2
where a10 must be one of the roots of
αa210 − 4βa10 c21 − 8γa10 c21 + 160c41 = 0.
Case 1b:
6γ
1
a11 = 0, a12 = − c21 , c2 = − (α2 a210 c1 −8αγa10 c31 +16αc51 +12γ 2 c51 ),
α
α
provided that
1
β = (10α − γ 2 ).
γ
(130)
(131)
(132)
Case 2: a11 6= 0. Then
α=
168 2
1
(8β 2 + 38βγ + 39γ 2 ), a12 = −
c,
392
2β + 3γ 1
(133)
provided β is one of the roots of
(104β 2 + 886βγ + 1487γ 2 )(520β 3 + 2158β 2 γ − 1103βγ 2 − 8871γ 3 ) = 0. (134)
Thus, case 2 also splits into two sub-cases:
1
Case 2a: If β 2 = − 104
(886βγ + 1487γ 2 ), then
1
52(4378β + 9983γ 2
336 2
(2β + 5γ)γ, a10 = −
c1 , a11 = ±
c,
26
7γ(958β + 2213γ)
2β + 3γ 1
364(1634β + 3851γ) 5
168 2
=−
c1 , c 2 = −
c1 .
2β + 3γ
2946β + 6715γ
α=−
a12
where β is any root of 104β 2 + 886βγ + 1487γ 2 = 0.
(135)
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
Case 2b: If β 3 =
1
(1103βγ 2
520
29
+ 8871γ 3 − 2158β 2 γ), then
28(1066β 2 + 5529βγ + 6483γ 2 ) 2
1
(8β 2 + 38βγ + 39γ 2 ), a10 =
c,
392
(2β + 3γ)(6β + 23γ)(26β + 81γ) 1
28224(26β − 17γ)(4β − γ)
168 2
a211 =
c41 , a12 = −
c,
(136)
2
(2β + 3γ) (6β + 23γ)(26β + 81γ)
2β + 3γ 1
8(188900114β 2 + 1161063881βγ + 1792261977γ 2 ) 5
c2 = −
c1 ,
105176786β 2 + 632954969βγ + 959833473γ 2
α=
where β is any root of 520β 3 + 2158β 2 γ − 1103βγ 2 − 8871γ 3 = 0.
8. Other Algorithms and Related Software
8.1. Other perspectives and potential generalizations
The algorithms presented in this article can be extended in several ways. For
instance, one could modify the chain rule in step T1 (S1, ST1, or CN1) to
compute other types of solutions or consider more complicated polynomials than
those used in step T2 (S2, ST2, or CN2). Both options could be used together.
With respect to the first option, it suffices to know the underlying first-order
differential equation of the desired fundamental function in the polynomial solution. Table 2 summarizes some of the more obvious choices.
Function
Symbol ODE (y 0 = dy
dξ )
Chain Rule
∂•
∂xj
S
y0 = 1 − y2
p
y 0 = −y 1 − y 2
∂•
∂xj
= cj (1 − T2 ) dd•
T
√
= −cj S 1 − S2 dd•S
tan(ξ)
TAN
y0 = 1 + y2
∂•
∂xj
d•
= cj (1 + TAN2 ) dTAN
exp(ξ)
E
y0 = y
∂•
∂xj
cn(ξ; m)
CN
∂•
∂xj
sn(ξ; m)
SN
P(ξ; g2 , g3 )
P
p
y 0 = − (1−y 2 )(1−m+m y 2 )
p
y 0 = (1 − y 2 )(1 − m y 2 )
p
y 0 = ± 4y 3 − g2 y − g3
= cj E dd•E
p
d•
=−cj (1− CN2 )(1−m+m CN2 ) dCN
p
= cj (1 − SN2 )(1 − mSN2 ) dd•
SN
p
d•
3
= ±cj 4y −g2 y−g3 dP
tanh(ξ)
T
sech(ξ)
∂•
∂xj
∂•
∂xj
Table 2: Functions with corresponding ODEs and chain rules. P(x; g2 , g3 ) is the Weierstrass
function with invariants g2 and g3 .
Several researchers, including Fan (2002abc) and Gao and Tian (2001), seek
solutions of the form
ui (x, t) = Ui (ξ) =
Mi
X
j=1
aij w(ξ)j ,
ξ = c1 x + c2 t + ∆,
(137)
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
30
where w(ξ) is constrained by a Riccati equation,
w0 (ξ) = b + w2 (ξ), = ±1, b real constant.
(138)
Ignoring rational solutions, (138) has the following solutions
w(ξ) = a
w(ξ) = a
w(ξ) = a
w(ξ) = a
tanh(aξ + c), if = −1, b = a2 ,
coth(aξ + c), if = −1, b = a2 ,
tan(aξ + c),
if = 1, b = a2 ,
cot(aξ + c),
if = −1, b = −a2 .
(139)
So, (137) is polynomial in tanh ξ, tan ξ, coth ξ, or cot ξ. The integration constant
c gets absorbed in ∆, and the constant a (or b) is an extra parameter in the
nonlinear algebraic system for the aij . For single PDEs, Yao and Li (2002ab)
consider solutions of the form
u(x, t) = U (ξ) =
M
X
j
aj w(ξ) +
j=0
M
X
bj z(ξ)w(ξ)j−1 ,
(140)
j=0
where w(ξ) and z(ξ) satisfy the Riccati equations
w0 (ξ) = −w(ξ)z(ξ),
z 0 (ξ) = 1 − z 2 (ξ).
(141)
Since w(ξ) = sech(ξ), z(ξ) = tanh(ξ) this approach is similar to the sech-tanh
method in Section 4.
Generalizing further, Fan (2002b, 2003abc), Fan and Hon (2002, 2003a), and
Hon and Fan (2004b) take
p
y 0 (ξ) = b0 + b1 y + b2 y 2 + b3 y 3 + b4 y 4 , bi constant,
(142)
which covers the functions sech, sec, tanh, tan, cn, sn, and P. The parameters bi
are added to the nonlinear algebraic system, which makes such systems hard
to solve without human intervention. Most often, such complicated nonlinear
algebraic systems are solved interactively with the aid of Mathematica or Maple.
To avoid unmanageable systems, Mi (≤ 2) is often fixed in (137). Chen and
Zhang (2003ab), Fan and Dai (2003), and Sirendaoreji (2003, 2004) use variants
of (142) to compute polynomial and rational solutions in terms of tanh, sech, tan,
Jacobi’s elliptic functions, etc.
Zheng et al. (2002) introduce a clever method to compute mixed tanh-sech
solutions for the combined KdV-Burgers equations. They seek formal solutions,
u(x, t) = U (ξ) = a0 +
M
X
j=1
subject to
dw
dξ
j
bj sin w(ξ) +
M
X
aj cos w(ξ) sin w(ξ)j−1 ,
(143)
j=1
= sin w(ξ) which, upon integration, gives sin w(ξ) = sech(ξ) and
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
cos w(ξ) = ± tanh(ξ). Alternatively, one can use
cos w(ξ) = − sech(ξ) and sin w(ξ) = ± tanh(ξ).
Liu and Li (2002a) seek solutions of the forms
U (ξ) =
M
X
aj sn(ξ)j ,
U (ξ) =
j=0
U (ξ) =
M
X
aj sn(ξ)j +
j=0
j
aj sn(ξ) +
j=0
+
M
X
M
X
M
X
= cos w(ξ), which leads to
bj cn(ξ) sn(ξ)j−1 ,
j=0
j−1
Aj cn(ξ) sn(ξ)
j=0
M
X
dw
dξ
31
+
M
X
bj dn(ξ) sn(ξ)j−1
(144)
j=0
Bj cn(ξ) dn(ξ) sn(ξ)j−2 ,
j=0
which generalize the Jacobi elliptic function method in Section 4.
With respect to the second option, Gao and Tian (2001) consider
ui (x, t) =
Mi
X
j=0
aij (x, t) tanhj Ψ(x, t) +
Ni
X
bij (x, t) sechΨ(x, t) tanhj Ψ(x, t), (145)
j=0
where Ψ(x, t) is not necessarily linear in x and/or t. Of course, (145) arises from
recasting the terms in (39) in a slightly different way than (40). Restricted to
travelling waves, Ψ(x, t) = c1 x + c2 t + ∆, both forms are equivalent.
Our algorithms could be generalized in many ways. With considerable effort,
solutions involving complex exponentials multiplied by tanh or sech functions
could be attempted. A solution to the nonlinear Schrödinger equation is of this
form. Fan and Hon (2003b), Hon and Fan (2004a) and Fan (2003bc) give examples of complex as well as transcendental equations solved with the tanh-method.
8.2. Review of Symbolic Algorithms and Software
There is a variety of methods to find solitary wave solutions and soliton solutions of special nonlinear PDEs. See e.g. Hereman and Takaoka (1990), Estévez
and Gordoa (1995, 1998), and Helal (2002). Some of these methods are straightforward to implement in computer algebra systems (CAS).
The most comprehensive methods of finding exact solutions for ODEs and
PDEs are based on similarity reductions via Lie point symmetry methods. These
methods are hard to fully automate (for publications and software see e.g.
Cantwell, 2002; Hereman, 1996; Hydon, 2000). Most CAS have tools to solve
a subset of linear and nonlinear PDEs. For example, Mathematica’s DSolve can
find general solutions for linear and weakly nonlinear PDEs. Available within
MuPAD, the code pdesolve uses the method of characteristics to solve quasilinear first order PDEs. Maple offers the packages ODEtools (for solving ODEs
using classification, integrating factor and symmetry methods) and PDEtools,
which contains the function pdesolve to find exact solutions of some classes of
PDEs. For information consult Cheb-Terrab (1995, 2001ab).
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
32
The methods presented in this paper are different from these efforts. Our
algorithms and software only compute specific solutions of nonlinear PDEs which
model travelling waves in terms of the tanh, sech, sn and cn functions. Our code
can handle systems of ODEs and PDEs with undetermined parameters.
To our knowledge, only four software packages are similar to ours. The first
package is ATFM by Parkes and Duffy (1996), who automated to some degree the
tanh-method using Mathematica. In contrast to ATFM, our software performs
the computations automatically from start to finish without human intervention.
In our code, the number of independent variables xi is not limited to one space
variable x and time t; our code handles any number of dependent variables.
The second package is RATH by Li and Liu (2002), which automates the tanhmethod. In contrast to our code, RATH only works for single PDEs. Extensions
to cover systems of PDEs and sech solutions are under development. Surpassing
our code, RATH can solve PDEs with an unspecified degree of nonlinearity and
deal with negative and fractional exponents.
Table 3 compares the performance of PDESpecialSolutions.m and RATH.
The solution times are comparable, yet occasionally there is a mismatch in the
number of solutions computed. This is due in part to the representation of solutions. Occasionally special solutions are generated although–after inspection by
hand–they are included in more general solutions.
Liu and Li (2002a) present the Maple code AJFM to automate the Jacobi elliptic
Name of Equation
KdV-Burgers
KdV-Burgers-Kuramoto
7th-order dispersive
5th-order mKdV (Ito)
7th-order mKdV (Ito)
Generalized Fisher
Nonlinear heat conduction
Gen. combined KdV-mKdV
Boussinesq
KdV
KdV-Zakharov-Kuznetsov
mKdV-Zakharov-Kuznetsov
3D-mKdV
Gen. Kuramoto-Sivashinsky
Fisher
FitzHugh-Nagumo
Combined KdV-mKdV
Duffing
PDESpecialSolutions.m
CPU time
# sols.
0.125s
2
0.390s
8
–
0
0.438s
4
10.469s
4
0.406s
4
–
0
–
0
0.218s
1
0.125s
1
0.469s
1
0.282s
2
0.078s
2
0.734s
16
0.234s
8
0.719s
12
0.204s
2
0.094s
4
RATH
CPU time #
0.328s
25.641s
6.265s
1.000s
5.531s
0.469s
0.485s
2.062s
0.142s
0.126s
0.142s
0.642s
1.874s
1.453s
0.343s
–
0.251s
–
sols.
1
7
2
4
4
2
2
2
1
1
1
4
2
8
4
0
2
0
Ref.
(2.3)
(4.1)
(4.7)
(4.11)
(4.13)
(5.1)
(5.3)
(5.5)
(4)
(48)
(78)
(81)
(87)
(89)
(99)
(101)
(109)
(114)
Table 3: Comparison between codes PDESpecialSolutions.m and RATH. Test runs performed
on a Dell Dimension 8200 PC, with 2.40 GHz Pentium 4 processor, 512 MB of RAM, with
Mathematica v. 4.1 and Maple v. 7.0. The first 8 equations appear in Li and Liu (2002); the
last 10 equations are listed in this paper.
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
33
function method for single PDEs. This package seeks solutions of the form (144).
The codes RATH and AJFM use the Ritt-Wu characteristic sets method, implemented by Wang (2001ab). The CharSets package, available in Maple (Wang,
2002), is more versatile and powerful than our algorithm in Section 6.2.
Lastly, Abbott et al. (2002) designed a Mathematica notebook with key functions for the computation of polynomial solutions in sn and cn .
There are several symbolic tools for reducing and solving parameterized nonlinear algebraic systems. Some are part of codes to simplify overdetermined ODE
and PDE systems. For example, the Maple package Rif by Wittkopf and Reid
(2003) allows for the computation of solution branches of nonlinear algebraic
systems. The most powerful algebraic solvers use some flavor of the Gröbner basis algorithm. For up-to-date information on developments in this area we refer
to Grabmeier et al. (2003).
9. Discussion and Conclusions
We presented several straightforward algorithms to compute special solutions of
nonlinear PDEs, without using explicit integration. We designed the symbolic
package PDESpecialSolutions.m to find solitary wave solutions of nonlinear
PDEs involving tanh, sech, cn and sn functions.
While the software reproduces the known (and also a few presumably new) solutions for many equations, there is no guarantee that the code will compute the
complete solution set of all polynomial solutions involving the tanh and/or sech
functions, especially when the PDEs have parameters. This is due to restrictions
on the form of the solutions and the limitations of the algebraic solver.
There is so much freedom in mixed tanh-sech solutions that the current code
is limited to quadratic solutions.
Furthermore, the nonlinear constraints which arise in solving the nonlinear
algebraic system may be quintic or of higher degree, and therefore unsolvable in
analytic form. Also, since our software package is fully automated, it may not
return the solutions in the simplest form.
The example in Section 7.8 illustrates this situation. By not solving quadratic
or cubic equations explicitly the solutions (computed interactively with Mathematica) can be presented in a more compact and readable form.
In an attempt to avoid the explicit use of Mathematica’s Solve and Reduce
functions, we considered various alternatives. For example, we used (i) variants of
Gröbner bases on the complete system, and (ii) combinatorics on the coefficients
in the polynomial solutions (setting aij = 0 or aij 6= 0, for the admissible i and
j). None of these alternatives paid off for systems with parameters.
Often, the nonlinear solver returns constraints on the wave parameters cj
and the external parameters. In principle, one should verify whether or not such
constraints affect the results of the previous steps in the algorithm. In particular,
one should verify the consistency with the results from step 2 of the algorithms.
We have not yet implemented this type of sophistication.
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
34
Acknowledgements
This material is based upon work supported by the National Science Foundation (NSF) under Grants Nos. DMS-9732069, DMS-9912293 and CCR-9901929.
Any opinions, findings, and conclusions or recommendations expressed in this
material are those of the authors and do not necessarily reflect the views of NSF.
WH thankfully acknowledges the hospitality and support of the Department of
Applied Mathematics of the University of Stellenbosch, South Africa, during his
sabbatical visit in Spring 2001. Part of the work was done at Wolfram Research,
Inc., while WH was supported by a Visiting Scholar Grant in Fall 2000.
M. Hickman is thanked for his help with Maple. E. Parkes and B. Duffy are
thanked for sharing their code ATFM. P. Abbott is thanked for sharing his
Mathematica notebooks and testing earlier versions of our code. Z.-B. Li and
Y.-P. Liu are thanked for providing us with the codes RATH and AJFM.
The authors are grateful to B. Deconinck, B. Herbst, P.G.L. Leach, W. Malfliet,
J. Sanders, and F. Verheest for valuable comments. Last but not least, students
S. Nicodemus, P. Blanchard, J. Blevins, S. Formaneck, J. Heath, B. Kowalski,
A. Menz, J. Milwid, and M. Porter-Peden are thanked for their help with the
project.
References
[1] Ablowitz, M.J., Clarkson, P.A. (1991). Solitons, Nonlinear Evolution Equations and Inverse Scattering. Cambridge (U.K.): Cambridge University
Press.
[2] Abbott P.C., Parkes, E.J., Duffy, B.R. (2002). The Jacobi ellipticfunction method for finding periodic-wave solutions to nonlinear evolution equations. Notebook with Mathematica implementation of the
Jacobi elliptic function method. Available at http://physics.uwa.edu.au
/pub/Mathematica/Solitons/.
[3] Baldwin, D., Göktaş, Ü., Hereman, W., Hong, L., Martino, R.S., Miller,
J.C. (2001). PDESpecialSolutions.m: A Mathematica program for the symbolic computation of exact solutions expressible in hyperbolic and elliptic
functions for nonlinear PDEs. Available at URL: http://www.mines.edu
/fs home/whereman/.
[4] Cantwell, B.J. (2002). Introduction to Symmetry Analysis. Cambridge Texts
in Applied Mathematics. Cambridge (U.K.): Cambridge University Press.
[5] Cheb-Terrab, E.S. (2001a). PDETools Project. Center for Experimental
and Constructive Mathematics, Simon Fraser University, Vancouver, British
Columbia, Canada. See: http://lie.uwaterloo.ca/pdetools.m.
[6] Cheb-Terrab, E.S. (2001b). A computational approach for the analytical
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
35
solving of systems of partial differential equations. Preprint. Submitted to:
Comp. Phys. Comm..
[7] Cheb-Terrab, E.S., von Bülow, K. (1995). A computational approach for the
analytical solving of systems of partial differential equations, Comp. Phys.
Comm. 90, 102–116.
[8] Chen, H.T., Zhang, H.Q. (2003a). Improved Jacobin elliptic function
method and its applications, Chaos, Solitons and Fractals 15, 585–591.
[9] Chen, H.T., Zhang, H.Q. (2003b). An algebraic method for finding soliton
and periodic solutions of nonlinear evolution equations. Preprint. Submitted
to: Comp. Phys. Comm..
[10] Das, G.C., Sarma, J. (1999). Response to “Comment on ‘A new mathematical approach for finding the solitary waves in dusty plasmas’” [Phys.
Plasmas 6, 4393 (1999), Phys. Plasmas 6, 4394-4397.
[11] Das, K.P., Verheest, F. (1989). Ion-acoustic solitons in magnetized multicomponent plasmas including negative ions, J. Plasma Phys. 41, 139-155.
[12] Drazin, P.G., Johnson, R.S. (1989). Solitons: An Introduction. Cambridge
Texts in Appl. Maths. Cambridge (U.K.): Cambridge University Press.
[13] Estévez, P.G., Gordoa, P.R. (1995). Non-classical symmetries and the singular manifold method: Theory and six Examples, Stud. Appl. Math. 95,
73-113.
[14] Estévez, P.G., Gordoa, P.R. (1998). Non-classical symmetries and the singular manifold method: a further two examples, J. Phys. A: Math. Gen. 31,
7511-7519.
[15] Fan, E. (2002a). Travelling wave solutions for nonlinear evolution equations
using symbolic computation, Comp. Math. Appl. 43, 671–680.
[16] Fan, E. (2002b). Multiple travelling wave solutions of nonlinear evolution
equations using a unified algebraic method, J. Phys. A.: Math. Gen. 35
6853–6872.
[17] Fan, E. (2002c). A new algebraic method for finding series of travelling wave
solutions to a coupled Ito system, J. Phys. Soc. Jpn. 71, 2663–2668.
[18] Fan, E. (2003a). A new algebraic method for finding the line soliton solutions
and doubly periodic wave solution to a two-dimensional perturbed KdV
equation, Chaos, Solitons and Fractals 15, 567–574.
[19] Fan, E. (2003b). An algebraic method for finding a series of exact solutions
to integrable and nonintegrable nonlinear evolution equations, J. Phys. A:
Math. Gen. 36, 7009-7026.
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
36
[20] Fan, E. (2003c). Uniformly constructing a series of explicit exact solutions to
nonlinear equations in mathematical physics, Chaos, Solitons and Fractals
16, 819–839.
[21] Fan, E., Dai, H.H. (2003). A direct approach with computerized symbolic
computation for finding a series of traveling waves to nonlinear equations,
Comp. Phys. Comm. 153, 17–30.
[22] Fan, E., Hon, Y.C. (2002). An algebraic method with computerized symbolic
computation and new families of travelling wave solutions for the HirotaSatsuma coupled KdV equation, Nuovo Cimento B 117, 659–669.
[23] Fan, E., Hon, Y.C. (2003a). A series of travelling wave solutions for two
variant Boussinesq equations in shallow water waves, Chaos, Solitons and
Fractals 15, 559–566.
[24] Fan, E., Hon, Y.C. (2003b). Applications of extended tanh method to ‘special’ types of nonlinear equations, Appl. Math. Comp. 141, 351–358.
[25] Fan, E., Zhang, H. (2002). Applications of the Jacobi elliptic function
method to special-type nonlinear equations, Phys. Lett. A 305, 383–392.
[26] Fu, Z., Liu, S., Liu, S. and Zhao, Q. (2001). New Jacobi elliptic function
expansion and new periodic solutions of nonlinear wave equations, Phys.
Lett. A 290, 72–76.
[27] Gao, Y.T., Tian, B. (2001). Generalized hyperbolic-function method with
computerized symbolic computation to construct the solitonic solutions to
nonlinear equations of mathematical physics, Comp. Phys. Comm. 133,
158–164.
[28] Göktaş, Ü., Hereman, W. (1997). Symbolic computation of conserved densities for systems of nonlinear evolution equations, J. Symb. Comp. 24,
591–621.
[29] Grabmeier, J., Kaltofen E., Weispfenning V., eds. (2003). Computer Algebra
Handbook: Foundations, Applications, Systems. Berlin: Springer Verlag.
[30] Guha-Roy, C. (1987). Solitary wave solutions of a system of coupled nonlinear equations, J. Math. Phys. 28, 2087–2088.
[31] Helal, M.A. (2002). Soliton solution of some nonlinear partial differential
equations and its applications in fluid mechanics, Chaos, Solitons and Fractals 13, 1917–1929.
[32] Hereman, W. (1990). Application of a Macsyma program for the Painlevé
test to the Fitzhugh-Nagumo equation, in: Partially Integrable Evolution
Equations in Physics, Proc. Winter School Theoretical Physics, (R. Conte,
N. Boccara, eds.) Dordrecht: Kluwer Academic Publishers, pp. 585–586.
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
37
[33] Hereman, W. (1991). Exact solitary wave solutions of coupled nonlinear
evolution equations using MACSYMA, Comp. Phys. Comm. 65, 143–150.
[34] Hereman, W. (1996). Symbolic Software for Lie Symmetry Analysis. CRC
Handbook of Lie Group Analysis of Differential Equations, Volume 3: New
Trends in Theoretical Developments and Computational Methods. Chapter
13 (N.H. Ibragimov, ed.) Boca Raton, Florida: CRC Press, pp. 367–413.
[35] Hereman, W., Takaoka, M. (1990). Solitary wave solutions of nonlinear evolution and wave equations using Macsyma, J. Phys. A: Math. Gen. 23,
4805-4822.
[36] Hon, Y.C., Fan, E. (2004a). A series of new exact solutions for a complex
coupled KdV system Chaos, Solitons and Fractals 19, 515–525.
[37] Hon, Y.C., Fan, E. (2004b). Solitary wave and doubly periodic wave solutions for the Kersten-Krasil’shchik coupled KdV-mKdV system Chaos,
Solitons and Fractals 19, 1141–1146.
[38] Hydon, P.E. (2000). Symmetry Methods for Differential Equations. Cambridge Texts in Applied Mathematics. Cambridge (U.K.): Cambridge University Press.
[39] Kichenassamy, S., Olver, P. (1993). Existence and non-existence of solitary
wave solutions to higher order model evolution equations, SIAM J. Math.
Anal. 23, 1141–1166.
[40] Lawden, D.F. (1989). Elliptic Functions and Applications. Appl. Math. Sciences 80. New York: Springer Verlag.
[41] Li, Z.-B., Liu, Y.-P. (2002). RATH: A Maple package for finding travelling solitary wave solutions to nonlinear evolution equations, Comp. Phys.
Comm. 148, 256–266.
[42] Liu, Y.-P., Li, Z.-B. (2002a). An automated Jacobi elliptic function method
for finding periodic wave solutions to nonlinear evolution equations, Chinese
Phys. Lett. 19, 1228–1230.
[43] Liu, Y.-P., Li, Z.-B. (2002b). The link between the hyperbolic tangent function method and Jacobi elliptic function method. Preprint. Submitted to
Phys. Lett. A.
[44] Malfliet, W. (1992). Solitary wave solutions of nonlinear wave equations,
Am. J. Phys. 60, 650–654.
[45] Malfliet, W. (2004). The tanh method: a tool for solving certain classes of
nonlinear evolution and wave equations, J. Comp. Appl. Math. ??, ???–???.
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
38
[46] Malfliet, W., Hereman W. (1996). The tanh method: I. Exact solutions of
nonlinear evolution and wave equations, Phys. Scripta 54, 563–568.
[47] Parkes, E.J., Duffy, B.R. (1996). An automated tanh-function method for
finding solitary wave solutions to non-linear evolution equations, Comp.
Phys. Comm. 98, 288–300.
[48] Parkes, E.J., Duffy, B.R. and Abbott, P.C. (2002). The Jacobi ellipticfunction method for finding periodic-wave solutions to nonlinear evolution
equations. Phys. Lett. A 295, 280–286.
[49] Parkes, E.J, Zhu, Z., Duffy, B.R., Huang, H.C. (1998). Sech-polynomial
travelling solitary-wave solutions of odd-order generalized KdV equations,
Phys. Lett. A 248, 219–224.
[50] Sirendaoreji, S.J. (2003). Auxiliary equation method for solving nonlinear
partial differential equations, Phys. Lett. A 309, 387–396.
[51] Sirendaoreji, S.J. (2004). New exact travelling wave solutions for the Kawahara and modified Kawahara equations, Chaos, Solitons and Fractals 19,
147–150.
[52] Wang, D. (2001a). Elimination Methods. New York: Springer Verlag.
[53] Wang, D. (2001b). A generalized algorithm for computing characteristic
sets, in: Computer Mathematics, Proc. 5th Asian Symp. (ASCM 2001), (K.
Shirayanagi, K. Yokoyama, eds.), Singapore: World Scientific, pp. 165–174.
[54] Wang, D. (2002). CharSets 2.0 – A package for decomposing (differential)
polynomial systems. Available at: http://calfor.lip6.fr/∼wang/.
[55] Wittkopf, A., Reid, G. (2003). Introduction to the Rif Package Version 1.1.
See: http://www.cecm.sfu.ca/∼wittkopf/Rif.html.
[56] Yan, Z. (2003). The extended Jacobian elliptic function expansion method
and its applications in the generalized Hirota-Satsuma coupled KdV system,
Chaos, Solitons and Fractals 15, 575–583.
[57] Yang, Z.J. (1994). Traveling-wave solutions to nonlinear evolution and wave
equations, J. Phys. A: Math. Gen. 27, 2837–2856.
[58] Yao, R.-X., Li, Z.-B. (2002a). New exact solutions for three nonlinear evolution equations, Phys. Lett. A 297, 196–204.
[59] Yao, R.-X., Li, Z.-B. (2002b). New solitary wave solutions for nonlinear
evolution equations, Chinese Phys. Lett. 11, 864–867.
[60] Zheng, X.-D., Xia, T.-C., Zhang, H.-Q. (2002). New exact traveling wave
solutions for compound KdV-Burgers equations in mathematical physics,
Appl. Maths. E-Notes 2, 45–50.
D. Baldwin et al.: Symbolic computation of Tanh, Sech, Cn, and Sn Solutions
39
Appendix A: Using the software package
We illustrate the use of the package PDESpecialSolutions.m on a PC. Users
should have access to Mathematica v. 3.0 or higher.
Put the package in a directory, say myDirectory, on drive C. Start a Mathematica notebook session and execute the commands:
In[1] = SetDirectory["c:\\myDirectory"];
(* specify directory *)
In[2] = <<PDESpecialSolutions.m
(* read in package
*)
In[3] = PDESpecialSolutions[
{D[u[x,t],t]-alpha*(6*u[x,t]*D[u[x,t],x]+D[u[x,t],{x,3}])+
2*beta*v[x,t]*D[v[x,t],x] == 0,
D[v[x,t],t]+3*u[x,t]*D[v[x,t],x]+D[v[x,t],{x,3}] == 0},
{u[x,t],v[x,t]}, {x,t}, {alpha, beta}, Form -> Sech,
Verbose -> True, InputForm -> False, NumericTest -> True,
SymbolicTest -> True, SolveAlgebraicSystem -> True
(*, DegreeOfThePolynomial -> {m[1] -> 2, m[2] -> 1} *)];
The package will compute the sech solutions (37) and (38) of the coupled KdV
equation (22).
If the DegreeOfThePolynomial → {m[1] → 2, m[2] → 1} were specified, the
code would continue with this case only and compute (37).
If SolveAlgebraicSystem → False, the algebraic system will be generated
but not automatically solved.
The format of PDESpecialSolutions is similar to the Mathematica function
DSolve. The output is a list of sub-lists with solutions and constraints. The
Backus-Naur Form of the function is:
hM ain F unctioni → PDESpecialSolutions[hEquationsi, hF unctionsi,
hV ariablesi, hP arametersi, hOptionsi]
hOptionsi → Form → hF ormi | Verbose → hBooli |
InputForm → hBooli |
DegreeOfThePolynomial → hList of Rulesi |
SolveAlgebraicSystem → hBooli |
NumericTest → hBooli | SymbolicTest → hBooli
hF ormi → Tanh | Sech | SechTanh | JacobiCN | JacobiSN
hBooli → True | False
hList of Rulesi → {m[1] → Integer, m[2] → Integer, ...}
The default value of Form is Tanh. The package PDESpecialSolutions.m has
been tested on both UNIX work stations and PCs with Mathematica versions
3.0, 4.0 and 4.1. A test set of over 50 PDEs and half a dozen ODEs was used.
Download