DIFFERENTIAL EQUATIONS • SERIES AND NUMERICAL METHODS

Euler's Method

A step-by-step numerical technique for approximating solutions to differential equations that can't be solved by hand.

Historical Context & Motivation

Mathematicians have long been fascinated by differential equations — equations that describe how quantities change over time. A differential equation might model the cooling of a cup of coffee, the growth of a population, or the trajectory of a rocket. The challenge is that many of these equations have no neat, closed-form solution you can write with familiar functions like polynomials or trigonometric expressions.

This reality motivated some of the greatest minds in mathematics to develop numerical methods — systematic procedures that produce approximate answers, step by step, even when exact answers are impossible. Among the earliest and most elegant of these methods is the one developed by the Swiss mathematician Leonhard Euler in the eighteenth century. Euler's approach is beautifully simple: use the slope at a known point to predict where the curve goes next, then repeat.

1687
Newton's Principia
Isaac Newton publishes Principia Mathematica, formalizing differential equations as tools for describing motion and change in the physical world.
1768
Euler Publishes the Method
Leonhard Euler introduces his step-by-step approximation technique in Institutionum Calculi Integralis, providing the first systematic numerical approach to solving differential equations.
1895
Runge–Kutta Methods
Carl Runge and Martin Kutta develop higher-order methods that build on Euler's idea, achieving far greater accuracy by evaluating slopes at multiple points within each step.
1950s
The Computer Age
Electronic computers transform numerical methods from tedious hand calculations into powerful simulation tools, enabling scientists and engineers to solve systems of thousands of differential equations.

The central question Euler's method addresses is straightforward: if you know a curve's starting point and the rule that governs its slope everywhere, how can you trace out the curve one small step at a time? Understanding this method gives you a foundation for every more advanced numerical technique you will encounter in science and engineering.

Core Principles & Definitions

Euler's method rests on a few key ideas that connect concepts you already know — slope, tangent lines, and step-by-step computation — into a coherent algorithm for approximating solutions to initial value problems (IVPs). An initial value problem is a differential equation paired with a known starting point: you know where the curve begins, and you know the rule for its slope at every location.

1

Differential Equation as a Slope Rule

A differential equation like dy/dx = f(x, y) tells you the slope of the solution curve at every point (x, y). You don't know the curve itself — only how steeply it rises or falls at each location.
2

Tangent Line Approximation

Near any point on a smooth curve, the tangent line is a good approximation of the curve. Euler's method rides along the tangent line for a short distance, using the slope to predict the next y-value.
3

Step Size (h)

The step size h controls how far you travel along the tangent line before recalculating the slope. Smaller steps yield better accuracy but require more computation. Larger steps are faster but less precise.
4

Iteration

After computing a new point, you treat it as your new starting point and repeat the process. Each iteration adds one more point to your approximate solution, building the curve piece by piece.
KEY TAKEAWAY
Think of Euler's method like navigating a foggy hiking trail with a compass. At your current position, the compass tells you the direction to walk (the slope). You walk a fixed number of steps in that direction (the step size), then stop and check the compass again. The smaller your steps, the more accurately you follow the winding trail — but you have to stop and check more often.

Visual Explanation

The diagram below illustrates the core idea of Euler's method. The smooth blue curve represents the exact solution to a differential equation, while the orange line segments represent the Euler approximation. At each labeled point, the method computes the slope, draws a tangent line, and follows it for one step of width h to reach the next point.

The blue curve is the exact solution. The orange line segments show the Euler approximation, stepping from point to point. The horizontal distance between points is the step size h, and the vertical rise at each step equals the slope times h. Notice how the approximation drifts away from the true curve — that's the accumulating error.

As you can see, the Euler approximation follows the general shape of the true solution, but a gap develops between the orange points and the blue curve. This gap is called the approximation error. The error tends to grow with each step because each new point starts from a slightly wrong position. Reducing the step size h makes each tangent-line segment shorter and more faithful to the actual curve, shrinking the error — but it also means you need more steps to cover the same interval.

Mathematical Framework

Euler's method translates the geometric idea of "walking along tangent lines" into precise formulas you can calculate. You start with an initial value problem of the form dy/dx = f(x, y) with y(x₀) = y₀. The function f(x, y) gives you the slope at any point, and the initial condition tells you where the curve starts.

EULER'S ITERATIVE FORMULA
yₙ₊₁ = yₙ + h · f(xₙ, yₙ)
Where yₙ is the current y-value, h is the step size, and f(xₙ, yₙ) is the slope evaluated at the current point.
X-VALUE UPDATE
xₙ₊₁ = xₙ + h
Each new x-value is simply the previous x-value plus the step size h. This keeps your x-values evenly spaced.

The logic behind these formulas comes directly from the definition of slope. If the slope at a point is f(xₙ, yₙ), then over a small horizontal distance h, the change in y is approximately Δy ≈ f(xₙ, yₙ) × h. Adding this change to the current y-value gives the predicted next y-value. This is exactly the same idea as using the point-slope form of a line, applied repeatedly.

NUMBER OF STEPS
n = (x_final − x₀) / h
To approximate a solution from x₀ to some final x-value, divide the total interval length by the step size h to determine how many iterations you need.
⚠️ Why does error accumulate?
At each step, you travel in a straight line instead of following the actual curve. This creates a small error called the local truncation error, which is proportional to h². But since each new step starts from an already-incorrect point, these small errors compound. The total global error after n steps is proportional to h, making Euler's method a first-order method. Cut h in half, and you roughly cut the global error in half too.

The Effect of Step Size

The choice of step size h is the single most important decision you make when applying Euler's method. A large step size covers ground quickly but produces a rough, inaccurate approximation. A small step size hugs the true solution much more closely but requires many more calculations. The diagram below compares three different step sizes on the same differential equation, showing how accuracy improves as h decreases.

Three Euler approximations of the same differential equation, each using a different step size. The red path (h = 2) has only 2 steps and deviates significantly. The amber path (h = 1) is closer, and the green path (h = 0.5) with 8 steps nearly overlaps the exact dashed curve.
Accuracy vs. computation trade-off for different step sizes over the interval [0, 4]
Step Size (h)Number of StepsRelative AccuracyComputation Effort
2.02Low — large errorsVery little
1.04ModerateLow
0.58GoodModerate
0.140Very goodHigh

In practice, you usually need to balance accuracy against the number of calculations. For hand computation on an exam, step sizes like h = 0.5 or h = 1 are common. When a computer handles the work, step sizes of h = 0.001 or smaller are routine, producing thousands of tiny steps and highly accurate results.

Worked Example

Let's work through a complete example using Euler's method. Consider the initial value problem dy/dx = x + y with y(0) = 1. We want to approximate y(1) using a step size of h = 0.5, which means we will take two steps.

Approximate y(1) for dy/dx = x + y, y(0) = 1, with h = 0.5
1
Step 1 — Identify Given ValuesThe differential equation is dy/dx = f(x, y) = x + y. The initial condition is x₀ = 0 and y₀ = 1. The step size is h = 0.5, and we want to reach x = 1. Number of steps: n = (1 − 0) / 0.5 = 2.
f(x, y) = x + y, x₀ = 0, y₀ = 1, h = 0.5, n = 2
2
Step 2 — First Iteration (x₀ = 0 → x₁ = 0.5)Evaluate the slope at the initial point: f(0, 1) = 0 + 1 = 1. Apply Euler's formula: y₁ = y₀ + h × f(x₀, y₀) = 1 + 0.5 × 1 = 1 + 0.5 = 1.5. Update x: x₁ = 0 + 0.5 = 0.5.
x₁ = 0.5, y₁ = 1.5
3
Step 3 — Second Iteration (x₁ = 0.5 → x₂ = 1.0)Evaluate the slope at the new point: f(0.5, 1.5) = 0.5 + 1.5 = 2. Apply Euler's formula: y₂ = y₁ + h × f(x₁, y₁) = 1.5 + 0.5 × 2 = 1.5 + 1 = 2.5. Update x: x₂ = 0.5 + 0.5 = 1.0.
x₂ = 1.0, y₂ = 2.5
4
Step 4 — State the Approximation and CompareOur Euler approximation gives y(1) ≈ 2.5. The exact solution to this IVP is y = 2ex − x − 1, which gives y(1) = 2e − 2 ≈ 3.4366. The approximation underestimates the true value by about 0.94, or roughly 27%. Using a smaller step size would reduce this error significantly.
Euler: y(1) ≈ 2.5 | Exact: y(1) ≈ 3.4366
💡 Organizing Your Work
A table is the best way to keep track of each iteration. Set up columns for n, xₙ, yₙ, f(xₙ, yₙ), and h × f(xₙ, yₙ). Fill in one row per step. This prevents arithmetic mistakes and makes it easy to check your work or extend to more steps.
Iteration table for the worked example
nxₙyₙf(xₙ, yₙ)h × f(xₙ, yₙ)
00110.5
10.51.521.0
21.02.5

Strengths & Limitations

Euler's method is the simplest numerical method for differential equations, which makes it a natural starting point for learning. However, simplicity comes with trade-offs. Understanding these strengths and limitations helps you decide when Euler's method is appropriate and when you might need a more sophisticated technique.

Comparing the strengths and limitations of Euler's method
StrengthsLimitations
Extremely easy to understand and implement — just multiply slope by step size and add.Only first-order accurate: halving h only halves the global error, so many steps are needed for high precision.
Works for any differential equation of the form dy/dx = f(x, y), no special structure needed.Error accumulates with each step, especially over long intervals or for rapidly changing solutions.
Excellent pedagogical tool — it builds intuition about how numerical methods approximate curves.Can become unstable for certain equations if h is too large, producing wildly wrong or divergent results.
Requires minimal computational resources; easy to compute by hand for a few steps.More advanced methods (Runge-Kutta, Adams-Bashforth) achieve far better accuracy with similar or less effort.
KEY TAKEAWAY
Euler's method is like a rough sketch before a finished painting. It captures the general shape quickly, and it teaches you the fundamental technique that every more advanced method builds upon. Just as an artist wouldn't submit a sketch as a final piece, engineers rarely rely on Euler's method alone for critical calculations — but it remains the essential first step in understanding numerical solutions.

Connection to Advanced Methods

Once you understand Euler's method, you have the conceptual foundation for every numerical ODE solver used in science and engineering. The key insight is that more sophisticated methods improve accuracy by sampling the slope at multiple points within each step, rather than relying on a single slope evaluation at the beginning. This extra information lets them follow curves more faithfully without requiring dramatically smaller step sizes.

Euler's method compared with the popular fourth-order Runge-Kutta method
FeatureEuler's MethodRunge-Kutta (RK4)
Slope evaluations per step14
Order of accuracyFirst order (error ~ h)Fourth order (error ~ h⁴)
Ease of implementationVery simple — one formulaModerate — four intermediate calculations
Practical useTeaching, quick estimatesStandard workhorse for scientific computing
Halving h improves accuracy byFactor of 2Factor of 16

If you continue studying differential equations, you will encounter methods like the Improved Euler method (also called Heun's method), which averages the slopes at the beginning and end of each step, and the fourth-order Runge-Kutta method (RK4), which is the gold standard for many applications. The beautiful thing is that each of these methods is a natural extension of the same tangent-line idea you learned with Euler — they just sample the slope more cleverly.

Practice Problems

PROBLEM 1CONCEPTUAL
In Euler's method, what geometric object do you follow at each step to approximate the solution curve? Explain in your own words why using this object introduces error.
PROBLEM 2BASIC CALCULATION
Use Euler's method with h = 1 to approximate y(2) given dy/dx = 2x with y(0) = 3. Show each step in a table.
PROBLEM 3INTERMEDIATE
Apply Euler's method with h = 0.25 to approximate y(1) for the IVP dy/dx = y, y(0) = 1. Compare your result to the exact value e ≈ 2.7183 and compute the percent error.
PROBLEM 4APPLIED
A hot cup of coffee at 90°C cools in a room at 20°C. Newton's law of cooling gives dT/dx = −0.1(T − 20), where x is time in minutes. Use Euler's method with h = 5 minutes to estimate the temperature after 15 minutes, starting with T(0) = 90.
PROBLEM 5CRITICAL THINKING
A student uses Euler's method with h = 0.5 and gets y(2) ≈ 4.8. She then repeats the calculation with h = 0.25 and gets y(2) ≈ 5.1. Without knowing the exact answer, what can she conclude about the accuracy of each estimate? If she halved h again to 0.125, what value would you predict for y(2), and why?

Lesson Summary

Euler's method is the most fundamental numerical technique for approximating solutions to initial value problems of the form dy/dx = f(x, y). Starting from a known point (x₀, y₀), the method uses the iterative formula yₙ₊₁ = yₙ + h · f(xₙ, yₙ) to step forward along tangent-line segments, building an approximate solution point by point.

The step size h controls the trade-off between accuracy and computation: smaller h yields better results but requires more steps. As a first-order method, halving h roughly halves the global error. While more advanced methods like Runge-Kutta (RK4) offer vastly superior accuracy, Euler's method remains the essential starting point for understanding how all numerical ODE solvers work.

Varsity Tutors • Differential Equations • Euler's Method