When there is no formula, follow the slope
By now you can solve a satisfying handful of equations by hand: separable ones, the first-order linear recipe, exact equations, constant-coefficient systems. But that handful is the exception. The honest truth of this subject is that most differential equations have no closed-form solution — no finite formula in elementary functions exists, no matter how clever you are. Something as innocent-looking as y' = x^2 + y^2 already defeats every hand technique you own. If you want an actual answer — a curve you can plot, a number you can trust — you have to compute it numerically.
Here is the key shift in attitude. Even when you cannot solve y' = f(x, y), the equation is not silent. It still hands you, at every single point (x, y) of the plane, the exact slope of the solution passing through there: that slope is just f(x, y). This is precisely the slope field you met when you first learned to read equations qualitatively. A numerical method is nothing more than a disciplined way to follow that field — to convert local slope information into a global curve, one little step at a time.
To make this concrete we need a definite starting point, so numerical work always begins from an initial value problem: the equation y' = f(x, y) together with one known point y(x0) = y0. Without that anchor a slope field has infinitely many curves threading through it and there is nothing specific to compute. With the anchor, we have a numerical initial value problem — a precise, well-posed thing a computer can chew on.
The tangent line is the whole idea
Stand at your known point (x0, y0). What is the single best straight-line guess for where the true solution goes next? From single-variable calculus you already know the answer: the tangent line. The derivative y' = f(x0, y0) is the slope of the solution curve right there, so over a short horizontal distance the curve barely peels away from its own tangent. Euler's idea, in one sentence, is to stop trusting the curve and just walk along that tangent for a small step, then look around again.
Pick a step size h — the horizontal width of each stride. The next point is reached by moving h to the right and rising by (slope) times h. Then you are standing somewhere new; you read the slope *there*, f at the new point, and take another straight step. Repeating this gives you a chain of points x0, x1 = x0 + h, x2 = x0 + 2h, and so on, with matching heights y0, y1, y2, .... You are building the solution as a polyline — a connect-the-dots path of tiny tangent segments that hugs the true curve.
Given y' = f(x, y), y(x0) = y0, step size h:
x_{n+1} = x_n + h
y_{n+1} = y_n + h * f(x_n, y_n)
read the slope at where you ARE,
then step straight to the next x.
example y' = y, y(0) = 1, h = 0.5 :
y1 = 1 + 0.5*(1) = 1.5
y2 = 1.5 + 0.5*(1.5) = 2.25
y3 = 2.25 + 0.5*(2.25) = 3.375 (true e^1.5 = 4.4817...)Walking through one run
Let us do the loop deliberately, because the whole apparatus is just this loop. Take y' = f(x, y) with the start y(x0) = y0 and a chosen h. To get the picture in your hand it helps to write the equation in normal form first — solved for y' as y' = f(x, y) — so that f is a clean recipe you can evaluate at any point. Then march.
- Start at the known point (x_n, y_n); on the first step this is just (x0, y0).
- Evaluate the slope there: s = f(x_n, y_n). This is the only place the differential equation enters — it is the field telling you which way to lean.
- Take the straight step: y_{n+1} = y_n + h * s, and x_{n+1} = x_n + h. You have moved along the tangent, not along the true curve.
- Replace (x_n, y_n) by the new point and loop back to step 2. Stop when x reaches the end of the interval you care about.
That is genuinely all of it — Euler's method is the simplest possible numerical solver, and most others in this rung are honest refinements of exactly this loop. It costs one slope evaluation per step and a single multiply-and-add. There is no algebra to solve, no formula to integrate, nothing to invert. You can do a few steps by hand on paper, and a computer can do millions in a blink.
Why it drifts, and what the step size buys you
Euler's method is honest but crude, and it is worth being clear-eyed about *why*. The tangent line is the right slope only at the point where you read it. The instant you step away, the true solution has already begun to curve, so its slope is no longer f(x_n, y_n) but something slightly different — and you ignored that change for the whole stride. The little gap you open up in a single step is the local error; the formal name is the local truncation error, and for plain Euler it shrinks like h^2 as you shrink h.
But here is the subtlety that the next guide will hammer on: errors do not just appear once, they accumulate. Halve h and each step's blunder gets four times smaller — yet you now need twice as many steps to cross the same interval. The two effects fight, and the survivor is a total error that shrinks only like h, not h^2. That single power of h is what we mean when we say Euler's method is first-order accurate — its order is one. First order sounds fine until you do the arithmetic: to get one more correct decimal place you must shrink h roughly tenfold and do ten times the work. That is a punishing exchange rate.
Honest limits, and the road from here
Two more cautions keep Euler honest. First, shrinking h cannot be pushed forever: every arithmetic operation on a computer carries a tiny rounding error, and with millions of microscopic steps those roundoffs can swamp the gains, so there is a practical floor below which more steps make things *worse*. Second, some equations are stiff — they contain a rapidly decaying piece that, with plain Euler, forces a comically tiny h to avoid the numbers exploding, even when the solution itself is smooth and lazy. Both of these — the roundoff floor and stiffness — get their own treatment in the last guide of this rung; for now, just know they are real and that no amount of cleverness in coding makes them vanish.
None of this is a reason to dismiss Euler — quite the opposite. It is the conceptual atom from which the whole subject is built. Read the slope, take a step: that single move is the seed of Runge-Kutta methods (which sample the slope at several clever spots before committing to a step), of multistep methods (which reuse slopes from past steps), and of the adaptive solvers that quietly run inside every scientific tool you will ever use. Master this loop and its drift in your bones, and everything that follows in this rung will read as a thoughtful answer to a flaw you have already felt.