Consider the differential equation dy dt + 2y = e t , y(0) = 1. a. Calculate
Question:
Consider the differential equation dy dt
+ 2y = e t
, y(0) = 1.
a. Calculate the exact solution y(2).
b. Now use Euler’s method to calculate approximate values of y(2) using h = 1.0, 0.5, 0.25, 0.125 and h = 0.0625.
Don’t do this by hand! Use a computer.
c. Calculate the error (i.e., the difference between the approximate value and the true value) for each value of h.
d. Plot the absolute value of the error against h. What do you notice about how the error depends on h?
Step by Step Answer:
Related Book For
Mathematics And Statistics For Science
ISBN: 9783031053177
1st Edition
Authors: James Sneyd, Rachel M. Fewster, Duncan McGillivray
Question Posted: