Heun Method - Exercise 4 Solution
Numerical Methods for Solving Differential Equations
Heun's Method
Mathematica Implementation
(continued from last page...)
Solution to Exercise 4
Solution Name |
Differential Equation |
Initial Condition |
Solve up to |
Number of Steps |
---|---|---|---|---|
heunex4 | y′ = (x - y)2 | y(0) = 0.5 | x = 0.5 | 20 |
Your solution, in tabular form, should have looked something like this:
And your plot of this solution should have looked something like this (though your points may not have been this size, or in color):
If your solution doesn't match what you see here, then go back to Mathematica and carefully check the parameters that you passed to the heun program. If necessary, change them, and reevaluate the commands.
Now, back to the exercises...