For y =f(x,y), start from (x_0,y_0) and use the current point’s slope for a straight step of constant length h. x_n+1=x_n+h, y_n+1=y_n+hf(x_n,y_n). Example For y =x+y, y(0)=1 and h=0.1: **n** | **x_n** | **y_n** | **x_n+y_n** 0 | 0 | 1 | 1 1 | 0.1 | 1.1 | 1.2 2 | 0.2 | 1.22 | — Thus y(0.2) 1.22. Keep unrounded intermediate values. This is an approximation; a smaller step often improves accuracy over a fixed interval, but is not a guarantee for every problem.
Create a free account to practise similar questions.