I have The following IVP:
$$y'=-20y+20 \cos t-\sin t ,~~~ 0≤t≤2,~~~ y(0)=0;$$
With $N = 5$, $h = 0.4$, and $t_i=0.4i$, for $i = 0,1,2,3,4,5$.
I am performing the steps as following:
1st:
$y1$=$y0+hf(t0,y0)$
$y1$=$0+0.4f(0,0)$
$y1 = 8 $
2st:
$y2$=$y1+hf(t1,y1)$
$y2$=$8+0.4f(0.4,8)$
$y2 = -48.787 $
.
.
.
$y5 = 16974.7699 $
while the exact solution is : -0.416147
I can't figure out where the mistake is,