Mathematics

Mathematics

Problem

Consider dydx=x−y\dfrac{dy}{dx}=x-y with y(0)=1y(0)=1. Two approximations to y(0.4)y(0.4) are produced: • Method A: four equal straight-line steps of length 0.10.1 give yA=0.712y_A=0.712. • Method B: two equal straight-line steps of length 0.20.2 give yB=0.680y_B=0.680. The exact value is 0.74060.7406 (rounded to four decimal places). Compute the absolute error for each method to three decimal places and state which step size yields the smaller absolute error.

Browse the problem library