Using Mathematica's DSolve function on Example used for Finite Differencing Examples

Mathematica's DSolve function finds closed-form expressions for solutions to differential equations, when possible. There is a related function called NDSolve that finds numerical solutions that can be used when DSolve gives up. Here are some examples of using DSolve:

"index_96.gif"

"index_97.gif"

"index_98.gif"

Note that the solution is given as a rule, just like for the function Solve. Because no initial condition was specified, the solution involves an unknown constant, C[1].   In the next  case an initial condition was specified for the differential equation, so there is no undetermined constant in the solution.

"index_99.gif"

"index_100.gif"

"index_101.gif"

"index_102.gif"

The next statement extracts y (x) for plotting ...

"index_103.gif"

"index_104.gif"


Created by Wolfram Mathematica 6.0  (06 November 2007) Valid XHTML 1.1!