find solutions for partial differential equations (PDEs) with boundary and/or initial conditions
pdsolve([PDE, conds], f, hint)
a partial differential equation or system thereof
initial or boundary conditions
indeterminate function or its name; or a set or list of them, required when there is more than one differentiated function
(optional): HINT = `+`, HINT = `*`, HINT = boundedseries,
HINT = boundedseries(variable = value), HINT = boundedseries(variable = [values])
(optional): method = method1, method = [method1, method2, ...], exclude = method1, exclude = [method1, method2, ...]
(optional): degree = positive integer
Given one or more PDE with boundary and/or initial conditions, pdsolve works to find an analytical solution satisfying all of the given equations and conditions. 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, although the solving methods are limited in scope.
Several solution methods are used, depending on the order of the PDE, on whether they are linear, on the domain for the variables of the problem, and on whether the PDE or the boundary conditions, or both, are homogeneous.
Changes of variables in PDE and conditions are used as necessary in order to make problems solvable by pdsolve.
To see what method is being used to solve a given problem, you can assign the following (see infolevel):
infolevelpdsolve ≔ 2:
The solving methods can be indicated, either to be used for solving, as in methods=method__1,method__2, ..., to be tried in the order indicated, or to be excluded, as in exclude=method__1,method__2, .... The methods and sub-methods available are organized in a table, `pdsolve/BC/methods`:
So, for example, the methods for PDEs of first order and second order are, respectively,
Some methods have sub-methods:
About the Arguments
When the given PDE contains derivatives of more than one function, the function(s) which should be considered the indeterminate function(s), or its name, must be given as an extra argument.
The PDE (or system thereof) and boundary and/or initial conditions should all be given together as a list.
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.
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 = boundedseries
This option tells pdsolve that the solution is bounded (pdsolve will choose an appropriate boundary).
HINT = boundedseries(variable = value), HINT = boundedseries(variable = [values])
This option tells pdsolve that the solution is bounded (using the given value(s) for the given variable).
You can specify one or more solving methods to be used or not used (excluded), from: Laplace, Fourier, Series, Generic, PolynomialSolutions, LinearDifferentialOperator, Wave, Heat, Superposition, SpecializeArbitraryFunctions, SpecializeArbitraryConstants.
When using the method PolynomialSolutions, a degree can be specified for the solution. Note that for linear PDE, the maximum degree used by pdsolve by default is 10; for nonlinear PDE, it is 4. You can override these default values by using the degree =... option.
Any arbitrary constants introduced during the solution process are represented as _C1, _C2,..., and are global.
Any functions introduced by pdsolve beginning with _F and followed by a number are assumed to be arbitrary, sufficiently differentiable functions of their arguments.
When pdsolve fails, it returns NULL.
The following illustrate some of the strategies and solution methods used by pdsolve to solve problems involving PDE with boundary conditions, initial conditions, or both. The HINT and method = ... options are illustrated in several different examples below. Click on the arrow to the left of each section name to view the examples for that section.
Linear change of variables
PDE and BC problems often require that the boundary and initial conditions be given at certain evaluation points (usually in which one of the variables is equal to zero). With linear changes of variables, it is possible to change the evaluation points of the given conditions, obtaining the solution for the new variables, and then changing back to the original variables.
An example of a heat PDE & BC problem in a semi-infinite domain. Note the conditions are at x=A and t=B.
pde__1 ≔ diffux, t, t = diffux, t, x, x4
Note the assumptions placed below; depending on the problem, they may be required for it to be solvable. In this case, the assumptions are that x and t are, respectively, greater than the absolute value of the evaluation points of the conditions, in this case A and B.
A wave PDE with a source. Note that the conditions are at t=1.
pde__2 ≔ diffux, t, t, t − c2⋅diffux, t, x, x = fx, t
You can ask pdetest to test the solution against the original problem, if desired:
Fourier Series method
This method, for single linear second-order PDEs in two or three independent variables, uses separation of variables by product to identify one or two Sturm-Liouville problems, depending on the number of variables. These problems are solved by finding eigenvalues with corresponding eigenfunctions, by using orthogonality properties of these eigenfunctions, and by then superimposing solutions (since the PDE is linear) to create an infinite series.
An example with the Schrodinger PDE with zero potential (Planck's constant, Z, is entered from the palettes):
pde__3 ≔ I⋅ℏ⋅difffx, t, t = −ℏ22 m⋅difffx, t, x,x
conds__3 ≔ f0, t = 0, fL, t = 0 :
pdsolvepde__3,conds__3, fx, t assuming L > 0
An example with the wave PDE:
pde__4 ≔ diffux, t, t, t = c2 diffux, t, x, x
conds__4 ≔ u0, t = 0, D1uL, t = 0, D2ux, 0 = 0, ux, 0 = fx:
pdsolvepde__4, conds__4, ux, t assuming 0< x ≤ L
An example that represents the temperature distribution in a thin circular plate whose lateral surfaces are insulated:
pde__5 ≔ diffur, theta, t, t = 125 rdiffur, theta, t, r + r diffur, theta, t, r, r + diffur, theta, t, theta, thetar
In the above we see that the eigenvalue λ__n satisfies −J1λn+J2⁡λn⁢λn=0. When λ__n is the root of one single BesselJ or BesselY function of integer order, the Maple functions BesselJZeros and BesselYZeros are used instead. That is the case, for instance, if we slightly modify this problem changing the first boundary condition to be u1,θ,t=0 instead of D1u1,θ,t=0
An example with the Laplace PDE, requesting a solution outside a disk of radius one via HINT = boundedseries(r = infinity):
pde__6≔ diffr ⋅ diffur, θ, r, rr+diffur, θ, θ,θr2 = 0
pdsolvepde__6, conds__6, ur, theta,HINT = boundedseriesr=infinity
To obtain the solution inside the disk of radius one, we use HINT = boundedseries(r = 0):
pdsolvepde__6, conds__6, ur, theta,HINT = boundedseriesr=0
Here, pdsolve first calculates the PDE's general solution, and then works to fit any initial or boundary conditions to it. Both examples below also illustrate that the method chosen can make a difference in the solution pdsolve returns:
pde__7 ≔ diffux, y, x, x + diffux, y, y, y = 0
When the Fourier method is specified, pdsolve returns:
which we can convert to integral form:
When method = Generic is specified, pdsolve's solution includes an arbitrary function _F2:
Here is another example in which the method that is chosen makes a difference in the solution obtained:
pde__8 ≔ diffur, θ, r, r + diffur, θ, θ,θ = 0
With method = Generic, pdsolve returns:
With method = Fourier, pdsolve uses a Fourier transform to obtain:
Integral Transforms (Laplace method, Fourier method)
Integral Transforms are used in infinite or semi-infinite spatial domain problems.
Laplace transforms act to change derivatives with respect to one of the independent variables of the domain into multiplication operations in the transformed domain. After applying a Laplace transform to the original problem, we can simplify the problem using the transformed BC, then solve the problem in the transformed domain, and finally apply the inverse Laplace transform to arrive at the final solution. It is important to remember to give pdsolve any necessary restrictions on the variables and constants of the problem, by means of the assuming command.
We can also tell pdsolve that the dependent variable is bounded, by means of the optional argument HINT = boundedseries.
Consider the problem of a falling cable lying on a table that is suddenly removed.
pde__9 ≔ diffux, t, t, t = c2⋅diffux, t, x, x−g
conds__9≔ ux, 0 = 0, u0, t = 0, D2ux, 0 = 0:
To display special functions using textbook notation, enable the typesetting of mathematical functions:
If we ask pdsolve to solve this problem without the condition of boundedness of the solution, we obtain:
If we now ask for a bounded solution, by means of the option HINT = boundedseries, pdsolve simplifies the problem accordingly.
For Fourier transforms, the process is similar to that used in the Laplace transform method.
pde__10 ≔ diffux, t, t = diffux, t, x, x+m
A third order PDE problem:
pde__11 ≔ diffux, t, t = −diffux, t, x, x, x
Linear Differential Operator method
This method is for problems of the form
∂2∂t2w=Mw, wx__i,0=fx__i, ∂∂twt=0|∂∂twt=0=gx__i
where M is an arbitrary linear differential operator of any order which only depends on the spatial variables x__i.
pde__12 ≔ diffwx1, x2, x3, t, t, t = diffwx1, x2, x3, t, x2, x1+diffwx1, x2, x3, t, x3, x1+diffwx1, x2, x3, t, x3, x3−diffwx1, x2, x3, t, x3, x2
conds__12 ≔ wx1, x2, x3, 0 = x13⋅x32+sinx1, D4wx1, x2, x3, 0 = cosx1−x2⋅x3:
This method is for solving the Cauchy problem for hyperbolic PDE in unbounded domains, including cases where there are different types of sources as well as functions in the initial conditions.
pde__13 ≔ diffux,t,t,t−4⋅ diffux,t,x,x=fa
conds__13 ≔ ux,0=0,D2ux,0 = x2:
Polynomial Solutions method
This method gives pdsolve better performance to find polynomial solutions to PDE & BC problems when they exist.
pde__14 ≔ diffux, y, x, x + y⋅diffux, y, y, y = 0
An example with a system of PDE & BC for which pdsolve does not find a solution using the default maximum degree 10 for linear PDE.
sys__15≔ diffux,y,y=−diffvx,y,x, diffux,y,x=diffvx,y,y
The degree seen in the initial conditions is given below to find a solution:
This method is for linear homogeneous PDE problems with non-periodic initial and boundary conditions, more than one of which is non-homogeneous.
The superposition method works by taking advantage of the linearity of the problem and the fact that the solution to such a problem in which two or more of the BC are non-homogeneous can be given as
u = u__1+u__2 + ..., where each u__i is a solution of the PDE with all but one of the BC homogenized.
A Laplace PDE with one homogeneous and three non-homogeneous conditions:
pde__16 ≔ diffux, y, x, x + diffux, y, y, y = 0
This method applies to heat PDE, with or without a source, in semi-infinite domains.
A heat PDE in a semi-bounded domain; note the conditions require a linear change of variables before the method can be applied.
pde__17 ≔ diffux, t, t = 14⋅ diffux, t, x, x
This method applies to wave PDE, with or without a source, in semi-infinite domains.
A wave PDE in a semi-bounded domain:
pde__18 ≔ diffux, t, t, t − 9⋅ diffux, t, x, x = 0
A wave PDE in a semi-bounded domain with non-homogeneous conditions:
Sturm-Liouville problem with eigenvalues that are the roots of algebraic expressions which cannot be inverted
When using the Fourier Series method, explained above, there are times when the eigenvalue(s) are roots of an algebraic expression whose inversion cannot be expressed using known mathematical functions.
As an example, consider a problem representing the temperature distribution in a thin rod whose lateral surface is insulated over the interval 0<x<1, with the left end of the rod insulated and the right end experiencing a convection heat loss, as explained in Articolo's example 3.6.4 (see References below)
pde__20 ≔ diffux,t,t=k⋅diffux,t,x,x
To test and plot the solution, we start with
solution ≔ lhs= op1, rhs
By inspection, solution has sin⁡λn and cos⁡λn, not tan⁡λn; we rewrite equation (54) and isolate cosλn:
condition ≔ isolateconvert, sincos, cos⁡λn
Substitute now this condition in the solution and start by pdetesting
pdetestsubscondition,solution, pde__20, conds__20
A further manipulation, substituting condition and combining the sums, results in
So the PDE and two of the conditions are satisfied without having to specify who is λ__n - it sufficed to use cos⁡λn=sin⁡λn⁢λn, and this is the case of most of the problems we analyzed: the exact closed form of λ__n is really not needed in these examples.
For the one expression which remains to be proved equal to zero, there is no clear way to perform the sum and show that it is equal to 1−x34 without further information on the value of λ__n. So this part must be tested using a plot.
Now, perform the summation using, say, the first 100 terms of the series; for that purpose, the first 100 positive values of λ__n are needed. These values can be obtained using fsolve. Increase Digits to get a better approximation:
Digits ≔ 20:
L ≔ fsolvecondition, lambdan,0..1010,maxsols=100:
For convenience, construct a procedure, as a function of n, that returns each of these values:
Lambda ≔ n → if n∷nonnegint then Ln+1 else 'Lambdaargs' fi;
Replace λ__n by Λn, infinity by 99 and the expression to be plotted is
remain ≔ subslambdan = Lambdan,infinity = 99, 2
Perform the sum and plot. The plotting range is the one present in the conds__20, x from 0 to 1:
R ≔ evalremain,Sum=add:
With the first 100 terms (constructed using the first 100 roots of tan⁡λn⁢λn−1=0) we verified that the last of the four testing conditions is sufficiently close to zero, and this concludes the verification.
To plot the solution, the idea is the same: in solution, give a value to k, say k = 1/5, and then construct the sum of the first 100 terms as done in remain, but this time using solution instead of the pdetest result.
subsk = 15, lambdan = Lambdan,infinity = 99, solution
S ≔ eval,Sum=add:
Compare with the numerical solution one could obtain using pdsolve with the numeric option. Substitute k=15in pde__20, and construct the corresponding plot:
numerical_solution ≔ pdsolvesubsk=15, pde__20,conds__20,numeric, time=t, range = 0..1
Articolo, George A. Partial Differential Equations and Boundary Value Problems with Maple. 2nd ed., Elsevier Academic Press, 2009.
Logan, David J. Applied Partial Differential Equations. 3rd ed., Springer, 2015.
Pinchover, Y. and Rubinstein, J.. An Introduction to Partial Differential Equations. Cambridge UP, 2005.
Polyanin, Andrei D. Handbook of Linear Partial Differential Equations for Engineers and Scientists. Chapman & Hall/CRC, 2002.
For more information on Maple 2019 changes, see Updates in Maple 2019.
more examples with boundary conditions
Download Help Document