Consider the autonomous first-order ODE:
dy/dt = y - 0.1y^2
y0 = 1
Use Euler's method to solve for t = 2, using a step size of dt = 1 (so just two steps). Show your work.
The true solution to the problem is:
yt = 10e^t/(9+e^t).
What is the absolute error in Euler's approximation at t = 2?
Based on your understanding of Euler's method, how small must your step size be in order to have the error at t = 2 be below 0.001? How many steps would that require? Explain.
Use the 4th order Runge-Kutta method to solve for t = 2, using a step size of dt = 1 (that is, do just two steps). Show your work.
The true solution to the problem is:
yt = 10e^t/(9+e^t).
What is the absolute error in the Runge-Kutta approximation at t = 2?
Based on your understanding of the 4th order Runge-Kutta method, how small must your step size be in order to have the error at t = 2 be below 0.001? How many steps would that require? Explain.
How are the time steps in parts c and f related? Which method would be quicker, for the same level of accuracy?