Wolfram ResearchPRODUCTSPURCHASEFOR USERSCOMPANYOUR SITES
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.

Verification of the Solution

The solution given by DSolve can be verified using various methods. The easiest method involves substituting the solution back into the equation. If the result is True, the solution is valid.

In this simple example, the solution is verified by substitution. Note that the first argument to DSolve is assigned to eqn for convenience in later work.

In[447]:= 
In[448]:= 

Out[448]=

In[449]:= 

Out[449]=

In this example, the equation and an initial condition are verified by substitution.

In[450]:= 
In[451]:= 

Out[451]=

In[452]:= 

Out[452]=

Sometimes the result of the substitution is more complicated than True or False. Such examples can be verified by using Simplify to simplify the result of the substitution. If the simplified result is True, the solution is valid.

Here is the general solution for a second-order inhomogeneous equation.

In[453]:= 
In[454]:= 

Out[454]=

This substitutes the solution back into the equation.

In[455]:= 

Out[455]=

The solution can be verified using Simplify.

In[456]:= 

Out[456]=

Here is a linear PDE whose solution can be verified using Simplify.

In[457]:= 
In[458]:= 

Out[458]=

In[459]:= 

Out[459]=

If the equation involves special functions, it may be necessary to use FullSimplify to verify the solution.

Here is an example of this type involving Bessel's functions.

In[460]:= 
In[461]:= 

Out[461]=

In[462]:= 

Out[462]=

If the solution is large or if Simplify and FullSimplify do not succeed in verifying the solution, a numerical check can be made by using Random to generate values for all the variables and parameters in the problem. It is advisable in such cases to repeat the check with several sets of random values.

Here is an example where numerical verification is useful.

In[463]:= 
In[464]:= 
In[465]:= 

Out[465]=

In[466]:= 

Out[466]=

Although numerical checks cannot verify a solution with certainty, more rigorous checks can be made by using higher precision or by allowing the variables to take complex values.

This verifies the previous solution with higher precision.

In[467]:= 

Out[467]=

This uses complex random values to verify the previous solution.

In[468]:= 
In[469]:= 

Out[469]=

The previous methods are of use only when the solution is available in explicit form. The next example shows how to verify the solution of a first-order ODE when it is given in implicit form.

This solves a first-order ODE.

In[470]:= 
In[471]:= 

Out[471]=

In[472]:= 

Out[472]=

This verifies the solution by simplifying its derivative.

In[473]:= 

Out[473]=

Finally, the following example shows how to verify the solution for a nonlinear second-order ODE.

This solves the equation.

In[474]:= 

Out[474]=

This differentiates the first solution, solves for  , and simplifies the expression.

In[475]:= 

Out[475]=

This differentiates sol21 to find  .

In[476]:= 

Out[476]=

This eliminates the arbitrary parameter C[1] and gives a form of the original equation.

In[477]:= 

Out[477]=

The second solution can be verified in a similar manner.


Any questions about topics on this page? Click here to get an individual response.Buy NowFree TrialMore Information



 © 2009 Wolfram Research, Inc.  Terms of Use  Privacy Policy |
Sign up for our newsletter: