pdsolve/boundaryconditions
find solutions for partial differential equations (PDEs) with boundary and/or initial conditions
Calling Sequence
Parameters
Description
Examples
References
Compatibility
pdsolve([PDE, conds], f, hint)
PDE
-
a partial differential equation or system thereof
conds
initial or boundary conditions
f
indeterminate function or its name; or a set or list of them, required when there is more than one differentiated function
hint
(optional): HINT = `+`, HINT = `*`, HINT = boundedseries,
HINT = boundedseries(variable = value), HINT = boundedseries(variable = [values])
method
(optional): method = method1, method = [method1, method2, ...], exclude = method1, exclude = [method1, method2, ...]
option
(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`:
indices`pdsolve/BC/methods`
1,2,3,2,Series,2,Wave,high_order,system,2,Heat,2,SpecializeArbitraryFunctions
So, for example, the methods for PDEs of first order and second order are, respectively,
`pdsolve/BC/methods`1
SpecializeArbitraryFunctions,Fourier,Laplace,Generic,PolynomialSolutions,LinearDifferentialOperator
`pdsolve/BC/methods`2
SpecializeArbitraryFunctions,SpecializeArbitraryConstants,Wave,Heat,Series,Laplace,Fourier,Generic,PolynomialSolutions,LinearDifferentialOperator,Superposition
Some methods have sub-methods:
`pdsolve/BC/methods`2,Series
TwoBC,ThreeBCsincos,FourBC,ThreeBC,ThreeBCPeriodic,WithSourceTerm,ThreeVariables
`pdsolve/BC/methods`2,Heat
SemiInfiniteDomain,WithSourceTerm
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).
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.
Conventions
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
pde__1≔∂∂tu⁡x,t=∂2∂x2u⁡x,t4
conds__1≔uA,t=0,ux,B=10:
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.
pdsolvepde__1,conds__1assuming absA<x,absB<t
u⁡x,t=−10⁢erf⁡−x+At−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
pde__2≔∂2∂t2u⁡x,t−c2⁢∂2∂x2u⁡x,t=f⁡x,t
conds__2≔ux,1=gx,D2ux,1=hx:
pdsolve⁡pde__2,conds__2,u⁡x,t
u⁡x,t=∫0t−1∫−t+τ+1⁢c+xx+c⁢t−1−τⅆ2ⅆζ2h⁡ζ⁢c2⁢τ+ⅆ2ⅆζ2g⁡ζ⁢c2+f⁡ζ,τ+1ⅆζⅆτ+2⁢t−2⁢c⁢h⁡x+2⁢g⁡x⁢c2⁢c
You can ask pdetest to test the solution against the original problem, if desired:
pdetest,pde__2,conds__2
0,0,0
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
pde__3≔I⁢ℏ⁢∂∂tf⁡x,t=−ℏ2⁢∂2∂x2f⁡x,t2⁢m
conds__3 ≔ f0, t = 0, fL, t = 0 :
pdsolvepde__3,conds__3, fx, t assuming L > 0
f⁡x,t=∑n=1∞⁡_C1⁡n⁢sin⁡n⁢π⁢xL⁢ⅇ−I2⁢ℏ⁢π2⁢n2⁢tm⁢L2
An example with the wave PDE:
pde__4 ≔ diffux, t, t, t = c2 diffux, t, x, x
pde__4≔∂2∂t2u⁡x,t=c2⁢∂2∂x2u⁡x,t
conds__4 ≔ u0, t = 0, D1uL, t = 0, D2ux, 0 = 0, ux, 0 = fx:
pdsolvepde__4, conds__4, ux, t assuming 0< x ≤ L
u⁡x,t=∑n=0∞⁡2⁢sin⁡1+2⁢n⁢π⁢x2⁢L⁢cos⁡c⁢1+2⁢n⁢π⁢t2⁢L⁢∫0Lsin⁡1+2⁢n⁢π⁢x2⁢L⁢f⁡xⅆxL
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
pde__5≔∂∂tu⁡r,θ,t=∂∂ru⁡r,θ,t+r⁢∂2∂r2u⁡r,θ,t+∂2∂θ2u⁡r,θ,tr25⁢r
conds__5≔D1u1,θ,t=0,ur,0,t=0,ur,π,t=0,ur,θ,0=r−13⁢r3⁢sinθ:
pdsolve⁡pde__5,conds__5
u⁡r,θ,t=casesplit/ans⁡Sum⁡−43⁢BesselJ⁡1,λn⁢r⁢sin⁡θ⁢exp⁡−125⁢λn2⁢t⁢BesselJ⁡0,λn⁢λn3−BesselJ⁡1,λn⁢λn2+4⁢λn⁢BesselJ⁡0,λn−8⁢BesselJ⁡1,λnλn3⁢BesselJ⁡0,λn2⁢λn+BesselJ⁡1,λn2⁢λn−2⁢BesselJ⁡0,λn⁢BesselJ⁡1,λn,n=0..∞,And⁡−BesselJ⁡1,λn+BesselJ⁡2,λn⁢λn=0,0<λn
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
conds__5.1≔u1,θ,t=0,ur,0,t=0,ur,π,t=0,ur,θ,0=r−13⁢r3⁢sinθ:
pdsolvepde__5,conds__5.1
u⁡r,θ,t=casesplit/ans⁡Sum⁡−43⁢BesselJ⁡1,λn⁢r⁢sin⁡θ⁢exp⁡−125⁢λn2⁢t⁢λn2+4BesselJ⁡0,λn⁢λn3,n=1..∞,And⁡λn=BesselJZeros⁡1,n,0<λn
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
pde__6≔∂∂ru⁡r,θ+r⁢∂2∂r2u⁡r,θr+∂2∂θ2u⁡r,θr2=0
conds__6≔u⁡1,θ=f⁡θ,u⁡r,−π=u⁡r,π,D2⁡u⁡r,−π=D2⁡u⁡r,π:
pdsolvepde__6, conds__6, ur, theta,HINT = boundedseriesr=infinity
u⁡r,θ=2⁢∑n=1∞⁡∫−ππf⁡θ⁢sin⁡n⁢θⅆθ⁢sin⁡n⁢θ+∫−ππf⁡θ⁢cos⁡n⁢θⅆθ⁢cos⁡n⁢θ⁢r−nπ⁢π+∫−ππf⁡θⅆθ2⁢π
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
u⁡r,θ=2⁢∑n=1∞⁡rn⁢∫−ππf⁡θ⁢sin⁡n⁢θⅆθ⁢sin⁡n⁢θ+∫−ππf⁡θ⁢cos⁡n⁢θⅆθ⁢cos⁡n⁢θπ⁢π+∫−ππf⁡θⅆθ2⁢π
Generic method
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
pde__7≔∂2∂x2u⁡x,y+∂2∂y2u⁡x,y=0
conds__7≔ux,0=Diracx:
When the Fourier method is specified, pdsolve returns:
pdsolvepde__7, conds__7,method=Fourier
u⁡x,y=invfourier⁡ⅇ−s⁢y,s,x
which we can convert to integral form:
convert,Int;
u⁡x,y=∫−∞∞ⅇ−s⁢y+I⁢s⁢xⅆs2⁢π
When method = Generic is specified, pdsolve's solution includes an arbitrary function _F2:
pdsolvepde__7,conds__7,method=Generic
u⁡x,y=−_F2⁡−y+I⁢x+δ⁡x+I⁢y+_F2⁡y+I⁢x
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
pde__8≔∂2∂r2u⁡r,θ+∂2∂θ2u⁡r,θ=0
conds__8≔u2,θ=3⁢sin2⁢θ+1:
With method = Generic, pdsolve returns:
pdsolvepde__8,conds__8,method=Generic
u⁡r,θ=1−_F2⁡θ−I⁢r+4⁢I−3⁢sin⁡−2⁢θ+2⁢I⁢r−4⁢I+_F2⁡θ+I⁢r
With method = Fourier, pdsolve uses a Fourier transform to obtain:
pdsolve⁡pde__8,conds__8,method=Fourier
u⁡r,θ=3⁢I⁢ⅇ2⁢r−4−2⁢I⁢θ2−3⁢I⁢ⅇ−2⁢r+4+2⁢I⁢θ2+1
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
pde__9≔∂2∂t2u⁡x,t=c2⁢∂2∂x2u⁡x,t−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:
Typesetting:-EnableTypesetRuleTypesetting:-SpecialFunctionRules:
If we ask pdsolve to solve this problem without the condition of boundedness of the solution, we obtain:
pdsolvepde__9,conds__9,ux,tassuming 0<t,0<x,0<c
u⁡x,t=−g⁢−x2+2⁢c⁢t⁢xx<c⁢tc2⁢t2+x2c⁢t<x2⁢c2
If we now ask for a bounded solution, by means of the option HINT = boundedseries, pdsolve simplifies the problem accordingly.
pdsolvepde__9,conds__9,HINT=boundedseriesassuming 0<t,0<x,0<c
u⁡x,t=g⁢θ⁡t−xc⁢c⁢t−x2−c2⁢t22⁢c2
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
pde__10≔∂∂tu⁡x,t=∂2∂x2u⁡x,t+m
conds__10≔ux,0=sinx:
pdsolvepde__10,conds__10
u⁡x,t=sin⁡x⁢ⅇ−t+m⁢t
A third order PDE problem:
pde__11 ≔ diffux, t, t = −diffux, t, x, x, x
pde__11≔∂∂tu⁡x,t=−∂3∂x3u⁡x,t
conds__11≔ux,0=fx:
pdsolvepde__11, conds__11
u⁡x,t=∫−∞∞4⁢π⁢f⁡−ζ⁢−x+ζ−t13⁢K13⁡−2⁢3⁢x+ζ⁢−x+ζ−t139⁢−t133⁢−t13ⅆζ4⁢π2
Linear Differential Operator method
This method is for problems of the form
∂∂tw=Mw, wx__i,0=fx__i
or
∂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
pde__12≔∂2∂t2w⁡x1,x2,x3,t=∂2∂x1∂x2w⁡x1,x2,x3,t+∂2∂x1∂x3w⁡x1,x2,x3,t+∂2∂x32w⁡x1,x2,x3,t−∂2∂x2∂x3w⁡x1,x2,x3,t
conds__12 ≔ wx1, x2, x3, 0 = x13⋅x32+sinx1, D4wx1, x2, x3, 0 = cosx1−x2⋅x3:
pdsolvepde__12,conds__12
w⁡x1,x2,x3,t=t4⁢x12+t2⁢x13+3⁢t2⁢x12⁢x3+x13⁢x32+t36−x2⁢x3⁢t+cos⁡x1⁢t+sin⁡x1
SpecializeArbitraryFunctions method
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
pde__13≔∂2∂t2u⁡x,t−4⁢∂2∂x2u⁡x,t=f⁡a
conds__13 ≔ ux,0=0,D2ux,0 = x2:
pdsolvepde__13,conds__13;
u⁡x,t=f⁡a⁢t22+4⁢t33+t⁢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
pde__14≔∂2∂x2u⁡x,y+y⁢∂2∂y2u⁡x,y=0
conds__14≔ux,0=0,D2ux,0=x2:
pdsolve⁡pde__14,conds__14,u⁡x,y
u⁡x,y=y⁢x2−y
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
sys__15≔∂∂yu⁡x,y=−∂∂xv⁡x,y,∂∂xu⁡x,y=∂∂yv⁡x,y
conds__15≔ux,0=x11,vx,0=0:
pdsolvesys__15,conds__15,method=PolynomialSolutions
The degree seen in the initial conditions is given below to find a solution:
pdsolvesys__15,conds__15,ux,y,vx,y, method=PolynomialSolutions,degree=11
u⁡x,y=x11−55⁢y2⁢x9+330⁢y4⁢x7−462⁢y6⁢x5+165⁢y8⁢x3−11⁢y10⁢x,v⁡x,y=11⁢y⁢x10−165⁢y3⁢x8+462⁢y5⁢x6−330⁢y7⁢x4+55⁢y9⁢x2−y11
Superposition method
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
pde__16≔∂2∂x2u⁡x,y+∂2∂y2u⁡x,y=0
conds__16≔u0,y=0,uπ,y=sinhπ⁢cosy,ux,0=sinx,ux,π=−sinhx:
pdsolve⁡pde__16,conds__16
u⁡x,y=ⅇ2⁢π−1⁢∑n=1∞⁡−1n⁢n⁢ⅇ2⁢π−1⁢ⅇn⁢π−y−π⁢sin⁡n⁢x⁢ⅇ2⁢n⁢y−1π⁢n2+1⁢ⅇ2⁢π⁢n−1+ⅇ2⁢π−1⁢∑n=2∞⁡2⁢sin⁡n⁢y⁢ⅇn⁢π−x⁢sinh⁡π⁢n⁢−1n+1⁢ⅇ2⁢n⁢x−1π⁢ⅇ2⁢π⁢n−1⁢n2−1+sin⁡x⁢−ⅇy+ⅇ−y+2⁢πⅇ2⁢π−1
Heat method
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
pde__17≔∂∂tu⁡x,t=∂2∂x2u⁡x,t4
conds__17≔D1uα,t=0,ux,β=10⁢exp−x2:
pdsolvepde__17,conds__17,u⁡x,tassuming 0<x,0<t
u⁡x,t=−5⁢erf⁡t−β−1⁢α+xt−β⁢t−β+1−1⁢ⅇ4⁢α⁢−x+α−t+β−1+erf⁡t−β+1⁢α−xt−β⁢t−β+1−1⁢ⅇx2−t+β−1t−β+1
Wave method
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
pde__18≔∂2∂t2u⁡x,t−9⁢∂2∂x2u⁡x,t=0
conds__18≔D1u0,t=0,ux,0=0,D2ux,0=x3:
pdsolvepde__18,conds__18assuming 0<x,0<t
u⁡x,t=108⁢t3⁢x+12⁢t⁢x33⁢t<x81⁢t4+54⁢t2⁢x2+x4x<3⁢t12
A wave PDE in a semi-bounded domain with non-homogeneous conditions:
pde__19≔∂2∂t2u⁡x,t=c2⁢∂2∂x2u⁡x,t
conds__19≔u⁡x,0=sin⁡x3,D2⁡u⁡x,0=1−ⅇ−110⁢x,D1⁡u⁡0,t=1:
pdsolvepde__19,conds__19,ux,tassumingt>0and x>0;
u⁡x,t=sin⁡c⁢t+x3⁢c−sin⁡c⁢t−x3⁢c+2⁢c⁢t−10⁢ⅇc⁢t10−x10+10⁢ⅇ−c⁢t10−x10c⁢t<x10⁢ⅇ−c⁢t10−x10+10⁢ⅇ−c⁢t10+x10+sin⁡c⁢t−x3⁢c+sin⁡c⁢t+x3⁢c−20−2⁢c2⁢t+2⁢t+2⁢x⁢cx<c⁢t2⁢c
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
pde__20≔∂∂tu⁡x,t=k⁢∂2∂x2u⁡x,t
conds__20≔u⁡x,0=1−14⁢x3,D1⁡u⁡0,t=0,D1⁡u⁡1,t+u⁡1,t=0:
pdsolvepde__20,conds__20
u⁡x,t=casesplit/ans⁡Sum⁡3⁢exp⁡−k⁢λn2⁢t⁢−λn2+2⁢cos⁡λn−2+λn3+2⁢λn⁢sin⁡λn⁢cos⁡λn⁢xλn3⁢sin⁡2⁢λn+2⁢λn,n=0..∞,And⁡tan⁡λn⁢λn−1=0,0<λn
To test and plot the solution, we start with
solution ≔ lhs= op1, rhs
solution≔u⁡x,t=∑n=0∞⁡3⁢ⅇ−k⁢λn2⁢t⁢−λn2+2⁢cos⁡λn−2+λn3+2⁢λn⁢sin⁡λn⁢cos⁡λn⁢xλn3⁢sin⁡2⁢λn+2⁢λn
op2,2,1,1,
tan⁡λn⁢λn−1=0
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
condition≔cos⁡λn=sin⁡λn⁢λn
Substitute now this condition in the solution and start by pdetesting
pdetestsubscondition,solution, pde__20, conds__20
0,∑n=0∞⁡12⁢sin⁡λn⁢λn−6⁢cos⁡λn⁢xλn3⁢sin⁡2⁢λn+2⁢λn−1+x34,0,∑n=0∞⁡−12⁢λn⁢sin⁡λn2+6⁢sin⁡λn⁢ⅇ−k⁢λn2⁢tλn2⁢sin⁡2⁢λn+2⁢λn+∑n=0∞⁡12⁢sin⁡λn⁢λn−6⁢cos⁡λn⁢ⅇ−k⁢λn2⁢tλn3⁢sin⁡2⁢λn+2⁢λn
A further manipulation, substituting condition and combining the sums, results in
simplifycombinesubscondition,,Sum
0,∑n=0∞⁡12⁢sin⁡λn⁢λn−6⁢cos⁡λn⁢xλn3⁢sin⁡2⁢λn+2⁢λn−1+x34,0,0
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;
Λ≔n↦ifn::'nonnegint'thenLn+1elseΛ⁡argsendif
Replace λ__n by Λn, infinity by 99 and the expression to be plotted is
remain ≔ subslambdan = Lambdan,infinity = 99, 2
remain≔∑n=099⁡12⁢sin⁡Λ⁡n⁢Λ⁡n−6⁢cos⁡Λ⁡n⁢xΛ⁡n3⁢sin⁡2⁢Λ⁡n+2⁢Λ⁡n−1+x34
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:
plotR,x=0..1
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
u⁡x,t=∑n=099⁡3⁢ⅇ−Λ⁡n2⁢t5⁢−Λ⁡n2+2⁢cos⁡Λ⁡n−2+Λ⁡n3+2⁢Λ⁡n⁢sin⁡Λ⁡n⁢cos⁡Λ⁡n⁢xΛ⁡n3⁢sin⁡2⁢Λ⁡n+2⁢Λ⁡n
S ≔ eval,Sum=add:
plot3drhsS,x=0..1, t=0..1
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
numerical_solution≔module...end
numerical_solution:-plot3dt=0..1,x=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.
See Also
dchange
dsolve
pdetest
PDEtools
PDEtools[PDEsplot]
pdsolve
pdsolve/numeric
pdsolve/series
pdsolve/system
more examples with boundary conditions
Download Help Document