pdetest - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


pdetest

test the solutions found by pdsolve for partial differential equations (PDEs) and PDE systems

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

pdetest(sol, PDE)

Parameters

sol

-

solution for PDE

PDE

-

partial differential equation, or a set or list of them representing a system that can also include boundary conditions

Description

• 

The pdetest command returns either 0 (when the PDE is annulled by the solution sol), indicating that the solution is correct, or a remaining algebraic expression (obtained after simplifying the PDE with respect to the proposed solution), indicating that the solution might be wrong.

• 

When PDE is a system, given as a set or list, possibly including boundary conditions, for each of the elements in the set/list pdetest will return a 0 or the remaining algebraic expression; the advantage of giving PDE as a list is that you can thus determine which element (if any) is not satisfied by the solution.

• 

The pdetest command can also be used to reduce a PDE to a simpler problem by giving an "ansatz", instead of an explicit solution, since it will return the nonzero remaining part.

Examples

Define a PDE, solve it, and then test the solution.

PDEexpdifffx,y,z,t,`$`x,5+difffx,y,z,t,`$`y,4gxhy=0

PDEⅇ5x5fx,y,z,t+4y4fx,y,z,tgxhy=0

(1)

anspdsolvePDE

ansfx,y,z,t=f__1x+f__2y+f__5z,twhereⅆ4ⅆy4f__2y=_c1hy,ⅆ5ⅆx5f__1x=ln_c1gx,f__5z,t, are arbitrary functions.

(2)

pdetestans,PDE

0

(3)

PDEdifffx,y,yDiffarctanx12y,y+difffx,y,xDiffarctanx12y,x=0

PDEyfx,yⅆⅆyarctanxy+xfx,yⅆⅆxarctanxy=0

(4)

anspdsolvePDE

ansfx,y=f__12x2+y2

(5)

pdetestans,PDE

0

(6)

PDExdifffx,y,y2difffx,y,x=fx,y

PDExyfx,y2xfx,y=fx,y

(7)

anspdsolvePDE,HINT=strip

ansxyfx,y2xfx,yfx,y=0wheref_s=_sc__42ⅇ_sc__2+c__1ⅇ2_s,x_s=_s+c__5,y_s=2_s+c__5+1c__4ⅇ_s+c__3,_p1_s=c__42ⅇ_s+c__2ⅇ_s,_p2_s=c__4ⅇ_s,and_p1=xfx,y,_p2=yfx,y

(8)

pdetestans,PDE

0

(9)

You can use pdetest to solve a PDE.  First, define the PDE.

PDExdifffx,y,ydifffx,y,x=fx,y

PDExyfx,yxfx,y=fx,y

(10)

Next, give an ansatz.

ansatzfx,y=Fxexpy

ansatzfx,y=Fxⅇy

(11)

Use pdetest to simplify the PDE with regard to the ansatz above.

ans_1pdetestansatz,PDE

ans_1ⅇyFxxⅆⅆxFxFx

(12)

The ansatz above separated the variables, so the PDE can now be solved for F(x).

factorans_1

ⅇyFxxⅆⅆxFxFx

(13)

ans_Fdsolveans_1,Fx

ans_FFx=c__1ⅇxx22

(14)

Now, build a (particular) solution to the PDE by substituting the result above in "ansatz".

anssubsans_F,ansatz

ansfx,y=c__1ⅇxx22ⅇy

(15)

pdetestans,PDE

0

(16)

Test solutions for PDE systems.

sysdiffux,t,t=diffux,t,`$`x,2vx,t,diffvx,t,t=diffvx,t,`$`x,2ux,t

systux,t=2x2ux,tvx,t,tvx,t=2x2vx,tux,t

(17)

solpdsolvesys,ux,t,vx,t

solux,t=c__1cosx+c__2ⅇx+c__3sinx+c__4ⅇx+ⅇtc__6+c__5ⅇt,vx,t=ⅇtc__6+c__5ⅇtc__1cosx+c__2ⅇxc__3sinx+c__4ⅇx

(18)

pdetestsol,sys

0,0

(19)

Consider the following PDE, boundary condition, and solution

pdediffux,t,t=kdiffdiffux,t,x,x+Q

pdetux,t=k2x2ux,t+Q

(20)

bc1u0,t=2expkt1kQ

bc1u0,t=2ⅇktQk

(21)

solux,t=_C12expx+kt_C122expx+kt12kQx2+1_C12kQ_C122x1kQ

solux,t=c__12ⅇkt+xc__122ⅇktxQx22k+Qc__122xc__12kQk

(22)

You can test whether the sol solves pde using pdetest; the novelty is that you can now test whether it solves the boundary condition bc[1]

pdetestsol,pde,bc1

0,0

(23)

The boundary conditions can involve derivatives:

bc2D1,1u0,t=2expkt1kQ

bc2D1,1u0,t=2ⅇktQk

(24)

pdetestsol,pde,bc2

0,0

(25)

See Also

dchange

PDEtools

pdsolve

splitstrip

strip