Lesson 4 - Euler's Method

Euler's method, or the tangent line method, is used to construct approximate solutions to a first order differential equation of the form dydx=f(x,y), y(x0)=y0.

  1. We assume that the IVP has a unique solution in some interval centered at x0. h>0 is a positive real number called the step size.

Euler Method.png

  1. We pick equally spaces points on the x axis: x0,x0+h,x0+2h,. In general, xn=x0+nh,n=0,1,2,3,.
  2. We start by finding the slope at the first point (x0,y0) which is f(x0,y0). We trace the line with this slope until the next point (x1,y1) when reset the slope to the slope at (x1,y1): f(x1,y1) and follow that line until the next point. We repeat this process.
  3. Equation of line at (x0,y0) is
yb=m(xa)yy0=m(xx0)yy0=f(x0,y0)(xx0)

Using the tangent line approximation find a formula for y1

y1=y0+f(x0,y0)(x1x0)y1=y0+hf(x0,y0)

Using the above method find a formula for y2

y2=y1+h(f(x1,y1))

Can we deduce a general formula for yn?

yn=yn1+h(f(xn1,yn1)),n=0,1,2,3,xn+1=xn+h

Example: Use Euler's method to find approximate value of y(0.4) where y is the solution of the IVP y=y,y(0)=1.

slope=yyn=yn1+hf(xn1yn1)n=0h=0.1y1=1+0.1(1)=1.1y2=1.1+0.1(1.1)y2=1.21y3=1.21+0.1(1.21)y3=1.331y4=1.331+0.1(1.331)y4=1.4641

Try For Yourself: Use Euler's method to approximate the solution to the IVP.

y=xy2,y(1)=0 at the point x=1.1,1.2,1.3,1.4,1.5.

Next Lesson: Lesson 5 - Separable Equations

Table of Contents: Table of Contents