Exercise · ZW-EULER-S-METHOD-010 · ★★★ Advanced

For \(y'=-y+t\), \(y(0)=1\), with \(h=0.5\), compute \(y_2\) and compare with the exact solution \(y(t)=t-1+2e^{-t}\). What is the absolute error at \(t=1\)?

Choose one option.

Show answer
  • C. \(\approx 0.24\)

Explanation

With \(y_1=1+0.5(-1)=0.5\) and \(y_2=0.5+0.5(-0.5+0.5)=0.5\), the error against \(y(1)=2e^{-1}\approx 0.7358\) is \(|0.5-0.7358|\approx 0.2358\). Using \(t_2\) instead of \(t_1\) gives \(y_2=0.75\) and changes the result.

Study Numerical methods in ZWMath →

Review the concept: Euler's method

Euler's method approximates the solution of an initial value problem \(y'=f(t,y)\), \(y(t_0)=y_0\), advancing in steps of size \(h\) using the slope at the current point.

\[y_{n+1}=y_n+h\,f(t_n,y_n)\]

More practice problems: euler's method

← ZW-EULER-S-METHOD-009