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

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Differential Equations : PDEtools : pdetest

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

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.

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

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

(1)

ans:=pdsolvePDE

ans:=fx,y,z,t=_F1x+_F2y+_F5z,t &where ⅆ5ⅆx5_F1x=ln_c1gx,ⅆ4ⅆy4_F2y=_c1hy,_F5z,t, are arbitrary functions.

(2)

pdetestans,PDE

0

(3)

PDE:=yfx,yyarctanx12y+xfx,yxarctanx12y=0

PDE:=yfx,yyarctanxy+xfx,yxarctanxy=0

(4)

ans:=pdsolvePDE

ans:=fx,y=_F12x2+y2

(5)

pdetestans,PDE

0

(6)

PDE:=xyfx,y2xfx,y=fx,y

PDE:=xyfx,y2xfx,y=fx,y

(7)

ans:=pdsolvePDE,HINT=strip

ans:=xyfx,y2xfx,yfx,y=0 &where f_s=_C42_sⅇ_s_C2+_C1ⅇ2_s,x_s=_s+_C5,y_s=2_s+_C5+1_C4ⅇ_s+_C3,_p1_s=_C42ⅇ_s+_C2ⅇ_s,_p2_s=_C4ⅇ_s,_p1=xfx,y,_p2=yfx,y

(8)

pdetestans,PDE

0

(9)

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

PDE:=xyfx,yxfx,y=fx,y

PDE:=xyfx,yxfx,y=fx,y

(10)

Next, give an ansatz.

ansatz:=fx,y=Fxⅇy

ansatz:=fx,y=Fxⅇy

(11)

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

ans_1:=pdetestansatz,PDE

ans_1:=ⅇyxFxFxⅆⅆxFx

(12)

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

factorans_1

ⅇyxFxFxⅆⅆxFx

(13)

ans_F:=dsolveans_1,Fx

ans_F:=Fx=_C1ⅇ12xx2

(14)

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

ans:=subsans_F,ansatz

ans:=fx,y=_C1ⅇ12xx2ⅇy

(15)

pdetestans,PDE

0

(16)

Test solutions for PDE systems.

sys:=tux,t=2x2ux,tvx,t,tvx,t=2x2vx,tux,t

sys:=tux,t=2x2ux,tvx,t,tvx,t=2x2vx,tux,t

(17)

sol:=pdsolvesys,ux,t,vx,t

sol:=ux,t=_C1cosx+_C2ⅇx+_C3sinx+_C4ⅇx+ⅇt_C6+_C5ⅇt,vx,t=ⅇt_C6+_C5ⅇt_C1cosx+_C2ⅇx_C3sinx+_C4ⅇx

(18)

pdetestsol,sys

0,0

(19)

Consider the following PDE, boundary condition, and solution

pde:=tux,t=kxxux,t+Q

pde:=tux,t=k2x2ux,t+Q

(20)

bc1:=u0,t=2ⅇkt1Qk

bc1:=u0,t=2ⅇktQk

(21)

sol:=ux,t=_C12ⅇx+kt_C122ⅇx+kt1Qx22k+1Q_C122x_C12k1Qk

sol:=ux,t=_C12ⅇkt+x_C122ⅇktx12Qx2k+Q_C122x_C12kQk

(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:

bc2:=D1,1u0,t=2ⅇkt1Qk

bc2:=D1,1u0,t=2ⅇktQk

(24)

pdetestsol,pde,bc2

0,0

(25)

See Also

dchange, PDEtools, pdsolve, splitstrip, strip


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam