Lab 21 · Lecture 21 · ODEs I: Taylor, Picard and Euler Methods
Euler and Heun Lab
Step your own differential equations with Euler and modified Euler, see the slope field, and measure how the error depends on h.
Type y′ = f(x, y) (use x and y), the initial point, the step h and the end point. Give the exact solution if you know it. The table shows every step of the first ticked method.
Euler and Heun
Try this
Step size study
Try this
Q1 Derive Euler's method from Taylor's series and state its error.
; dropping the last term and using gives . Local error , global .
Q2 Find the first two Picard approximations for , .
; .
Q3 Explain the modified Euler method.
Predict with Euler, then correct with the average of the slopes at the two ends: . It is the trapezoidal rule for ; global error .
Q4 What is the difference between local and global truncation error?
Local: the error made in a single step starting from the exact value. Global: the total error at a given after all steps. With steps, a local error accumulates to a global error .
Q5 Why does Euler's method blow up for with ?
Each step multiplies by , whose size exceeds 1, so grows like although the true solution decays. Euler is stable for this equation only when , i.e. .