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.
>


 (1) 
>


 (2) 
>


 (3) 
>


 (4) 
>


 (5) 
>


 (6) 
>


 (7) 
>


 (8) 
>


 (9) 
You can use pdetest to solve a PDE. First, define the PDE.
>


 (10) 
Next, give an ansatz.
>


 (11) 
Use pdetest to simplify the PDE with regard to the ansatz above.
>


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


 (13) 
>


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


 (15) 
>


 (16) 
Test solutions for PDE systems.
>


 (17) 
>


 (18) 
>


 (19) 
Consider the following PDE, boundary condition, and solution
>


 (20) 
>


 (21) 
>


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


 (23) 
The boundary conditions can involve derivatives:
>


 (24) 
>


 (25) 


Download Help Document
Was this information helpful?