PDEtools - Maple Programming Help

Home : Support : Online Help : Mathematics : Differential Equations : PDEtools : PDEtools/TWSolutions

PDEtools

 TWSolutions
 compute Traveling Wave Solutions for autonomous nonlinear partial differential equations (PDEs) and systems of them

 Calling Sequence TWSolutions(PDEsys) TWSolutions(PDEsys, vars, function=..., output=ODE, extended, rank_parameters_lower, remove_redundant=..., other_opts) TWSolutions(functions_allowed)

Parameters

 PDEsys - a set or list with autonomous nonlinear partial differential equations vars - (optional) the unknown function(s) of the system, could be a ranking (see pdsolve,system) function = ... - (optional) either a mathematical function name on the rhs, or a set or list of them; these functions are used as basis for a power series solution output = ODE - (optional) to return the ODE equivalent to the PDE system and the transformation, instead of solving the PDE system extended - (optional) after transforming the PDE system into an ODE system, instead of computing a power series solution to the ODEs, compute their general solution rank_parameters_lower - (optional) parameters declared as such using the option parameters=... are ranked lower than other solving variables of the problem other_opts - any of the optional arguments accepted by casesplit; typically: parameters={p1,p2,...}, singsol=false functions_allowed - single argument, to see what are the functions allowed as basis for constructing power series solutions

Description

 • The TWSolutions command computes Traveling Wave Solutions (TWS) for autonomous partial differential equations (PDE) that are rational and nonlinear in the unknowns and their derivatives. An autonomous system is one where the independent variables do not appear explicitly, only through the unknown functions and their derivatives.
 • A TWS is an exact, closed-form solution, expressed as a finite power series of one of a particular set of functions (default is the hyperbolic tangent, tanh) that has a linear combination of the independent variables as arguments. Concretely, given such an autonomous PDE system with $i$ unknown functions ${f}_{i}\left({x}_{1},\mathrm{...},{x}_{j}\right)$ of $j$ variables, by default TWSolutions computes solutions of the form
 > f[i](tau) = Sum(A[i,k]*tau^k, k=0..n[i]);
 ${f}{[}{i}{]}{}\left({\mathrm{τ}}\right){=}{\sum }_{{k}{=}{0}}^{{{n}}_{{i}}}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}{{A}}_{{i}{,}{k}}{}{{\mathrm{τ}}}^{{k}}$ (1)
 where the ${n}_{i}$ are finite, the ${A}_{i,k}$ are constants with respect to the ${x}_{j}$ and
 > tau = tanh(Sum(C[k]*x[k], k=0..j));
 ${\mathrm{τ}}{=}{\mathrm{tanh}}{}\left({\sum }_{{k}{=}{0}}^{{j}}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}{{C}}_{{k}}{}{{x}}_{{k}}\right)$ (2)
 where the ${C}_{k}$ are constants with respect to the ${x}_{j}$.
 • The first argument given to TWSolutions, PDEsys, is a set or list containing one or more autonomous PDEs. The unknowns of the system can be specified anywhere after the first argument, as a set or list of functions - or function names - or as a ranking (see pdsolve,system). If the unknowns of the problem are not specified, only the differentiated unknown functions found in the PDE system are taken as the unknowns.
 • The mathematical function used to construct the TWS, when not specified, is tanh. To specify a different function, or a list of them to construct different types of solutions at once, use the functions = ... optional argument, where the right-hand side can be the name of a mathematical function or a set or list of them. The possible mathematical functions are: exp, ln, the trigonometric functions sin, cos, tan, csc, sec, cot, the hyperbolic versions of them, JacobiSN, JacobiCN, JacobiDN, JacobiNS, JacobiNC, JacobiND, the corresponding InverseJacobi functions, and the WeierstrassP function.
 • It is also possible to choose the identity as the "mathematical function" to be used, in which case, instead of a power series of a function of a linear combination of the independent variables, the TWS is constructed as a power series of the linear combination itself, resulting in a polynomial solution to the PDE system.
 • In some cases, or to perform further analysis and intermediate manipulations, it is useful to compute not the actual solution to the problem posed but just the ODE system equivalent to the given PDE system and the transformation mapping each other. To obtain this type of output use the optional argument output = ODE.
 • As explained in the previous paragraphs, once the function with which the solution will be constructed is determined, either by default (tanh) or by choice (using the optional argument function = ...), the "TWS" solution is constructed as a power series in that function. This is done by computing the polynomial solutions to the nonlinear ODE system equivalent to the given PDE system. However, a more interesting solution for the PDE system can sometimes be obtained by computing not just polynomial solutions to the nonlinear ODE system but by computing its general solution. To request TWSolutions to attempt this type of solution use the optional argument extended.
 • The solving process essentially transforms the given PDE system and related unknowns (functions) and parameters (there may be many, represented by symbol variables, indicated with the optional argument parameters = ...) into an nonlinear algebraic system in these unknowns, parameters, and unknown coefficients of the finite series expansion. To solve that system, an ordering or ranking for these solving variables (unknowns, parameters and coefficients) is chosen. This ordering mixes the three groups of solving variables according to convenience regarding different aspects, resulting into a sequence of solutions organized according to the ranking used. In some cases, however, a sequence of solutions organized according to the different cases for the parameters is preferred - for that purpose use the optional argument rank_parameters_lower; see the examples.
 • By default, TWSolutions discards constant solutions that are redundant before producing the output. If the optional argument remove_redundant = false is used, no attempt to remove redundant solutions is done. This is of use when any particular solution suffices because it avoids the costly process of removing redundant solutions, which requires running additional differential elimination processes. Alternatively, when the optional argument remove_redundant = true is given, all redundant solutions, even those that are non-constant are removed. Depending on the PDE system, this process may consume from several seconds to minutes.
 • All the optional arguments accepted by PDEtools,casesplit are accepted by TWSolutions. Of special interest is parameters={p1,p2, ...}, specifying a set of constant parameters that should also be considered solving variables. The solution then splits into cases with respect to these parameters through a differential elimination process (see casesplit, DifferentialAlgebra and DEtools,Rif). All constant parameters present in the system and not specified using this option are considered arbitrary.
 • Another optional argument of PDEtools,casesplit relevant when using TWSolutions is singsol=false. Its use avoids computing the singular cases with respect to the coefficients $\left\{{A}_{i,k},{C}_{j}\right\}$ when running the differential elimination processes required to solve the problem. Depending on the PDE system, the computation of the singular cases may consume more time than the computation of the general solution. To compute TWS the fastest way (so regardless of receiving redundant constant solutions and ignoring the singular cases), use the combination of optional arguments remove_redundant = false, singsol = false.

The solving process

 • By default, TWSolutions solves a given system in five steps
 1. The autonomous PDE system is transformed into a nonlinear ODE system by introducing $\mathrm{\tau }$ (see above) as new variable, implying
 > Diff(f[i],x[j]) = C[j]*(1-tau^2)*Diff(f[i],tau);
 $\frac{{\partial }}{{\partial }{{x}}_{{j}}}{}{{f}}_{{i}}{=}{{C}}_{{j}}{}\left({-}{{\mathrm{τ}}}^{{2}}{+}{1}\right){}\left(\frac{{\partial }}{{\partial }{\mathrm{τ}}}{}{{f}}_{{i}}\right)$ (3)
 for all ${x}_{j}$. The resulting ODE system, polynomial in ${f}_{i}\left(\mathrm{\tau }\right)$ and its derivatives, has all the coefficients polynomial in $\mathrm{\tau }$ and the unknowns ${C}_{j}$.
 2. To search for solutions ${f}_{i}={\sum }_{k=0}^{{n}_{i}}{A}_{i,k}{\mathrm{\tau }}^{k}$ for that ODE system, an upper bound ${n}_{i}$ for each unknown ${f}_{i}$ is computed. This is done by substituting ${f}_{i}={\mathrm{\tau }}^{{n}_{i}}$ in the system and assuring that the two terms with the highest powers of $\mathrm{\tau }$ in each equation have the same degree. That is the so-called balancing of the highest degree terms and leads to a linear system for the ${n}_{i}$.
 3. The complete finite expansion in $\mathrm{\tau }$ for each ${f}_{i}$, containing the unknowns ${A}_{i,k}$, is introduced in the ODE system obtained in step 1, and, by taking coefficients of different powers of $\mathrm{\tau }$, a new algebraic nonlinear system for the expansion coefficients $\left\{{A}_{i,k},{C}_{j}\right\}$ is built.
 4. An elimination process splitting into cases is run through PDEtools,casesplit, which in turn uses DEtools,Rif by default, or DifferentialAlgebra if the optional keyword diffalg is present somewhere in the calling sequence. The ranking used leads to solutions for the ${A}_{i,k}$ in terms of the ${C}_{j}$ plus, perhaps, additional restrictions on the ${C}_{j}$.
 5. By default, constant solutions that are redundant are removed.
 • It is implicit in this itemized description that some of the TWSolutions subroutines can be used to directly compute polynomial solutions for nonlinear ODE systems; that functionality is provided through the DEtools[polysols] command. TWSolutions is also used by pdsolve by default when solving a single PDE, but not by default with PDE systems, in which case it can be used by means of optional arguments - see the HINT option described in pdsolve,system.
 • Valuable information on each of the steps of the solving process is available at run time through the userinfo mechanism. Setting infolevel[TWSolutions] := 2, or any number from 1 to 5 to display less or more information, it is possible to see the ODE system equivalent to the given PDE system, the upper bounds computed, the solutions obtained for the $\left\{{A}_{i,k},{C}_{j}\right\}$ through differential elimination, and the redundant solutions discarded.

Examples

Load TWSolutions and also the DEtools[diff_table] and the PDEtools[declare] facilities to work with simpler input and enhanced display of equations.

 > $\mathrm{with}\left(\mathrm{PDEtools},\mathrm{TWSolutions},\mathrm{declare}\right)$
 $\left[{\mathrm{TWSolutions}}{,}{\mathrm{declare}}\right]$ (4)
 > $\mathrm{with}\left(\mathrm{DEtools},\mathrm{diff_table}\right)$
 $\left[{\mathrm{diff_table}}\right]$ (5)

Use $U$ as the differentiation table for the function $u\left(x,t\right)$.

 > $U≔\mathrm{diff_table}\left(u\left(x,t\right)\right):$

Consider the Korteweg - de Vries (KdV) Burger's equation that occurs in various physical systems. (Note the simpler input in jet notation as a result of using the diff_table command.)

 > $\mathrm{sys}≔\left\{{U}_{t}+{U}_{[]}{U}_{x}-p{U}_{x,x}+q{U}_{x,x,x}=0\right\}$
 ${\mathrm{sys}}{≔}\left\{{-}{p}{}\left(\frac{{{\partial }}^{{2}}}{{\partial }{{x}}^{{2}}}{}{u}{}\left({x}{,}{t}\right)\right){+}{q}{}\left(\frac{{{\partial }}^{{3}}}{{\partial }{{x}}^{{3}}}{}{u}{}\left({x}{,}{t}\right)\right){+}{u}{}\left({x}{,}{t}\right){}\left(\frac{{\partial }}{{\partial }{x}}{}{u}{}\left({x}{,}{t}\right)\right){+}\frac{{\partial }}{{\partial }{t}}{}{u}{}\left({x}{,}{t}\right){=}{0}\right\}$ (6)

Three traveling wave solutions (TWS) are as follows.

 > $\mathrm{TWS_sol}≔\mathrm{TWSolutions}\left(\mathrm{sys}\right)$
 ${\mathrm{TWS_sol}}{≔}\left\{{u}{}\left({x}{,}{t}\right){=}{\mathrm{_C4}}\right\}{,}\left\{{u}{}\left({x}{,}{t}\right){=}{-}\frac{{3}}{{25}}{}\frac{{{p}}^{{2}}{}{{\mathrm{tanh}}{}\left({\mathrm{_C3}}{}{t}{-}\frac{{1}}{{10}}{}\frac{{p}{}{x}}{{q}}{+}{\mathrm{_C1}}\right)}^{{2}}}{{q}}{+}\frac{{6}}{{25}}{}\frac{{{p}}^{{2}}{}{\mathrm{tanh}}{}\left({\mathrm{_C3}}{}{t}{-}\frac{{1}}{{10}}{}\frac{{p}{}{x}}{{q}}{+}{\mathrm{_C1}}\right)}{{q}}{+}\frac{{1}}{{25}}{}\frac{{250}{}{\mathrm{_C3}}{}{{q}}^{{2}}{+}{3}{}{{p}}^{{3}}}{{q}{}{p}}\right\}{,}\left\{{u}{}\left({x}{,}{t}\right){=}{-}\frac{{3}}{{25}}{}\frac{{{p}}^{{2}}{}{{\mathrm{tanh}}{}\left({\mathrm{_C3}}{}{t}{+}\frac{{1}}{{10}}{}\frac{{p}{}{x}}{{q}}{+}{\mathrm{_C1}}\right)}^{{2}}}{{q}}{-}\frac{{6}}{{25}}{}\frac{{{p}}^{{2}}{}{\mathrm{tanh}}{}\left({\mathrm{_C3}}{}{t}{+}\frac{{1}}{{10}}{}\frac{{p}{}{x}}{{q}}{+}{\mathrm{_C1}}\right)}{{q}}{+}\frac{{1}}{{25}}{}\frac{{-}{250}{}{\mathrm{_C3}}{}{{q}}^{{2}}{+}{3}{}{{p}}^{{3}}}{{q}{}{p}}\right\}$ (7)

Solutions can be tested as usual using pdetest.

 > $\mathrm{map}\left(\mathrm{pdetest},\left[\mathrm{TWS_sol}\right],\mathrm{sys}\right)$
 $\left[\left\{{0}\right\}{,}\left\{{0}\right\}{,}\left\{{0}\right\}\right]$ (8)

Let's consider the same problem but taking $\left\{p,q\right\}$ as parameters, so splitting into cases with respect to them; five TWS result. To illustrate the userinfo mechanism set

 > ${\mathrm{infolevel}}_{\mathrm{TWSolutions}}≔2$
 ${{\mathrm{infolevel}}}_{{\mathrm{PDEtools:-TWSolutions}}}{≔}{2}$ (9)
 > $\left\{\mathrm{TWSolutions}\left(\mathrm{sys},\mathrm{parameters}=\left\{p,q\right\}\right)\right\}$
 * Using tau = tanh(t*C[2]+x*C[1]+C[0]) * Equivalent ODE system: {-q*C[1]^3*(tau^2-1)*(tau^4-2*tau^2+1)*diff(diff(diff(u(tau),tau),tau),tau)+(-p*C[1]^2*(tau^2-1)^2-q*C[1]^3*(tau^2-1)*(6*tau^3-6*tau))*diff(diff(u(tau),tau),tau)+(-2*p*C[1]^2*(tau^2-1)*tau-q*C[1]^3*(tau^2-1)*(6*tau^2-2)-u(tau)*C[1]*(tau^2-1)-C[2]*(tau^2-1))*diff(u(tau),tau)} * Ordering for functions: [u(tau)] * Cases for the upper bounds: [[n[1] = 2]] * Power series solution [1]: {u(tau) = tau^2*A[1,2]+tau*A[1,1]+A[1,0]}, splitting into cases with respect to the parameters {p, q}
 $\left\{\left\{{p}{=}{0}{,}{q}{=}{q}{,}{u}{}\left({x}{,}{t}\right){=}{-}{12}{}{{\mathrm{_C2}}}^{{2}}{}{q}{}{{\mathrm{tanh}}{}\left({\mathrm{_C2}}{}{x}{+}{\mathrm{_C3}}{}{t}{+}{\mathrm{_C1}}\right)}^{{2}}{+}\frac{{8}{}{{\mathrm{_C2}}}^{{3}}{}{q}{-}{\mathrm{_C3}}}{{\mathrm{_C2}}}\right\}{,}\left\{{p}{=}{p}{,}{q}{=}{0}{,}{u}{}\left({x}{,}{t}\right){=}{-}{2}{}{\mathrm{_C2}}{}{p}{}{\mathrm{tanh}}{}\left({\mathrm{_C2}}{}{x}{+}{\mathrm{_C3}}{}{t}{+}{\mathrm{_C1}}\right){-}\frac{{\mathrm{_C3}}}{{\mathrm{_C2}}}\right\}{,}\left\{{p}{=}{p}{,}{q}{=}{q}{,}{u}{}\left({x}{,}{t}\right){=}{\mathrm{_C4}}\right\}{,}\left\{{p}{=}{p}{,}{q}{=}{q}{,}{u}{}\left({x}{,}{t}\right){=}{-}\frac{{3}}{{25}}{}\frac{{{p}}^{{2}}{}{{\mathrm{tanh}}{}\left({\mathrm{_C3}}{}{t}{-}\frac{{1}}{{10}}{}\frac{{p}{}{x}}{{q}}{+}{\mathrm{_C1}}\right)}^{{2}}}{{q}}{+}\frac{{6}}{{25}}{}\frac{{{p}}^{{2}}{}{\mathrm{tanh}}{}\left({\mathrm{_C3}}{}{t}{-}\frac{{1}}{{10}}{}\frac{{p}{}{x}}{{q}}{+}{\mathrm{_C1}}\right)}{{q}}{+}\frac{{1}}{{25}}{}\frac{{250}{}{\mathrm{_C3}}{}{{q}}^{{2}}{+}{3}{}{{p}}^{{3}}}{{q}{}{p}}\right\}{,}\left\{{p}{=}{p}{,}{q}{=}{q}{,}{u}{}\left({x}{,}{t}\right){=}{-}\frac{{3}}{{25}}{}\frac{{{p}}^{{2}}{}{{\mathrm{tanh}}{}\left({\mathrm{_C3}}{}{t}{+}\frac{{1}}{{10}}{}\frac{{p}{}{x}}{{q}}{+}{\mathrm{_C1}}\right)}^{{2}}}{{q}}{-}\frac{{6}}{{25}}{}\frac{{{p}}^{{2}}{}{\mathrm{tanh}}{}\left({\mathrm{_C3}}{}{t}{+}\frac{{1}}{{10}}{}\frac{{p}{}{x}}{{q}}{+}{\mathrm{_C1}}\right)}{{q}}{+}\frac{{1}}{{25}}{}\frac{{-}{250}{}{\mathrm{_C3}}{}{{q}}^{{2}}{+}{3}{}{{p}}^{{3}}}{{q}{}{p}}\right\}\right\}$ (10)

Among the five solutions above, three were obtained considering the singular cases of the system with respect to the expansion coefficients $\left\{{A}_{i,k},{C}_{j}\right\}$ (see The solving process above). To compute without displaying information, use infolevel[TWSolutions] := 0. To compute more quickly, find only the non-singular solutions using

 > ${\mathrm{infolevel}}_{\mathrm{TWSolutions}}≔0:$
 > $\left\{\mathrm{TWSolutions}\left(\mathrm{sys},\mathrm{parameters}=\left\{p,q\right\},\mathrm{singsol}=\mathrm{false}\right)\right\}$
 $\left\{\left\{{p}{=}{p}{,}{q}{=}{q}{,}{u}{}\left({x}{,}{t}\right){=}{-}\frac{{3}}{{25}}{}\frac{{{p}}^{{2}}{}{{\mathrm{tanh}}{}\left({\mathrm{_C3}}{}{t}{-}\frac{{1}}{{10}}{}\frac{{p}{}{x}}{{q}}{+}{\mathrm{_C1}}\right)}^{{2}}}{{q}}{+}\frac{{6}}{{25}}{}\frac{{{p}}^{{2}}{}{\mathrm{tanh}}{}\left({\mathrm{_C3}}{}{t}{-}\frac{{1}}{{10}}{}\frac{{p}{}{x}}{{q}}{+}{\mathrm{_C1}}\right)}{{q}}{+}\frac{{1}}{{25}}{}\frac{{250}{}{\mathrm{_C3}}{}{{q}}^{{2}}{+}{3}{}{{p}}^{{3}}}{{q}{}{p}}\right\}{,}\left\{{p}{=}{p}{,}{q}{=}{q}{,}{u}{}\left({x}{,}{t}\right){=}{-}\frac{{3}}{{25}}{}\frac{{{p}}^{{2}}{}{{\mathrm{tanh}}{}\left({\mathrm{_C3}}{}{t}{+}\frac{{1}}{{10}}{}\frac{{p}{}{x}}{{q}}{+}{\mathrm{_C1}}\right)}^{{2}}}{{q}}{-}\frac{{6}}{{25}}{}\frac{{{p}}^{{2}}{}{\mathrm{tanh}}{}\left({\mathrm{_C3}}{}{t}{+}\frac{{1}}{{10}}{}\frac{{p}{}{x}}{{q}}{+}{\mathrm{_C1}}\right)}{{q}}{+}\frac{{1}}{{25}}{}\frac{{-}{250}{}{\mathrm{_C3}}{}{{q}}^{{2}}{+}{3}{}{{p}}^{{3}}}{{q}{}{p}}\right\}\right\}$ (11)

The TWS can be computed expanding in series of different functions. The functions allowed are

 > $\mathrm{TWSolutions}\left(\mathrm{functions_allowed}\right)$
 $\left[{\mathrm{JacobiCN}}{,}{\mathrm{JacobiDN}}{,}{\mathrm{JacobiNC}}{,}{\mathrm{JacobiND}}{,}{\mathrm{JacobiNS}}{,}{\mathrm{JacobiSN}}{,}{\mathrm{WeierstrassP}}{,}{\mathrm{arcsinh}}{,}{\mathrm{cos}}{,}{\mathrm{cosh}}{,}{\mathrm{cot}}{,}{\mathrm{coth}}{,}{\mathrm{csc}}{,}{\mathrm{csch}}{,}{\mathrm{exp}}{,}{\mathrm{identity}}{,}{\mathrm{ln}}{,}{\mathrm{sec}}{,}{\mathrm{sech}}{,}{\mathrm{sin}}{,}{\mathrm{sinh}}{,}{\mathrm{tan}}{,}{\mathrm{tanh}}\right]$ (12)

For example, for $p=0$, this system also admits sec, JacobiSN, and WeierstrassP type solutions

 > $\mathrm{TWSolutions}\left(\mathrm{sys},\mathrm{parameters}=\left\{p,q\right\},\mathrm{singsol}=\mathrm{false},\mathrm{functions}=\left[\mathrm{sec},\mathrm{JacobiSN},\mathrm{WeierstrassP}\right]\right)$
 $\left\{{p}{=}{p}{,}{q}{=}{q}{,}{u}{}\left({x}{,}{t}\right){=}{\mathrm{_C4}}\right\}{,}\left\{{p}{=}{0}{,}{q}{=}{q}{,}{u}{}\left({x}{,}{t}\right){=}{-}{12}{}{{\mathrm{sec}}{}\left({\mathrm{_C2}}{}{x}{+}{\mathrm{_C3}}{}{t}{+}{\mathrm{_C1}}\right)}^{{2}}{}{{\mathrm{_C2}}}^{{2}}{}{q}{+}\frac{{4}{}{{\mathrm{_C2}}}^{{3}}{}{q}{-}{\mathrm{_C3}}}{{\mathrm{_C2}}}\right\}{,}\left\{{p}{=}{0}{,}{q}{=}{q}{,}{u}{}\left({x}{,}{t}\right){=}{-}{12}{}{{\mathrm{JacobiSN}}{}\left({\mathrm{_C3}}{}{x}{+}{\mathrm{_C4}}{}{t}{+}{\mathrm{_C2}}{,}{\mathrm{_C1}}\right)}^{{2}}{}{q}{}{{\mathrm{_C1}}}^{{2}}{}{{\mathrm{_C3}}}^{{2}}{+}\frac{{4}{}{{\mathrm{_C1}}}^{{2}}{}{{\mathrm{_C3}}}^{{3}}{}{q}{+}{4}{}{{\mathrm{_C3}}}^{{3}}{}{q}{-}{\mathrm{_C4}}}{{\mathrm{_C3}}}\right\}$ (13)

In the WeierstrassP type solution above, you see the parameter q expressed in terms of the other constants _C entering the solution. To compute a solution where all solving variables are instead expressed as functions of the parameters use the optional argument rank_parameters_lower

 > $\mathrm{TWSolutions}\left(\mathrm{sys},\mathrm{parameters}=\left\{p,q\right\},\mathrm{singsol}=\mathrm{false},\mathrm{functions}=\left[\mathrm{WeierstrassP}\right],\mathrm{rank_parameters_lower}\right)$
 $\left\{{p}{=}{p}{,}{q}{=}{q}{,}{u}{}\left({x}{,}{t}\right){=}{\mathrm{_C6}}\right\}$ (14)

To compute just the nonlinear ODE system equivalent to this PDE system and the transformation mapping each other use the optional argument output = ODE. For example, for sec

 > $\mathrm{TWSolutions}\left(\mathrm{sys},\mathrm{parameters}=\left\{p,q\right\},\mathrm{singsol}=\mathrm{false},\mathrm{function}=\mathrm{sec},\mathrm{output}=\mathrm{ODE}\right)$
 $\left[\left\{\left({q}{}{{\mathrm{_C1}}}^{{3}}{}{{\mathrm{τ}}}^{{3}}{}\left({{\mathrm{τ}}}^{{2}}{-}{1}\right){}\left(\frac{{{ⅆ}}^{{3}}}{{ⅆ}{{\mathrm{τ}}}^{{3}}}{}{u}{}\left({\mathrm{τ}}\right)\right){+}{3}{}{q}{}{{\mathrm{_C1}}}^{{3}}{}{{\mathrm{τ}}}^{{2}}{}\left({2}{}{{\mathrm{τ}}}^{{2}}{-}{1}\right){}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{\mathrm{τ}}}^{{2}}}{}{u}{}\left({\mathrm{τ}}\right)\right){+}\left({6}{}{q}{}{{\mathrm{τ}}}^{{3}}{}{{\mathrm{_C1}}}^{{3}}{-}{q}{}{{\mathrm{_C1}}}^{{3}}{}{\mathrm{τ}}{+}{u}{}\left({\mathrm{τ}}\right){}{\mathrm{_C1}}{}{\mathrm{τ}}{+}{\mathrm{_C2}}{}{\mathrm{τ}}\right){}\left(\frac{{ⅆ}}{{ⅆ}{\mathrm{τ}}}{}{u}{}\left({\mathrm{τ}}\right)\right)\right){}\sqrt{{{\mathrm{τ}}}^{{2}}{-}{1}}{-}{p}{}{{\mathrm{_C1}}}^{{2}}{}{{\mathrm{τ}}}^{{2}}{}\left({{\mathrm{τ}}}^{{2}}{-}{1}\right){}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{\mathrm{τ}}}^{{2}}}{}{u}{}\left({\mathrm{τ}}\right)\right){-}{p}{}{{\mathrm{_C1}}}^{{2}}{}{\mathrm{τ}}{}\left({2}{}{{\mathrm{τ}}}^{{2}}{-}{1}\right){}\left(\frac{{ⅆ}}{{ⅆ}{\mathrm{τ}}}{}{u}{}\left({\mathrm{τ}}\right)\right)\right\}{,}\left\{{\mathrm{τ}}{=}{\mathrm{sec}}{}\left({\mathrm{_C1}}{}{x}{+}{\mathrm{_C2}}{}{t}{+}{\mathrm{_C3}}\right){,}{u}{}\left({\mathrm{τ}}\right){=}{u}{}\left({x}{,}{t}\right)\right\}\right]$ (15)

You can also indicate the identity as the function to be used; this is the corresponding nonlinear ODE problem to be solved

 > $\mathrm{TWSolutions}\left(\mathrm{sys},\mathrm{parameters}=\left\{p,q\right\},\mathrm{singsol}=\mathrm{false},\mathrm{function}=\mathrm{identity},\mathrm{output}=\mathrm{ODE}\right)$
 $\left[\left\{{q}{}{{\mathrm{_C1}}}^{{3}}{}\left(\frac{{{ⅆ}}^{{3}}}{{ⅆ}{{\mathrm{τ}}}^{{3}}}{}{u}{}\left({\mathrm{τ}}\right)\right){-}{p}{}{{\mathrm{_C1}}}^{{2}}{}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{\mathrm{τ}}}^{{2}}}{}{u}{}\left({\mathrm{τ}}\right)\right){+}\left({u}{}\left({\mathrm{τ}}\right){}{\mathrm{_C1}}{+}{\mathrm{_C2}}\right){}\left(\frac{{ⅆ}}{{ⅆ}{\mathrm{τ}}}{}{u}{}\left({\mathrm{τ}}\right)\right)\right\}{,}\left\{{\mathrm{τ}}{=}{\mathrm{_C1}}{}{x}{+}{\mathrm{_C2}}{}{t}{+}{\mathrm{_C3}}{,}{u}{}\left({\mathrm{τ}}\right){=}{u}{}\left({x}{,}{t}\right)\right\}\right]$ (16)

A PDE system example: The generalized Hirota-Satsuma coupled KdV equations. To work with simpler input and enhanced mathematical display, use the diff_table and declare commands.

 > $V≔\mathrm{diff_table}\left(v\left(x,t\right)\right):$
 > $W≔\mathrm{diff_table}\left(w\left(x,t\right)\right):$
 > $\mathrm{declare}\left(\left(u,v,w\right)\left(x,t\right)\right)$
 ${u}{}\left({x}{,}{t}\right){}{\mathrm{will now be displayed as}}{}{u}$
 ${v}{}\left({x}{,}{t}\right){}{\mathrm{will now be displayed as}}{}{v}$
 ${w}{}\left({x}{,}{t}\right){}{\mathrm{will now be displayed as}}{}{w}$ (17)
 > ${\mathrm{pde}}_{1}≔{V}_{t}+\frac{1{V}_{x,x,x}}{2}+3{U}_{[]}{V}_{x}=0$
 ${{\mathrm{pde}}}_{{1}}{≔}{{v}}_{{t}}{+}\frac{{1}}{{2}}{}{{v}}_{{x}{,}{x}{,}{x}}{+}{3}{}{u}{}{{v}}_{{x}}{=}{0}$ (18)
 > ${\mathrm{pde}}_{2}≔{W}_{t}+\frac{1{W}_{x,x,x}}{2}+3{U}_{[]}{W}_{x}=0$
 ${{\mathrm{pde}}}_{{2}}{≔}{{w}}_{{t}}{+}\frac{{1}}{{2}}{}{{w}}_{{x}{,}{x}{,}{x}}{+}{3}{}{u}{}{{w}}_{{x}}{=}{0}$ (19)
 > ${\mathrm{pde}}_{3}≔{U}_{t}-\frac{1{U}_{x,x,x}}{4}-3{U}_{[]}{U}_{x}-3\left(\frac{\partial }{\partial x}\left({W}_{[]}-{V}_{[]}^{2}\right)\right)=0$
 ${{\mathrm{pde}}}_{{3}}{≔}{{u}}_{{t}}{-}\frac{{1}}{{4}}{}{{u}}_{{x}{,}{x}{,}{x}}{-}{3}{}{u}{}{{u}}_{{x}}{+}{6}{}{v}{}{{v}}_{{x}}{-}{3}{}{{w}}_{{x}}{=}{0}$ (20)
 > $\mathrm{sys}≔\left\{{\mathrm{pde}}_{1},{\mathrm{pde}}_{2},{\mathrm{pde}}_{3}\right\}:$

This system was proposed by Satsuma and Hirota, who found its three soliton-type solutions and showed that the well-known Hirota-Satsuma coupled KdV equation is a special case of this system with $w=0$ and $x\to {x}^{\frac{1}{2}}$ , $t\to {t}^{\frac{1}{2}}$ . Eleven non-singular traveling wave solutions are computed as follows.

 > $\mathrm{sol}≔\mathrm{TWSolutions}\left(\mathrm{sys},\mathrm{singsol}=\mathrm{false}\right)$
 ${\mathrm{sol}}{≔}\left\{{u}{=}{-}{{\mathrm{tanh}}{}\left({\mathrm{_C2}}{}{x}{+}{\mathrm{_C3}}{}{t}{+}{\mathrm{_C1}}\right)}^{{2}}{}{{\mathrm{_C2}}}^{{2}}{+}\frac{{1}}{{3}}{}\frac{{{\mathrm{_C2}}}^{{3}}{-}{\mathrm{_C3}}}{{\mathrm{_C2}}}{,}{v}{=}{-}\frac{{1}}{{3}}{}\sqrt{{3}{}{{\mathrm{_C2}}}^{{4}}{+}{6}{}{\mathrm{_C2}}{}{\mathrm{_C3}}}{}{\mathrm{tanh}}{}\left({\mathrm{_C2}}{}{x}{+}{\mathrm{_C3}}{}{t}{+}{\mathrm{_C1}}\right){-}\frac{{3}}{{2}}{}\frac{{\mathrm{_C5}}}{\sqrt{{3}{}{{\mathrm{_C2}}}^{{4}}{+}{6}{}{\mathrm{_C2}}{}{\mathrm{_C3}}}}{,}{w}{=}{\mathrm{_C5}}{}{\mathrm{tanh}}{}\left({\mathrm{_C2}}{}{x}{+}{\mathrm{_C3}}{}{t}{+}{\mathrm{_C1}}\right){+}{\mathrm{_C4}}\right\}{,}\left\{{u}{=}{-}{{\mathrm{tanh}}{}\left({\mathrm{_C2}}{}{x}{+}{\mathrm{_C3}}{}{t}{+}{\mathrm{_C1}}\right)}^{{2}}{}{{\mathrm{_C2}}}^{{2}}{+}\frac{{1}}{{3}}{}\frac{{{\mathrm{_C2}}}^{{3}}{-}{\mathrm{_C3}}}{{\mathrm{_C2}}}{,}{v}{=}\frac{{1}}{{3}}{}\sqrt{{3}{}{{\mathrm{_C2}}}^{{4}}{+}{6}{}{\mathrm{_C2}}{}{\mathrm{_C3}}}{}{\mathrm{tanh}}{}\left({\mathrm{_C2}}{}{x}{+}{\mathrm{_C3}}{}{t}{+}{\mathrm{_C1}}\right){+}\frac{{3}}{{2}}{}\frac{{\mathrm{_C5}}}{\sqrt{{3}{}{{\mathrm{_C2}}}^{{4}}{+}{6}{}{\mathrm{_C2}}{}{\mathrm{_C3}}}}{,}{w}{=}{\mathrm{_C5}}{}{\mathrm{tanh}}{}\left({\mathrm{_C2}}{}{x}{+}{\mathrm{_C3}}{}{t}{+}{\mathrm{_C1}}\right){+}{\mathrm{_C4}}\right\}$ (21)

A PDE example with all its terms being nonlinear and for which an extended TWS can be computed (that is, one constructed by computing not just a polynomial but a general solution to the equivalent nonlinear ODE)

 > $\mathrm{pde}≔{U}_{t}^{2}=2{U}_{[]}{U}_{x}^{2}-\left(1+{U}_{[]}^{2}\right){U}_{x,x}$
 ${\mathrm{pde}}{≔}{{u}}_{{t}}^{{2}}{=}{2}{}{u}{}{{u}}_{{x}}^{{2}}{-}\left({{u}}^{{2}}{+}{1}\right){}{{u}}_{{x}{,}{x}}$ (22)
 > $\mathrm{TWSolutions}\left(\mathrm{pde},\mathrm{output}=\mathrm{ODE}\right)$
 $\left[\left\{\left({{u}{}\left({\mathrm{τ}}\right)}^{{2}}{+}{1}\right){}{{\mathrm{_C1}}}^{{2}}{}{\left({{\mathrm{τ}}}^{{2}}{-}{1}\right)}^{{2}}{}{{u}}_{{\mathrm{τ}}{,}{\mathrm{τ}}}{+}\left({{\mathrm{_C2}}}^{{2}}{}{\left({{\mathrm{τ}}}^{{2}}{-}{1}\right)}^{{2}}{-}{2}{}{u}{}\left({\mathrm{τ}}\right){}{{\mathrm{_C1}}}^{{2}}{}{\left({{\mathrm{τ}}}^{{2}}{-}{1}\right)}^{{2}}\right){}{{u}}_{{\mathrm{τ}}}^{{2}}{+}{2}{}\left({{u}{}\left({\mathrm{τ}}\right)}^{{2}}{+}{1}\right){}{{\mathrm{_C1}}}^{{2}}{}\left({{\mathrm{τ}}}^{{2}}{-}{1}\right){}{{u}}_{{\mathrm{τ}}}{}{\mathrm{τ}}\right\}{,}\left\{{\mathrm{τ}}{=}{\mathrm{tanh}}{}\left({\mathrm{_C1}}{}{x}{+}{\mathrm{_C2}}{}{t}{+}{\mathrm{_C3}}\right){,}{u}{}\left({\mathrm{τ}}\right){=}{u}\right\}\right]$ (23)
 > $\mathrm{TWSolutions}\left(\mathrm{pde},\mathrm{extended}\right)$
 $\left\{{u}{=}{\mathrm{tan}}{}\left(\frac{{{\mathrm{_C4}}}^{{2}}{}{\mathrm{ln}}{}\left({-}\frac{{1}}{{2}}{}\frac{{{\mathrm{_C5}}}^{{2}}{}\left({\mathrm{_C1}}{}{\mathrm{ln}}{}\left(\frac{{\mathrm{tanh}}{}\left({\mathrm{_C4}}{}{x}{+}{\mathrm{_C5}}{}{t}{+}{\mathrm{_C3}}\right){+}{1}}{{\mathrm{tanh}}{}\left({\mathrm{_C4}}{}{x}{+}{\mathrm{_C5}}{}{t}{+}{\mathrm{_C3}}\right){-}{1}}\right){-}{2}{}{\mathrm{_C2}}\right)}{{{\mathrm{_C4}}}^{{2}}}\right)}{{{\mathrm{_C5}}}^{{2}}}\right)\right\}$ (24)

A simpler extended solution using the identity as the function used to construct the PDE solution

 > $\mathrm{TWSolutions}\left(\mathrm{pde},\mathrm{function}=\mathrm{identity},\mathrm{output}=\mathrm{ODE}\right)$
 $\left[\left\{\left({{u}{}\left({\mathrm{τ}}\right)}^{{2}}{+}{1}\right){}{{\mathrm{_C1}}}^{{2}}{}{{u}}_{{\mathrm{τ}}{,}{\mathrm{τ}}}{+}\left({-}{2}{}{u}{}\left({\mathrm{τ}}\right){}{{\mathrm{_C1}}}^{{2}}{+}{{\mathrm{_C2}}}^{{2}}\right){}{{u}}_{{\mathrm{τ}}}^{{2}}\right\}{,}\left\{{\mathrm{τ}}{=}{\mathrm{_C1}}{}{x}{+}{\mathrm{_C2}}{}{t}{+}{\mathrm{_C3}}{,}{u}{}\left({\mathrm{τ}}\right){=}{u}\right\}\right]$ (25)
 > $\mathrm{TWSolutions}\left(\mathrm{pde},\mathrm{function}=\mathrm{identity},\mathrm{extended}\right)$
 $\left\{{u}{=}{\mathrm{tan}}{}\left(\frac{{{\mathrm{_C4}}}^{{2}}{}{\mathrm{ln}}{}\left(\frac{{{\mathrm{_C5}}}^{{2}}{}\left({\mathrm{_C1}}{}\left({\mathrm{_C4}}{}{x}{+}{\mathrm{_C5}}{}{t}{+}{\mathrm{_C3}}\right){+}{\mathrm{_C2}}\right)}{{{\mathrm{_C4}}}^{{2}}}\right)}{{{\mathrm{_C5}}}^{{2}}}\right)\right\}$ (26)