Question: Consider the differential equation dy dt + 2y = e t , y(0) = 1. a. Calculate the exact solution y(2). b. Now use Eulers
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 Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
