Dr. Kevin G. TeBeest
As always, rework my class examples SUCCESSFULLY ON YOUR OWN before attempting the homework.
Preliminary Questions:
- How many solutions does an ordinary differential equation (ODE) generally have?
- What point is described by the initial condition y(4) = 7?
- Suppose we have ODE y′ = y cos x. What is the slope of the solution at point (π, 5)?
As a follow-up to this, what is f (xn , yn )?
What is f (xn+1 , yn+1 )?- Suppose we have ODE y′ = x cos y. What is the slope of the solution at point (π, 5)?
As a follow-up to this, what is f (xn , yn )?
What is f (xn+1 , yn+1 )?This is a running assignment. Work through these problems AS we cover each method.
PROBLEM: Approximate the solution of the initial value problem (IVP)
y' = 5 sin(2x) – y , y(0) = –1 ,
from x = 0 to x = 1 with stepsize h = 0.2 using:
- Euler's method,
- the implicit Euler method,
- the trapezoidal method,
- the modified Euler (predictor-corrector) method, (Make sure you can do this method! Hint hint!)
- the classical Runge-Kutta method. (Compute y1 and y2 only.)
For comparison, from MATH-204 we find that the exact solution of the IVP is
y*(x) = e–x + sin(2x) – 2 cos(2x) . In each method above, determine the error of the approximation at each node. For example, the error at node n is
En = y*(xn) – yn . Here are the ANSWERS you should obtain.