pdsolve
find solutions for partial differential equations (PDEs) and systems of PDEs
Calling Sequence
Parameters
Description
Examples
References
Compatibility
pdsolve(PDE, f, HINT = hint, INTEGRATE, build)
pdsolve(PDE_system, funcs, HINT, other_options)
pdsolve(PDE_or_PDE_system, series, conds, order=n, other_options)
pdsolve(PDE_or_PDE_system, conds, type=numeric, other_options)
PDE
-
a partial differential equation or system of them, possibly including boundary or initial values and/or ODEs and/or algebraic constraints
f
indeterminate function or its name; or a set or list of them, required when there are many differentiated functions
hint
(optional) right-hand-side in HINT = hint, where hint is one of: `+`, `*`, one of the keywords strip or TWS, the construction TWS(math_function_name), or any algebraic expression involving unknown functions
INTEGRATE
(optional) indicate the automatic integration of the set of ODEs found when a PDE is solved by using separation of variables
build
(optional) try to build an explicit expression for the indeterminate function, no matter what the generality of the solution found
PDE_system
system of partial differential equations; it can contain inequations
funcs
(optional) set or list with indeterminate functions or names
other_options
when exactly solving PDE systems, all the options accepted by the casesplit command are also accepted by pdsolve
PDE_or_PDE_system
partial differential equation or system of partial differential equations; it can contain inequations
conds
initial or boundary conditions
series
to compute series solutions for PDE_or_PDE_system
generalsolution
(optional) request a general solution for PDE_or_PDE_system
type=numeric
equation; indicate that a numerical solution is to be found; the keyword numeric can be used instead of the full equation
Note: Optional arguments can be given alone or in conjunction, and in any order.
For the first three calling sequences, given a PDE, or a system of PDEs, possibly including ODEs, algebraic constraints, and inequations, the main goal of the pdsolve function is to find an analytical solution. There are no restrictions as to the type, differential order, or number of dependent or independent variables of the PDEs or PDE systems that pdsolve can try to solve.
For computing solutions to systems of partial differential equation see pdsolve/system.
For computing exact solutions to partial differential equations subject to boundary initial values see pdsolve/boundaryconditions and mode examples in in examples/pdsolve_boundaryconditions.
For computing series solutions to partial differential equation systems subject to initial values see pdsolve/series.
For the remaining (fourth) calling sequence above, pdsolve finds a numerical solution for the input PDE or PDE system. A discussion of this usage of pdsolve, the types of PDE that can be numerically solved, and any numeric-specific arguments can be found in pdsolve/numeric.
The remainder of this page discusses the exact solution of a single PDE. For help on the exact solution of PDE systems, see pdsolve/system.
Solving a single PDE
The pdsolve command currently recognizes a certain number of PDE families that can be solved by using standard methods. When the given PDE belongs to an unrecognized family, pdsolve uses a heuristic algorithm that attempts separation of variables based on the specific structure of the PDE. pdsolve also works with anticommutative variables set using the Physics package using the approach explained in PerformOnAnticommutativeSystem.
The strategy pdsolve uses is to look for the most general solution to the given PDE or, in the worst case, to look for a complete separation of variables. Thus, when successful, the command returns one of the following:
- A general solution,
- A quasi-general solution (a solution containing arbitrary functions, but not in sufficient number or not having enough variables to constitute a general solution), or
- A set of uncoupled ODEs with all the variables separated, or a complete solution obtained after integrating this set (when the option INTEGRATE is indicated).
When an incomplete separation of variables is reached, the command calls itself again (with a smaller problem), possibly using different methods of solution. If the smaller problem cannot be solved, the incomplete separation of variables is returned (with a warning message).
The results of pdsolve are returned, by default, in one of three forms.
a) When the general solution to the PDE is obtained, pdsolve returns an explicit result for the indeterminate function in terms of arbitrary functions. For example, for PDE≔x⁢∂∂yf⁡x,y−y⁢∂∂xf⁡x,y=0, the input pdsolve⁡PDE returns f⁡x,y=f1⁡x2+y2⁢, where f1 is an arbitrary function.
b) When a solution, but not the most general one, is obtained pdsolve expresses the result using the internal PDESolStruc function, displayed as in 'solution where details', with solution being the functional form found for the indeterminate function, and details contains a list with any ODEs found while separating the variables, as well as any arbitrary functions or changes of variables introduced by pdsolve. This format enables one to see how particular the solution obtained is. In these cases, an explicit result for the indeterminate function, a particular solution, can be obtained by calling pdsolve with the extra argument build, or from this PDE solution structure by using the PDEtools[build] command. See the Examples section.
c) When pdsolve fails, it returns NULL.
You can change this scheme for returning solutions of pdsolve to only return a solution when it is the most general one, item a) above, and in all other cases return NULL, by assigning _Env_pdsolve_generalsolution := true.
You can change the default ways of expressing results by assigning the values 1 or 2 to the environment variable _EnvBuildPdsolve. By default, _EnvBuildPdsolve is assigned to 1. When _EnvBuildPdsolve is set to 2, pdsolve always tries to build an explicit solution, independent of the generality of the result obtained.
The arbitrary functions appearing in the output of pdsolve are of the form fn, with n an integer. These are literal subscripts symbols constructed, e.g., as in f__1, displayed as f1. Optionally, these functions can be displayed _Fn as in Maple releases prior to 2023; for that purpose call pdsolve once with the extra argument arbitraryfunctions = traditional, and all subsequent calls will automatically display the arbitrary functions using the traditional form _Fn. You can also indicate the traditional form to be the default display by adding this line to your maple initialization file: `pdsolve/arbitraryfunctions` = traditional. After that, to return to the default display fn it suffices to do one call to pdsolve with the optional argument arbitraryfunctions = subscripted. NOTE: when displaying these functions as fn, an alias fn=_Fn is automatically set, so that programs written expecting the traditional display _Fn of previous releases work the same way, without requiring any changes.
About the Arguments
When the given PDE contains derivatives of more than one function, the function which should be considered the indeterminate function, or its name, must be given as an extra argument.
Four other optional arguments are allowed.
1. You can pass the extra argument build to pdsolve, which causes the function to directly build an explicit result, independent of the generality of the solution obtained.
2. You can request the automatic integration of the system of ODEs found by pdsolve when separating the variables, by using the INTEGRATE option.
3. You can request that only a general solution be returned by pdsolve by using the generalsolution option; if no such solution is found, then the program returns NULL. By setting infolevel[pdsolve] to 3, as in example 4 below, information on pdsolve's search for a solution, and on whether a solution being returned is general, is given.
4. You can give a HINT indicating a method of solution or a form for the indeterminate function. When given, the hint is taken by pdsolve as the departure point in looking for the solution. This option is remarkably useful when a result obtained by pdsolve is not the most general one, and permits a detailed study of the possible solutions for a given PDE.
The following arguments can be used with the HINT option.
HINT = `+`
This option forces pdsolve to begin by trying to separate the variables by sum.
HINT = `*`
This option forces pdsolve to begin by trying to separate the variables by product.
HINT = 'TWS'
This option forces pdsolve to only try computing a Traveling Wave Solution as power series in tanh(xi), where xi represents a linear combination of the independent variables.
HINT = 'TWS(math_function_name)'
This option forces pdsolve to only try computing a Traveling Wave Solution as power series in math_function_name(xi), where xi represents a linear combination of the independent variables and math_function_name can be any of the following mathematical function names: exp, ln, sin, cos, tan, their multiplicative inverses csc, sec and cot, the corresponding six hyperbolic functions, arcsinh, the twelve elliptic Jacobi functions, the WeierstrassP function and also the identity function x -> x, useful to compute purely polynomial solutions when they exist.
HINT =any algebraic expression
This option forces pdsolve to begin by trying to simplify the PDE or to separate the variables taking the indeterminate function as equal to the indicated algebraic expression. It is possible to give pdsolve a functional hint, for example, HINT=f1⁡xf2⁡yf2⁡z (where the indeterminate function is f⁡x,y,z). That is, you can suggest only the functional form of the indeterminate function. This option also permits the introduction of more than one indeterminate function of more than one variable, for example, HINT=...f1⁡x,y...f2⁡y,z....
HINT = strip (for first order PDEs only)
This option forces pdsolve to look for a solution by trying to solve the associated characteristic strip. In this case, pdsolve tries to find the differential invariants associated with the given PDE and determine its general solution. This is usually possible when the characteristic strip does not require the extension of the configuration space by introducing the partial derivatives of the indeterminate function as variables. Otherwise, the integrated characteristic strip is returned in terms of a parameter _s.
Conventions
The pdsolve routine usually introduces new functions to express the solution for the indeterminate function. For example:
f⁡x,y,z=f__1⁡x+f__2⁡y+f__3⁡z
All functions introduced by pdsolve beginning with _F and followed by a number are assumed to be arbitrary, sufficiently differentiable functions of their arguments.
Any arbitrary constants introduced while separating the variables are represented as _c1, _c2,..., and are global.
The examples below illustrate the use of pdsolve in solving a single PDE. For examples related to solving PDE systems, see pdsolve/system.
1. General solution of a first order PDE:
PDE≔x⁢diff⁡f⁡x,y,y−diff⁡f⁡x,y,x=f⁡x,y2⁢g⁡xh⁡y
PDE≔x⁢∂∂yf⁡x,y−∂∂xf⁡x,y=f⁡x,y2⁢g⁡xh⁡y
ans≔pdsolve⁡PDE
ans≔f⁡x,y=1∫` `xg⁡_ah⁡−_a22+x22+yⅆ_a+f__1⁡x22+y
For the integral above, see intat. Results can be tested using pdetest.
pdetest⁡ans,PDE
0
2. Laplace equation in spherical coordinates:
PDE≔Diff⁡r2⁢diff⁡F⁡r,θ,φ,r,r+1sin⁡θ⁢Diff⁡sin⁡θ⁢diff⁡F⁡r,θ,φ,θ,θ+1sin⁡θ2⁢diff⁡F⁡r,θ,φ,φ,φ=0
PDE≔∂∂rr2⁢∂∂rF⁡r,θ,φ+∂∂θsin⁡θ⁢∂∂θF⁡r,θ,φsin⁡θ+∂2∂φ2F⁡r,θ,φsin⁡θ2=0
The following is the structure of the solution expressed by using PDESolStruc (displayed using &where).
ans≔F⁡r,θ,φ=f__1⁡r⁢f__2⁡θ⁢f__3⁡φwhereⅆ2ⅆr2f__1⁡r=f__1⁡r⁢_c1r2−2⁢ⅆⅆrf__1⁡rr,ⅆ2ⅆθ2f__2⁡θ=−f__2⁡θ⁢_c1+f__2⁡θ⁢_c2sin⁡θ2−cos⁡θ⁢ⅆⅆθf__2⁡θsin⁡θ,ⅆ2ⅆφ2f__3⁡φ=−f__3⁡φ⁢_c2
To build an explicit expression for F(r,theta,phi), try using PDEtools[build](ans), or pass the optional argument build to pdsolve. It is sometimes appropriate to also use assuming, for instance to specify that theta, representing the spherical coordinate, ranges from 0 to pi.
simplify⁡pdsolve⁡PDE,build,sizeassuming0≤θ,θ≤π
F⁡r,θ,φ=sin⁡θ_c2⁢−1_c22⁢c__1⁢r1+4⁢_c12+c__2⁢r−1+4⁢_c12⁢c__5⁢sin⁡_c2⁢φ+c__6⁢cos⁡_c2⁢φ⁢cos⁡θ⁢hypergeom⁡_c22+1+4⁢_c14+34,_c22−1+4⁢_c14+34,32,cos⁡2⁢θ2+12⁢c__4+c__3⁢hypergeom⁡_c22+1+4⁢_c14+14,_c22−1+4⁢_c14+14,12,cos⁡2⁢θ2+12r
In the above, we are also using simplify/size; this is frequently useful when building solutions and helps to make evident that some constant factors can be reabsorbed in redefinitions of the arbitrary constants _C1, _C2, ....
3. Hamilton-Jacobi type PDE (see, for example, Landau, L.D. and Lifshitz, E.M. Translated by Sykes, J.B. and Bell, J.S. Mechanics. Oxford: Pergamon Press, 1969.)
PDE≔−diff⁡S⁡t,ξ,η,φ,t=12⁢diff⁡S⁡t,ξ,η,φ,ξ2⁢ξ2−1σ2⁢m⁢ξ2−η2+12⁢diff⁡S⁡t,ξ,η,φ,η2⁢1−η2σ2⁢m⁢ξ2−η2+12⁢diff⁡S⁡t,ξ,η,φ,φ2m⁢σ2⁢ξ2−1⁢1−η2+a⁡ξ+b⁡ηξ2−η2
PDE≔−∂∂tS⁡t,ξ,η,φ=∂∂ξS⁡t,ξ,η,φ2⁢ξ2−12⁢σ2⁢m⁢−η2+ξ2+∂∂ηS⁡t,ξ,η,φ2⁢−η2+12⁢m⁢σ2⁢−η2+ξ2+∂∂φS⁡t,ξ,η,φ22⁢m⁢σ2⁢ξ2−1⁢−η2+1+a⁡ξ+b⁡η−η2+ξ2
The following is the structure of a complete solution obtained by separating the variables by sum.
ans≔S⁡t,ξ,η,φ=f__1⁡t+f__2⁡ξ+f__3⁡η+f__4⁡φwhereⅆⅆξf__2⁡ξ2=−2⁢m⁢σ2⁢ξ2⁢_c1ξ2−1−2⁢σ2⁢m⁢_c3ξ2−1−_c42ξ4−2⁢ξ2+1−2⁢a⁡ξ⁢σ2⁢mξ2−1,ⅆⅆηf__3⁡η2=−2⁢η2⁢m⁢σ2⁢_c1η2−1−2⁢σ2⁢m⁢_c3η2−1−_c42η2−12+2⁢b⁡η⁢σ2⁢mη2−1,ⅆⅆtf__1⁡t=_c1,ⅆⅆφf__4⁡φ=_c4
Test these PDE solution structures using pdetest.
To build an explicit expression for S(t, xi, eta, phi), try build(ans).
4. A second order PDE and the HINT option:
PDE≔S⁡x,y⁢diff⁡S⁡x,y,y,x+diff⁡S⁡x,y,x⁢diff⁡S⁡x,y,y=1
PDE≔S⁡x,y⁢∂2∂x∂yS⁡x,y+∂∂xS⁡x,y⁢∂∂yS⁡x,y=1
A generalsolution is sought; let us first set the infolevel[pdsolve] to 3 to get information about the solution process.
infolevelpdsolve≔3:
pdsolve⁡PDE,generalsolution
First set of solution methods (general or quasi general solution) -> trying missing independent variables -> trying the Laplace's method -> trying a first integral mapping the PDE into and ODE plus parameters <- first integral method PDE into an ODE plus parameters successful. <- First set of solution methods successful <- Returning a *general* solution
S⁡x,y=RootOf⁡_Z2−2⁢f__1⁡y−2⁢x⁢y−f__2⁡x
The command returned NULL, indicating it could not find a general solution to PDE; but the userinfo indicates that a particular result can be obtained by separating the variables by product. We return the infolevel[pdsolve] to 1 and give pdsolve a product HINT:
infolevelpdsolve≔1:
struc≔pdsolve⁡PDE,HINT=f⁡x⁢g⁡y
struc≔S⁡x,y=f⁡x⁢g⁡ywhereⅆⅆxf⁡x=_c1f⁡x,ⅆⅆyg⁡y=12⁢g⁡y⁢_c1
To find an explicit expression for S(x,y), use the optional argument build of pdsolve, or apply the PDEtools[build] command to the solution above.
PDEtoolsbuild⁡struc
S⁡x,y=2⁢x⁢_c1+c__1⁢c__2⁢_c12+_c1⁢y_c1
Use the HINT option to obtain a general solution, getting some inspiration from the solution above.
pdsolve⁡PDE,HINT=P⁡x,y12
S⁡x,y=f__2⁡x+f__1⁡y+2⁢x⁢y
General solutions involve N arbitrary functions _F of K-1 variables, where N is the differential order and K the number of independent variables of the PDE.
5. Nonlinear first order PDE solved by using the characteristic strip method:
PDE≔diff⁡f⁡x,y,z,x+diff⁡f⁡x,y,z,y2=f⁡x,y,z+z
PDE≔∂∂xf⁡x,y,z+∂∂yf⁡x,y,z2=f⁡x,y,z+z
pdsolve⁡PDE,HINT=strip
∂∂xf⁡x,y,z+∂∂yf⁡x,y,z2−f⁡x,y,z−z=0wheref⁡_s=c__1⁢ⅇ2⁢_s+c__4⁢ⅇ_s−c__5,x⁡_s=_s+c__6,y⁡_s=2⁢c__3⁢ⅇ_s+c__2,z⁡_s=c__5,_p1⁡_s=c__4⁢ⅇ_s,_p2⁡_s=c__3⁢ⅇ_s,and_p1=∂∂xf⁡x,y,z,_p2=∂∂yf⁡x,y,z
pdsolve can solve PDEs that involve anticommutative variables set using the Physics package using the approach explained in PerformOnAnticommutativeSystem.
with⁡Physics
`*`,`.`,Annihilation,AntiCommutator,Antisymmetrize,Assume,Bra,Bracket,Check,Christoffel,Coefficients,Commutator,CompactDisplay,Coordinates,Creation,D_,Dagger,Decompose,Define,Dγ,DiracConjugate,Einstein,EnergyMomentum,Expand,ExteriorDerivative,Factor,FeynmanDiagrams,FeynmanIntegral,Fundiff,Geodesics,GrassmannParity,Gtaylor,Intc,Inverse,Ket,KillingVectors,KroneckerDelta,LagrangeEquations,LeviCivita,Library,LieBracket,LieDerivative,Normal,NumericalRelativity,Parameters,PerformOnAnticommutativeSystem,Projector,Psigma,Redefine,Ricci,Riemann,Setup,Simplify,SortProducts,SpaceTimeVector,StandardModel,Substitute,SubstituteTensor,SubstituteTensorIndices,SumOverRepeatedIndices,Symmetrize,TensorArray,Tetrads,ThreePlusOne,ToContravariant,ToCovariant,ToFieldComponents,ToSuperfields,Trace,TransformCoordinates,Vectors,Weyl,`^`,dAlembertian,d_,diff,g_,gamma_
Set first θ and Q as suffixes for variables of type/anticommutative (see Setup)
Setup⁡anticommutativepre=Q,θ
* Partial match of 'anticommutativepre' against keyword 'anticommutativeprefix'
_______________________________________________________
anticommutativeprefix=Q,θ
Consider this partial differential equation for the anticommutative function Q of commutative and anticommutative variables x,θ
diff⁡Q⁡x,y,θ,x,θ=0
∂2∂x∂θQ⁡x,y,θ=0
Its solution using pdsolve involves an anticommutative constant _lambda1, analogous to the commutative constants _Cn where n is an integer. The arbitrary functions introduced are all commutative, as usual and the Grassmannian parity of the left and right-hand-sides is preserved
pdsolve⁡
Q⁡x,y,θ=f__1⁡x,y⁢_λ1+f__3⁡y⁢θ
Physics:-GrassmannParity⁡
1=1
For examples of the solving of PDE systems involving anticommutative variables see pdsolve/system.
Cheb-Terrab, E.S., and von Bulow, K. "A Computational Approach for the Analytical Solving of Partial Differential Equations". Computer Physics Communications. Vol. 90. (1995): 102-116.
The generalsolution option was introduced in Maple 2017.
For more information on Maple 2017 changes, see Updates in Maple 2017.
The pdsolve command was updated in Maple 2023.
The arbitraryfunctions option was introduced in Maple 2023.
For more information on Maple 2023 changes, see Updates in Maple 2023.
See Also
charstrip
dchange
dsolve
intat
more examples with boundary conditions
pdetest
PDEtools
PDEtools[build]
PDEtools[casesplit]
pdsolve/boundaryconditions
pdsolve/numeric
pdsolve/series
pdsolve/system
PerformOnAnticommutativeSystem
Physics
Setup
splitstrip
TWSolutions
Download Help Document