M
Math Coach Amy
Amy Ferguson Moncure

Calculus BC · Unit 7

Euler's Method

Step along the tangent, recompute the slope, and compare the estimate with the exact value when you can.

Jump to section:

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

What to Remember

Follow the tangent for one step

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

\(h\) is the step in \(x\). Use the new point before you take the next step.

The slope is recomputed

Do not reuse the first slope for the second step unless \(f\) really has the same value at the new point.

Concavity hints at the error

If the solution is concave up and you step forward along the tangent, Euler’s estimate is too small.

A smaller step usually tracks the curve longer

Compare two step sizes on the same interval before you trust a one-step estimate.

Level 1

Easy

One step. Substitute the starting point into f.

Example
\(\dfrac{dy}{dx}=x+y\), \(y(0)=1\), and \(h=0.5\). Use Euler’s method to approximate \(y(0.5)\).

\(y_1=y_0+h\,f(x_0,y_0)\)

\(f(0,1)=0+1=1\)

\(y_1=1+0.5\cdot 1\)

\(1.5\)

Answer: \(1.5\)

1
\(dy/dx=2x\), \(y(1)=4\), \(h=0.1\). Approximate \(y(1.1)\).
Show Answer

\(f(1,4)=2\)

\(4+0.1\cdot 2\)

\(4.2\)

Answer: \(4.2\)

2
\(dy/dx=y\), \(y(0)=2\), \(h=1\). Approximate \(y(1)\).
Show Answer

\(f(0,2)=2\)

\(2+1\cdot 2\)

\(4\)

Answer: \(4\)

3
\(dy/dx=-2\), \(y(0)=5\), \(h=0.5\). Approximate \(y(0.5)\).
Show Answer

\(5+0.5\cdot(-2)\)

\(4\)

Answer: \(4\)

4
Which formula is one Euler step?
A. \(y_1=y_0+h\,f(x_0,y_0)\)
B. \(y_1=y_0+f(x_0,y_0)\)
C. \(y_1=h\,f(x_1,y_1)\)
D. \(y_1=y_0+x_0\)
Show Answer

Add the change in x times the slope at the known point.

The slope at the unknown new point is not available yet.

Answer: A. \(y_1=y_0+hf(x_0,y_0)\)

5
\(dy/dx=x\), \(y(0)=1\), \(h=0.5\). Take one step.
Show Answer

\(f(0,1)=0\)

\(1+0.5\cdot 0\)

\(1\)

Answer: \(1\)

Level 2

Medium

Two steps. Update the slope after the first one.

Example
\(dy/dx=x+y\), \(y(0)=1\), and \(h=0.5\). Approximate \(y(1)\) with two Euler steps.

First slope: \(f(0,1)=1\).

\(y(0.5)\approx 1.5\)

Second slope: \(f(0.5,1.5)=2\).

\(1.5+0.5\cdot 2\)

\(2.5\)

Answer: \(2.5\)

1
\(dy/dx=2y\), \(y(0)=1\), \(h=0.5\). Approximate \(y(1)\).
Show Answer

\(f(0,1)=2\)

\(y(0.5)\approx 1+0.5\cdot 2=2\)

\(f(0.5,2)=4\)

\(2+0.5\cdot 4\)

\(4\)

Answer: \(4\)

2
\(dy/dx=y-x\), \(y(1)=2\), \(h=0.2\). Approximate \(y(1.4)\) with two steps.
Show Answer

\(f(1,2)=1\)

\(y(1.2)\approx 2+0.2\cdot 1=2.2\)

\(f(1.2,2.2)=1\)

\(2.2+0.2\cdot 1\)

\(2.4\)

Answer: \(2.4\)

3
For \(dy/dx=y\) with \(y(0)=1\), compare the Euler estimates of \(y(1)\) using \(h=1\) and using \(h=0.5\).
Show Answer

One step of size 1: \(1+1\cdot 1=2\).

First half-step: \(1+0.5\cdot 1=1.5\).

Second half-step: \(1.5+0.5\cdot 1.5=2.25\).

The smaller step gives 2.25, which is closer to \(e\) than 2 is.

Answer: \(h=1\) gives 2; \(h=0.5\) gives 2.25

4
\(dy/dx=1-y\), \(y(0)=3\), \(h=0.5\). Take one step.
Show Answer

\(f(0,3)=1-3=-2\)

\(3+0.5\cdot(-2)\)

\(2\)

Answer: \(2\)

5
The solution of \(dy/dx=y\) with \(y>0\) is concave up. An Euler step that moves to the right
A. underestimates y
B. overestimates y
C. is exact
D. has error 0 because the field is horizontal
Show Answer

The tangent line sits below a concave-up graph.

Stepping forward along that tangent lands too low.

Answer: A. underestimates y

Level 3

Hard

Three short steps, an equilibrium, or a comparison with the exact value.

Example
\(dy/dx=x-y\), \(y(0)=1\), and \(h=1\). Approximate \(y(2)\) with two Euler steps.

\(f(0,1)=-1\)

\(y(1)\approx 1+1\cdot(-1)=0\)

\(f(1,0)=1\)

\(0+1\cdot 1\)

\(1\)

Answer: \(1\)

1
\(dy/dx=x+y\), \(y(0)=2\), \(h=0.1\). Approximate \(y(0.3)\) with three steps.
Show Answer

\(f(0,2)=2\)

\(y_1=2+0.1\cdot 2=2.2\)

\(f(0.1,2.2)=2.3\)

\(y_2=2.2+0.1\cdot 2.3=2.43\)

\(f(0.2,2.43)=2.63\)

\(y_3=2.43+0.1\cdot 2.63\)

\(2.693\)

Answer: \(2.693\)

2
\(dy/dx=3-y\) and \(y(0)=3\). Use \(h=0.5\) for one step, and explain the result.
Show Answer

\(f(0,3)=0\)

\(3+0.5\cdot 0=3\)

\(y=3\) is an equilibrium, so the slope stays 0 and Euler stays there.

Answer: \(3\)

3
\(dy/dx=2x\), \(y(0)=0\). Approximate \(y(1)\) with \(h=0.5\), then compare with the exact value.
Show Answer

\(f(0,0)=0\)

\(y(0.5)\approx 0\)

\(f(0.5,0)=1\)

\(y(1)\approx 0.5\)

The exact solution is \(y=x^2\), so \(y(1)=1\).

The estimate 0.5 is too small. The solution is concave up.

Answer: estimate 0.5, exact 1

4
Euler’s method for \(dy/dx=y\), \(y(0)=1\), \(h=0.5\) gave 2.25 for \(y(1)\). The exact value is \(e\). Which statement is supported?
A. The estimate is less than the exact value.
B. The estimate is greater than the exact value.
C. The estimate is exact because h is less than 1.
D. The error has no sign.
Show Answer

\(e>2.7>2.25\)

The tangent steps stay under the concave-up solution.

Answer: A. The estimate is less than the exact value.

5
\(dy/dx=4-2x\), \(y(0)=0\), \(h=1\). Take two steps and compare with \(y=4x-x^2\) at \(x=2\).
Show Answer

\(f(0,0)=4\)

\(y(1)\approx 4\)

\(f(1,4)=2\)

\(y(2)\approx 4+1\cdot 2=6\)

Exact: \(y(2)=8-4=4\).

The estimate is 6, which is larger than 4. On \([0,2]\) the second derivative \(-2\) is negative, so the tangents sit above the graph.

Answer: estimate 6, exact 4

Need help with Euler's method?

Book a Session with Amy