This code goes over the exact same model problems discussed in problem one on this assignment, but now it uses an implicit setup to evaluate the examples.
Input: A method for solving the examples
Output: The solutions given by the method
Usage/Example:
Output:
Notice how the output for the first two examples still has very high error. I’m still not completely sure why this happened (as there was very little error when testing the exact same code for the last assignment), but it is easy to see that the error is very small for \(7.3\), which is very different from the case with Explicit Euler. This is because Implicit Euler is absolutely stable for a much more comprehensive region than Explicit Euler.
We can also increase the step size and see that Implicit Euler still remains convergent as it is much more stable than Explicit Euler.
Implementation/Code:
All solver implementation for this assignment was covered in the last assignment.