Steply

Use Euler's method, starting at x = 0 with two steps of equal size…

Step by step, with the reason for every step · AP Calculus BC Practice Exam 1 · AP Calculus BC

Step by step

The question

Question: use Euler's method on dy/dx = x + y, with y(0) = 1, step 0.5, to find y(1).

dydx = x + y
y(0) = 1
step h = 0.5

1 The idea

We cannot solve it exactly here.

So we walk: from a point, follow its slope for a short step h.

Then look at the slope again.

The slope is how much y goes up for each 1 to the right.

So for a step h, y goes up h times the slope: new y = old y + h times the slope.

new y = old y + h × slope
slope = x + y at the old point

2 The step size

From x = 0 to x = 1, in steps of 0.5: that is 2 steps.

steps = 1 − 00.5 = 2

3 Go to x = 0.5

The slope at our point (0, 1): put x and y into x + y.

It is 1.

slope at (0, 1) = 0 + 1 = 1

New y = old y + h times the slope: 1 + 0.5 × 1, which is 1.5.

Now we are at x = 0.5.

y1 = 1 + 0.5 × 1 = 1.5

Careful!

Times the step size h!

We only move 0.5 to the right, so y changes by 0.5 times the slope.

The right way: y₁ = 1 + 0.5 × 1 = 1.5.

Careful: not y₁ = 1 + 1 ✗
right: y1 = 1 + 0.5 × 1 = 1.5 ✓

4 Go to x = 1

The slope at (0.5, 1.5) is 2.

slope at (0.5, 1.5) = 0.5 + 1.5 = 2

New y: 1.5 + 0.5 × 2 = 2.5.

y2 = 1.5 + 0.5 × 2 = 2.5

All the points in a table.

1
1.5
2.5

On a graph:

Euler's steps: straight lines, each with the slope at its start.

The true solution, in green, bends away a little.

So y(1) ≈ 2.5.

y(1) ≈ 2.5

5 Check

Let's check: a calculator with very tiny steps gives about 3.4366.

Close to our 2.5.

Euler is a bit low: the slope changes during each step, and each step uses only the slope at its start.

Smaller steps get closer.

Right!

tiny steps: y(1) ≈ 3.4366

Let's look back.

First: the idea.

Then: the step size.

Then: go to x = 0.5.

Then: go to x = 1.

Last: check.

Answer
y(1) ≈ 2.5

Your turn

Try this one yourself, then check your answer:

Use Euler's method on dydx = x + y, with y(0) = 3, step 0.5, to find y(1)
Show the answer
y(1) ≈ 7

More from AP Calculus BC Practice Exam 1

The whole lesson: AP Calculus BC Practice Exam 1 →