Functions
AI Assistant

Euler's Method

Build a solution curve from tiny straight segments

Euler's method approximates the solution to a differential equation dy/dx = f(x, y) by taking small steps. At each point, the derivative tells you the slope — draw a tiny straight segment in that direction, then repeat from the new point.

We'll start with a classic: dy/dx = y, starting at (0, 1). The exact solution is y = eˣ, but Euler's method builds an approximation using only addition and multiplication — no calculus needed to execute it.

The smaller the step size, the closer the approximation gets to the true curve. Ask the AI "Take 5 steps with h = 0.5" or "Compare h = 1 vs h = 0.1."

Graph

FAQ

How does Euler's method work?
Start at a known point (x₀, y₀). The derivative dy/dx = f(x, y) gives the slope at that point. Take a step: x₁ = x₀ + h, y₁ = y₀ + h·f(x₀, y₀). Repeat from (x₁, y₁). Each step is a tiny straight segment that follows the slope.
What is the step size h?
The step size h controls how far you move in each iteration. Smaller h gives better accuracy (the segments follow the curve more closely) but requires more steps. Larger h is faster but less accurate — the straight segments cut corners.
Why doesn't Euler's method give the exact answer?
Each step assumes the slope is constant over the interval, but the slope actually changes continuously. This introduces error at every step, and errors accumulate. It's like navigating with a compass but only checking direction every 100 meters vs every 10 meters.
Where is this used?
When differential equations can't be solved exactly (most real-world ones can't), numerical methods like Euler's are essential. Weather prediction, rocket trajectories, population models, and circuit simulations all use variants of this idea.