01 / 21

Euler's Method

Learn to approximate solutions to differential equations one step at a time, using tangent lines to trace a curve you cannot solve exactly.

Calculus 2

What Is Euler's Method?

Many differential equations have no closed-form solution. Euler's Method gives us a way to numerically approximate the solution curve by taking small, straight-line steps that follow the slope field.

The Core Idea: Walk the Tangent

At each point, the differential equation tells us the slope. We use that slope to take a small step of size \(h\) along the tangent line, arriving at the next approximation.

x y true solution
\((x_0,y_0)\)
slope = \(f(x_0,y_0)\)
h

Key Ingredients You Need

Differential Equation
\(\frac{dy}{dx} = f(x,y)\) tells you the slope at every point in the plane.
Initial Condition
\(y(x_0) = y_0\) gives you the starting point so the approximation can begin.
Step Size
\(h\) controls how far you move along the tangent each step: smaller \(h\) means more accuracy.

The Euler Recursion

This is the heart of the method. Each new \(y\)-value equals the old \(y\)-value plus the step size times the slope at the current point. The \(x\)-values simply march forward by \(h\).

Following the Slope Field

x y start exact Euler

The Euler path follows the slope field in discrete jumps. Notice how it gradually drifts away from the true curve: the error accumulates at each step.

Euler vs Exact Solutions

Euler's Method
Numerical: produces a table of approximate values. Works for any \(f(x,y)\), even when no formula exists.
Exact Solution
Analytical: produces a formula \(y = g(x)\). Only possible for certain classes of ODEs (separable, linear, etc.).

How to Apply Euler's Method

1
Identify \(f(x,y)\), the initial condition \((x_0, y_0)\), the step size \(h\), and the target \(x\)-value.
2
Compute the slope at the current point: \(f(x_n, y_n)\).
3
Update: \(x_{n+1} = x_n + h\) and \(y_{n+1} = y_n + h \cdot f(x_n, y_n)\).
4
Repeat until you reach the target \(x\)-value.
5
Report the final \(y_n\) as your approximation.

Example 1: \(\frac{dy}{dx} = x + y\)

Given \(\frac{dy}{dx} = x + y\), \(y(0) = 1\), step size \(h = 0.5\). Approximate \(y(1)\).

Step \(x_n\) \(y_n\) \(f(x_n,y_n)\) \(h \cdot f\)
0 0 1 \(0+1=1\) \(0.5\)
1 0.5 1.5 \(0.5+1.5=2\) \(1.0\)
2 1.0 2.5 — —

Example 1: Visualized

0 0.5 1.0 0 1 2 3 4 exact error
(0, 1)
(0.5, 1.5)
(1, 2.5)

With only 2 steps (\(h=0.5\)), the Euler approximation undershoots the true curve. The error at \(x=1\) is about 0.94.

Example 2: Smaller Steps

Same equation: \(\frac{dy}{dx} = x + y\), \(y(0) = 1\), but now with \(h = 0.25\). Approximate \(y(1)\).

n \(x_n\) \(y_n\) \(f(x_n,y_n)\) \(h \cdot f\)
00110.25
10.251.251.50.375
20.51.6252.1250.53125
30.752.156252.906250.72656
41.02.8828——

Example 3: \(\frac{dy}{dx} = 2x\)

Given \(\frac{dy}{dx} = 2x\), \(y(0) = 0\), \(h = 0.5\). Approximate \(y(2)\). Note: the exact solution is \(y = x^2\).

n \(x_n\) \(y_n\) \(f(x_n,y_n)=2x_n\) \(h \cdot f\)
00000
10.5010.5
21.00.521.0
31.51.531.5
42.03.0——

Step Size and Error

x y
exact \(y=x^2\)
\(h=0.5\)
\(h=1.0\)

Over vs Underestimate?

Overestimate
If the solution is concave down (i.e., \(\frac{d^2y}{dx^2} < 0\)), the tangent line lies above the curve, so Euler overestimates.
Underestimate
If the solution is concave up (i.e., \(\frac{d^2y}{dx^2} > 0\)), the tangent line lies below the curve, so Euler underestimates.

Common Mistakes

✕ Using the new \(y\) in slope
Always use \(f(x_n, y_n)\) to compute the slope, not \(f(x_{n+1}, y_{n+1})\). That would be implicit Euler.
✕ Forgetting to multiply by \(h\)
The update is \(y_{n+1} = y_n + h \cdot f\), not \(y_n + f\). Missing \(h\) gives wildly wrong answers.
✕ Wrong number of steps
If asked for \(y(1)\) starting at \(x=0\) with \(h=0.25\), you need exactly 4 steps: \(\frac{1-0}{0.25}=4\).

Summary Comparison

Euler's Method Exact Solution
Type Numerical approximation Analytical formula
Output Table of \((x_n, y_n)\) pairs \(y = g(x)\)
Accuracy Depends on \(h\) (first-order) Exact (no error)
Works for Any \(\frac{dy}{dx}=f(x,y)\) Only specific ODE types
AP Use Free response, 2-4 steps Separation of variables, etc.

Question 1 of 5

Given \(\frac{dy}{dx} = y\), \(y(0) = 1\), and \(h = 1\), what is the Euler approximation for \(y(1)\)?

Question 2 of 5

In Euler's Method, the formula \(y_{n+1} = y_n + h \cdot f(x_n, y_n)\) can be interpreted as using a local ___ to step forward.

Question 3 of 5

If the true solution to a differential equation is concave up on an interval, Euler's Method will:

Question 4 of 5

Given \(\frac{dy}{dx} = 3x^2\), \(y(1) = 2\), and \(h = 0.5\), what is \(y(1.5)\) using one Euler step?

Question 5 of 5

How many Euler steps are needed to approximate \(y(3)\) starting at \(x = 1\) with step size \(h = 0.25\)?