find solutions for partial differential equations (PDEs) and systems of PDEs
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)
a partial differential equation or system of them, possibly including boundary or initial values and/or ODEs and/or algebraic constraints
indeterminate function or its name; or a set or list of them, required when there are many differentiated functions
(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
(optional) indicate the automatic integration of the set of ODEs found when a PDE is solved by using separation of variables
(optional) try to build an explicit expression for the indeterminate function, no matter what the generality of the solution found
system of partial differential equations; it can contain inequations
(optional) set or list with indeterminate functions or names
when exactly solving PDE systems, all the options accepted by the casesplit command are also accepted by pdsolve
partial differential equation or system of partial differential equations; it can contain inequations
initial or boundary conditions
to compute series solutions for PDE_or_PDE_system
(optional) request a general solution for PDE_or_PDE_system
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, the function returns an explicit result for the indeterminate function.
PDE := x*diff(f(x,y),y)-y*diff(f(x,y),x) = 0;
pdsolve(PDE); # _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 using &where, with the functional form found for the indeterminate function as the first argument. The second argument contains a list with any ODEs found while separating the variables, as well as any arbitrary functions or changes of variables introduced by pdsolve. PDESolStruc enables the user 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 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.
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.
The pdsolve routine usually introduces new functions to express the solution for the indeterminate function. For example:
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⁢∂∂y⁢f⁡x,y−∂∂x⁢f⁡x,y=f⁡x,y2⁢g⁡xh⁡y
ans ≔ pdsolve⁡PDE
For the integral above, see intat. Results can be tested using pdetest.
2. Laplace equation in spherical coordinates:
PDE ≔ ∂∂r⁢r2⁢∂∂r⁢F⁡r,θ,φ+1⁢∂∂θ⁢sin⁡θ⁢∂∂θ⁢F⁡r,θ,φsin⁡θ+1⁢∂2∂φ2⁢F⁡r,θ,φsin⁡θ2=0
The following is the structure of the solution expressed by using PDESolStruc (displayed using &where).
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.
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 ≔ −∂∂t⁢S⁡t,ξ,η,φ=1⁢∂∂ξ⁢S⁡t,ξ,η,φ2⁢ξ2−12⁢σ2⁢m⁢ξ2−η2+1⁢∂∂η⁢S⁡t,ξ,η,φ2⁢1−η22⁢m⁢σ2⁢ξ2−η2+1⁢∂∂φ⁢S⁡t,ξ,η,φ22⁢m⁢σ2⁢ξ2−1⁢1−η2+a⁡ξ+b⁡ηξ2−η2
The following is the structure of a complete solution obtained by separating the variables by sum.
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⁢∂2∂x⁢∂y⁢S⁡x,y+∂∂x⁢S⁡x,y⁢∂∂y⁢S⁡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:
First set of solution methods (general or quasi general solution)
Trying the Laplace's method
Second set of solution methods (complete solutions)
Trying methods for second order PDEs
Third set of solution methods (simple HINTs for separating variables)
PDE linear in highest derivatives - trying a separation of variables by *
HINT = *
Fourth set of solution methods
Preparing a solution HINT ...
Trying HINT = _F1(x)*_F2(y)
Third set of solution methods successful
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
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.
Use the HINT option to obtain a general solution, getting some inspiration from the solution above.
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 ≔ ∂∂x⁢f⁡x,y,z+∂∂y⁢f⁡x,y,z2=f⁡x,y,z+z
pdsolve can solve PDEs that involve anticommutative variables set using the Physics package using the approach explained in PerformOnAnticommutativeSystem.
Set first θ and Q as suffixes for variables of type/anticommutative (see Setup)
* Partial match of 'anticommutativepre' against keyword 'anticommutativeprefix'
Consider this partial differential equation for the anticommutative function Q of commutative and anticommutative variables x,θ
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
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 pdsolve command was updated in Maple 2017.
The generalsolution option was introduced in Maple 2017.
For more information on Maple 2017 changes, see Updates in Maple 2017.
more examples with boundary conditions
Download Help Document
What kind of issue would you like to report? (Optional)