7.5 Approximating Solutions Using Euler’s Method

Syllabus
2020
Topic
7.5
Level

Euler’s Method Advances One Tangent Step at a Time

For dy/dx=f(x,y)dy/dx=f(x,y), Euler’s method starts from a known point (xn,yn)(x_n,y_n) and uses the tangent slope there to estimate the next point. Over a horizontal step hh, the estimated vertical change is slope ×\times step, or f(xn,yn)hf(x_n,y_n)h.

x_{n+1}=x_n+h,\qquad y_{n+1}=y_n+h,f(x_n,y_n)

At each step: (1) evaluate the slope at the current point; (2) multiply it by the signed step size hh; (3) add that change to the current yy; (4) advance xx by hh; then recompute the slope at the new point.

For dy/dx=x+ydy/dx=x+y, y(0)=1y(0)=1, and h=0.1h=0.1: from (0,1)(0,1) the slope is 11, so (x1,y1)=(0.1,1+0.1(1))=(0.1,1.1)(x_1,y_1)=(0.1,1+0.1(1))=(0.1,1.1). Now the slope is 0.1+1.1=1.20.1+1.1=1.2, so (x2,y2)=(0.2,1.1+0.1(1.2))=(0.2,1.22)(x_2,y_2)=(0.2,1.1+0.1(1.2))=(0.2,1.22). Thus y(0.2)1.22y(0.2)\approx1.22.

Euler’s method produces an approximation, not an exact solution. Do not reuse the first slope for every step: the derivative must be evaluated at each new approximate point. A smaller step generally follows changing slopes more closely, but it also requires more steps; moving toward smaller xx requires a negative hh.