Approximating Solutions Using Euler's Method (College Board AP® Calculus BC) : Study Guide

Roger B

Written by: Roger B

Reviewed by: Mark Curtis

Updated on

Euler's method

What is Euler’s method?

  • Euler’s method is a numerical method for finding approximate solutions to first order differential equations

  • It treats the derivatives in the equation as being constant over short ‘steps’

    • At each step you use a linear approximation to approximate the value at the next point

      • See the 'Approximating Values of a Function' study guide in the Linearization topic

  • The differential equation must be in the form fraction numerator d y over denominator d x end fraction equals f to the power of apostrophe open parentheses x comma blank y close parentheses

    • i.e. fraction numerator d y over denominator d x end fraction is expressed in terms of x and y

  • Start with a known value y subscript 0 corresponding to a value x subscript 0

    • Then y subscript 1 equals y subscript 0 plus increment x times f to the power of apostrophe open parentheses x subscript 0 comma space y subscript 0 close parentheses

      • x subscript 1 equals x subscript 0 plus increment x

      • increment x is the step size

    • y subscript 2 equals y subscript 1 plus increment x times f to the power of apostrophe open parentheses x subscript 1 comma space y subscript 1 close parentheses

      • x subscript 2 equals x subscript 1 plus increment x

    • y subscript 3 equals y subscript 2 plus increment x times f to the power of apostrophe open parentheses x subscript 2 comma space y subscript 2 close parentheses

      • x subscript 3 equals x subscript 2 plus increment x

    • etc.

Graph showing Euler's method with points (x0, y0) to (x4, y4). Heavier black line for approximation, lighter black line for exact solution, and slopes of approximation line segments labelled.
Example of an Euler's method approximation
  • An Euler’s method approximation tends to wander away from the exact solution

    • The accuracy can be improved by making the step size smaller

Examiner Tips and Tricks

If an exam question asks you how to improve an Euler’s method approximation, the answer will almost always involve decreasing the step size increment x.

How do I use Euler’s method with a first order differential equation?

  • STEP 1: Make sure your differential equation is in fraction numerator d y over denominator d x end fraction equals f to the power of apostrophe open parentheses x comma blank y close parentheses form

    • It is possible that only one of the variables will appear on the right-hand side of the equation 

      • For example, the derivative may be in terms of x only, fraction numerator d y over denominator d x end fraction equals f apostrophe open parentheses x close parentheses

      • The procedure to follow remains the same

  • STEP 2: Use the recursion equations y subscript n plus 1 end subscript equals y subscript n plus increment x times f to the power of apostrophe open parentheses x subscript n comma blank y subscript n close parentheses and x subscript n plus 1 end subscript equals x subscript n plus increment x

    • An exam question may tell you the correct value of increment x to use 

      • or you may need to calculate it from other info provided

      • See the Worked Examples

  • STEP 3: Start with n equals 0

    • This gives y subscript 1 equals y subscript 0 plus increment x times f to the power of apostrophe open parentheses x subscript 0 comma blank y subscript 0 close parentheses and x subscript 1 equals x subscript 0 plus increment x

    • The values for x subscript 0 and y subscript 0 will come from the initial conditions given in the question

    • Your values for x subscript 1 and y subscript 1 will be carried over into the next step

  • STEP 4: Continue with n equals 1

    • This gives y subscript 2 equals y subscript 1 plus increment x times f to the power of apostrophe open parentheses x subscript 1 comma blank y subscript 1 close parentheses and x subscript 2 equals x subscript 1 plus increment x

    • The values for x subscript 1 and y subscript 1 will come from the previous step

    • The value you find for y subscript 2 will usually be the Euler's method approximation you are looking for

Examiner Tips and Tricks

It is possible to perform Euler's method with any step size and any number of steps. In this case you could go on to calculate y subscript 3, y subscript 4, y subscript 5, etc. On the exam, however, the questions almost always involve only two steps.

Examiner Tips and Tricks

You might find it useful to do your workings in a table

bold italic n

bold italic x subscript bold italic n

bold italic y subscript bold n

0

x subscript 0

y subscript 0

1

x subscript 1 equals x subscript 0 plus straight capital delta x

y subscript 1 equals y subscript 0 plus increment x times f to the power of apostrophe open parentheses x subscript 0 comma blank y subscript 0 close parentheses

2

x subscript 2 equals x subscript 1 plus straight capital delta x

y subscript 2 equals y subscript 1 plus increment x times f to the power of apostrophe open parentheses x subscript 1 comma blank y subscript 1 close parentheses

Worked Example

Let y equals f open parentheses x close parentheses be the solution to the differential equation fraction numerator d y over denominator d x end fraction equals x minus 3 y plus 1 with initial condition f open parentheses 0 close parentheses equals 2. What is the approximation for f open parentheses 1 close parentheses obtained by using Euler's method with a step size of 1 half starting at x equals 0?

You need to go from x equals 0 to x equals 1 with a step size of 1 half

  • so there will be fraction numerator 1 minus 0 over denominator 1 half end fraction equals 2 steps

Use the formula y subscript n plus 1 end subscript equals y subscript n plus increment x times f to the power of apostrophe open parentheses x subscript n comma space y subscript n close parentheses

  • where here increment x equals 1 half

  • and fraction numerator d y over denominator d x end fraction equals x minus 3 y plus 1

Start with initial value open parentheses x subscript 0 comma space y subscript 0 close parentheses equals open parentheses 0 comma space 2 close parentheses

open parentheses x subscript 0 comma space y subscript 0 close parentheses equals open parentheses 0 comma space 2 close parentheses

Then x subscript 1 equals x subscript 0 plus straight capital delta x

x subscript 1 equals 0 plus 1 half equals 1 half

And y subscript 1 equals y subscript 0 plus increment x times f to the power of apostrophe open parentheses x subscript 0 comma space y subscript 0 close parentheses

y subscript 1 equals 2 plus 1 half times open parentheses open parentheses 0 close parentheses minus 3 open parentheses 2 close parentheses plus 1 close parentheses equals 2 plus 1 half open parentheses negative 5 close parentheses equals negative 1 half

rightwards double arrow space space open parentheses x subscript 1 comma space y subscript 1 close parentheses equals open parentheses 1 half comma space minus 1 half close parentheses

Continue from open parentheses x subscript 1 comma space y subscript 1 close parentheses equals open parentheses 1 half comma space minus 1 half close parentheses

x subscript 2 equals x subscript 1 plus straight capital delta x

x subscript 2 equals 1 half plus 1 half equals 1

And y subscript 2 equals y subscript 1 plus increment x times f to the power of apostrophe open parentheses x subscript 1 comma space y subscript 1 close parentheses

y subscript 2 equals negative 1 half plus 1 half times open parentheses open parentheses 1 half close parentheses minus 3 open parentheses negative 1 half close parentheses plus 1 close parentheses equals negative 1 half plus 1 half open parentheses 3 close parentheses equals 1

rightwards double arrow space space open parentheses x subscript 2 comma space y subscript 2 close parentheses equals open parentheses 1 comma space 1 close parentheses

You could also do these workings in a table

bold italic n

bold italic x subscript bold italic n

bold italic y subscript bold n

0

0

2

1

0 plus 1 half equals 1 half

table row cell 2 plus 1 half times open parentheses open parentheses 0 close parentheses minus 3 open parentheses 2 close parentheses plus 1 close parentheses end cell equals cell 2 plus 1 half open parentheses negative 5 close parentheses end cell row blank equals cell negative 1 half end cell end table

2

1 half plus 1 half equals 1

table row cell negative 1 half plus 1 half times open parentheses open parentheses 1 half close parentheses minus 3 open parentheses negative 1 half close parentheses plus 1 close parentheses end cell equals cell negative 1 half plus 1 half open parentheses 3 close parentheses end cell row blank equals 1 end table

So by the Euler method, f open parentheses 1 close parentheses almost equal to y subscript 2 equals 1

f open parentheses 1 close parentheses almost equal to 1

Worked Example

bold italic x

2

2.5

3

Error converting from MathML to accessible text.

5

2

1

f is a twice-differentiable function for all values of x, with f open parentheses 2 close parentheses equals 1. The table above gives values of the derivative of f, f to the power of apostrophe, for selected values of x.

Use Euler's method, with two steps of equal size starting at x equals 2, to approximate f open parentheses 3 close parentheses. Show the computations that lead to your answer.

You need to go from x equals 2 to x equals 3 with two steps of equal size

  • so the step size will be straight capital delta x equals fraction numerator 3 minus 2 over denominator 2 end fraction equals 1 half

Use the formula y subscript n plus 1 end subscript equals y subscript n plus increment x times f to the power of apostrophe open parentheses x subscript n comma space y subscript n close parentheses

  • where here fraction numerator d y over denominator d x end fraction equals f apostrophe open parentheses x close parentheses

  • i.e. where the value of fraction numerator d y over denominator d x end fraction depends on x only

Start with initial value open parentheses x subscript 0 comma space y subscript 0 close parentheses equals open parentheses 2 comma space 1 close parentheses

open parentheses x subscript 0 comma space y subscript 0 close parentheses equals open parentheses 2 comma space 1 close parentheses

Then x subscript 1 equals x subscript 0 plus straight capital delta x

x subscript 1 equals 2 plus 1 half equals 5 over 2

And y subscript 1 equals y subscript 0 plus increment x times f to the power of apostrophe open parentheses x subscript 0 close parentheses

y subscript 1 equals 1 plus 1 half times f to the power of apostrophe open parentheses 2 close parentheses equals 1 plus 1 half open parentheses 5 close parentheses equals 7 over 2

rightwards double arrow space space open parentheses x subscript 1 comma space y subscript 1 close parentheses equals open parentheses 5 over 2 comma space 7 over 2 close parentheses

Continue from open parentheses x subscript 1 comma space y subscript 1 close parentheses equals open parentheses 5 over 2 comma space 7 over 2 close parentheses

x subscript 2 equals x subscript 1 plus straight capital delta x

x subscript 2 equals 5 over 2 plus 1 half equals 3

And y subscript 2 equals y subscript 1 plus increment x times f to the power of apostrophe open parentheses x subscript 1 close parentheses

y subscript 2 equals 7 over 2 plus 1 half times f to the power of apostrophe open parentheses 2.5 close parentheses equals 7 over 2 plus 1 half open parentheses 2 close parentheses equals 9 over 2

rightwards double arrow space space open parentheses x subscript 2 comma space y subscript 2 close parentheses equals open parentheses 3 comma space 9 over 2 close parentheses

You could also do these workings in a table

bold italic n

bold italic x subscript bold italic n

bold italic y subscript bold n

0

2

1

1

2 plus 1 half equals 5 over 2

table row cell 1 plus 1 half times f to the power of apostrophe open parentheses 2 close parentheses end cell equals cell 1 plus 1 half open parentheses 5 close parentheses end cell row blank equals cell 7 over 2 end cell end table

2

5 over 2 plus 1 half equals 3

table row cell 7 over 2 plus 1 half times f to the power of apostrophe open parentheses 2.5 close parentheses end cell equals cell 7 over 2 plus 1 half open parentheses 2 close parentheses end cell row blank equals cell 9 over 2 end cell end table

So by the Euler method, f open parentheses 3 close parentheses almost equal to y subscript 2 equals 9 over 2

f open parentheses 3 close parentheses almost equal to 9 over 2

How can I tell if an Euler's method approximation is an overestimate or an underestimate?

  • If the solution to a differential equation is concave down on the interval over which Euler's method is employed

    • then the Euler's method approximation will be an overestimate

    • See the diagram at the start of this study guide for an example of this

  • If the solution to a differential equation is concave up on the interval over which Euler's method is employed

    • then the Euler's method approximation will be an underestimate

  • You can differentiate fraction numerator d y over denominator d x end fraction again with respect to x to find fraction numerator d squared y over denominator d x squared end fraction

    • Then fraction numerator d squared y over denominator d x squared end fraction less than 0 tells you the solution is concave down

    • And fraction numerator d squared y over denominator d x squared end fraction greater than 0 tells you the solution is concave up

    • Note that you don't need to solve the equation to determine its concavity!

How can I use my graphing calculator to carry out Euler’s method?

  • STEP 1: Make sure your differential equation is in fraction numerator d y over denominator d x end fraction equals f to the power of apostrophe open parentheses x comma blank y close parentheses form

  • STEP 2: Write down the recursion equations y subscript n plus 1 end subscript equals y subscript n plus increment x times f to the power of apostrophe open parentheses x subscript n comma blank y subscript n close parentheses and x subscript n plus 1 end subscript equals x subscript n plus increment x

    • An exam question may tell you the correct value of increment x to use 

      • or you may need to calculate it from other info provided

      • See the Worked Example

  • STEP 3: Use the recursion feature on your calculator to calculate the Euler’s method approximation over the correct number of steps

    • The values for x subscript 0 and y subscript 0 will come from the initial conditions given in the question

    • Your calculator will output the answer as a table of values

Examiner Tips and Tricks

Be careful with letters. In the exam (and in your calculator’s recursion app) the variables may not be x and y.

Examiner Tips and Tricks

Although your graphing calculator can carry out Euler's method approximations, these questions are usually on the non-calculator part of the exam. So make sure you can do the method 'by hand' as well!

Worked Example

Consider the differential equation fraction numerator d y over denominator d x end fraction plus y equals x plus 1 with the initial condition space y left parenthesis 0 right parenthesis equals 0.5.

(a) Using your graphing calculator, apply Euler’s method with five equal steps to approximate the solution to the differential equation at x equals 1.

First rearrange into fraction numerator d y over denominator d x end fraction equals f to the power of apostrophe open parentheses x comma blank y close parentheses form

fraction numerator d y over denominator d x end fraction equals x minus y plus 1

Next calculate the step size increment x; you need to go from x equals 0 to x equals 1 in five steps so

increment x equals fraction numerator 1 minus 0 over denominator 5 end fraction equals 0.2

Put that information into the recursion equations y subscript n plus 1 end subscript equals y subscript n plus increment x times f to the power of apostrophe open parentheses x subscript n comma blank y subscript n close parentheses and x subscript n plus 1 end subscript equals x subscript n plus increment x

y subscript n plus 1 end subscript equals y subscript n plus 0.2 times open parentheses x subscript n minus y subscript n plus 1 close parentheses

x subscript n plus 1 end subscript equals x subscript n plus 0.2

Put those equations into the recursion app on your calculator, and specify the required number of steps (n equals 5)

Your calculator will output the answers in a table

n

x subscript n

y subscript n

0

0

0.5

1

0.2

0.6

2

0.4

0.72

3

0.6

0.856

4

0.8

1.0048

5

1

1.1638

Note that the last row in the table gives the result you're looking for (i.e. the Euler approximation for y when x equals 1)

Round to 3 decimal places

y open parentheses 1 close parentheses almost equal to 1.164 space open parentheses 3 space straight d. straight p. close parentheses

(b) Explain how the accuracy of the approximation in part (a) could be improved.

Decrease the step size by using a greater number of steps to get from 0 to 1

You've read 0 of your 5 free study guides this week

Sign up now. It’s free!

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Did this page help you?

Roger B

Author: Roger B

Expertise: Maths Content Creator

Roger's teaching experience stretches all the way back to 1992, and in that time he has taught students at all levels between Year 7 and university undergraduate. Having conducted and published postgraduate research into the mathematical theory behind quantum computing, he is more than confident in dealing with mathematics at any level the exam boards might throw at you.

Mark Curtis

Reviewer: Mark Curtis

Expertise: Maths Content Creator

Mark graduated twice from the University of Oxford: once in 2009 with a First in Mathematics, then again in 2013 with a PhD (DPhil) in Mathematics. He has had nine successful years as a secondary school teacher, specialising in A-Level Further Maths and running extension classes for Oxbridge Maths applicants. Alongside his teaching, he has written five internal textbooks, introduced new spiralling school curriculums and trained other Maths teachers through outreach programmes.