Graphical interpretation
One can inteprete the formula
,
as constructing first the midpoint (
), using the value of the derivative at the starting point, and then making a better estimate of the derivative used for the full step by evaluating
at this midpoint. This is illustrated in the picture below:
> y:=t->t+exp(-t);
> f:=(t,y)->-y+t+1;
> with(plots):pl1:=plot(y(t),t=0..1,y=0.9..1.3):
> pl2:=plot([t,1+f(0,1)*t,t=0..0.4],color=blue):
> pl3:=plot([0.2,t,t=0..1+f(0,1)*0.2],color=blue):
>
### WARNING: the definition of the type `symbol` has changed'; see help page for details
pl4:=plot([[0.2,1]],style=point,symbol=diamond):
> pl5:=plot([0.2+t,1+f(0.2,1)*t,t=-0.15..0.25],color=magenta):
> pl6:=plot({[0.4,t,t=0..1+f(0.2,1)*0.4],[t,1+f(0.2,1)*t,t=0..0.5]},color=black):
> display({pl.(1..6)});
>