Antiderivatives as families of curves, substitution as stretching the axis, integration by parts as two areas that fill a rectangle, and partial fractions
Differentiation is a machine: feed in any formula and the rules grind out its derivative. Integration runs the machine backwards, and there is no reverse gear. Instead there is a toolkit of tricks, and each one is a rule of differentiation read from right to left. Seen as pictures, the tricks stop looking like tricks.
The dashes show the slope f(x) that every antiderivative must have. Drag anywhere to pick the one curve through that point, or type your own f.
Drag anywhere in the upper panel to choose the antiderivative through that point. The curves are computed by integrating f outwards from x₀ with Simpson’s rule on 500 cells; they stop where f blows up, because an integral cannot be carried across a pole. For 1/x on the negative side, ln|x| + C would need its own, independent constant.
F is an antiderivative of f when F′(x) = f(x). If F and G are both antiderivatives on an interval, then (F − G)′ = 0 there, and by the Mean Value Theorem a function with zero derivative on an interval is constant. So every antiderivative is F(x) + C, and the whole family is one curve slid up and down. That is why the slope field has the same slope all the way up each column: the slope depends on x alone.
The Fundamental Theorem of Calculus says that for continuous f, F(x) = ∫ from x₀ to x of f(t) dt is one such antiderivative, the one that is zero at x₀. The lower panel shows exactly that: the shaded area from x₀ is the height the curve has climbed. The constant matters only on intervals. For 1/x the domain has two pieces, and ln|x| + C₁ for x > 0 with ln|x| + C₂ for x < 0 is also an antiderivative, with two independent constants.
The integral always exists, but a formula for it need not. In the 1830s Joseph Liouville began a theory of integration in finite terms which shows that functions such as e^(−x²) and sin(x)/x have no antiderivative built from the elementary functions. The demo does not care: type either one and the family is computed numerically.
Hover over a strip to find its partner, then play the warp: the x-axis is bent into the u-axis and every strip keeps its area.
Hover or tap a strip in either panel. At each stage s the bottom panel plots height f(g(x))·g′(x)/((1 − s) + s·g′(x)) above w = (1 − s)x + s·g(x), so every strip keeps its exact area while the axis warps. Each g here is increasing on its interval; a decreasing g reverses the u-interval and the strips flip over. Pink marks area below the axis, which counts as negative.
The chain rule says d/dx F(g(x)) = F′(g(x))·g′(x). Read backwards, with F′ = f, it says that F(g(x)) is an antiderivative of f(g(x))·g′(x), and so
∫ₐᵇ f(g(x)) g′(x) dx = ∫ from g(a) to g(b) of f(u) du.
The picture explains the factor g′(x). The strip [xᵢ, xᵢ₊₁] has width Δx; its image [g(xᵢ), g(xᵢ₊₁)] has width Δu ≈ g′(xᵢ)Δx. A strip of height f(uᵢ) on the u side has area f(uᵢ)Δu ≈ f(g(xᵢ))g′(xᵢ)Δx, which is exactly the strip on the x side. The two Riemann sums agree strip by strip, and so do their limits. Leibniz’s notation du = g′(x) dx records this bookkeeping so well that substitution feels like algebra.
When g decreases the u-interval runs backwards, from g(a) down to g(b), and the orientation of the integral takes care of the sign. In practice the art is spotting a g whose derivative is sitting in the integrand already: 2x beside x², cos x beside sin x, eˣ beside e²ˣ = (eˣ)².
The curve plots v against u. Drag its endpoints and watch the indigo and green areas always add up to the difference of two rectangles.
u = x dv = sin x dx
du = dx v = −cos x
∫ x sin x dx = −x cos x + ∫ cos x dx
= −x cos x + sin x + CDrag the white endpoints along the curve. The parameter t is x itself. For ∫ x sin x dx the picture uses v = 1 − cos x rather than −cos x: any antiderivative of dv will do, and this one keeps the curve above the u-axis. The picture is cleanest when u and v both increase; the identity holds regardless.
The product rule (uv)′ = u′v + uv′, integrated from a to b, gives uv|ₐᵇ = ∫v du + ∫u dv, or
∫ u dv = uv|ₐᵇ − ∫ v du.
In the picture, uv at the end is the big rectangle, uv at the start is the small one, and the curve divides what lies between them into the area beside the v-axis (∫u dv) and the area above the u-axis (∫v du). The method pays off when ∫v du is easier than ∫u dv: differentiating ln x or arctan x turns them into algebraic functions, while integrating eˣ or sin x costs nothing.
That is the logic of the LIATE rule of thumb, popularised by a 1983 note of Herbert Kasube in the American Mathematical Monthly: choose u as the factor that comes first among Logarithmic, Inverse trigonometric, Algebraic, Trigonometric, Exponential. It is a heuristic, not a law. For ∫eˣ sin x dx, two rounds of parts bring back the original integral, and solving for it as an unknown finishes the job.
Drag the roots of the denominator and change the numerator. The dashed simple pieces always add up to the blue curve; slide two roots together to make a double root.
at x = 2.2: 0.078 − 1.667 − 2.188 = −3.776, and P/Q = −3.776
Drag the diamonds on the x-axis to move the roots of Q (they snap to steps of 0.05), and click elsewhere to move the probe. For a simple root the coefficient is the cover-up value P(r)/Q′(r). Drag one root onto another to make a double root: then the pieces are A/(x − r) + B/(x − r)², with B = the cover-up value of (x − r)²·P/Q at r and A from its derivative. When deg P ≥ deg Q, long division first splits off a polynomial. The builder uses real roots only; an irreducible quadratic like x² + 1 would need a piece (Bx + C)/(x² + 1).
A rational function P(x)/Q(x) is proper when deg P < deg Q; otherwise long division first splits off a polynomial. Over the real numbers Q factors into linear factors and irreducible quadratics, and the proper fraction is a sum of one simple piece for each: A/(x − r) for a simple root, A/(x − r) + B/(x − r)² for a double root, and (Bx + C)/(x² + px + q) for an irreducible quadratic. The decomposition exists and is unique.
For a simple root r the coefficient is quick to find. Multiply both sides by (x − r) and let x → r: every other piece vanishes, leaving A = P(r)/∏(r − rⱼ) over the other roots, the cover-up rule. Since that product is Q′(r), A = P(r)/Q′(r). Then each piece integrates at sight: A ln|x − r|, −B/(x − r), and an arctangent for the quadratics. So every rational function has an elementary antiderivative, once the denominator is factored.
Watch the coefficients as two roots approach each other: they grow large with opposite signs, their curves nearly cancelling, until at the moment the roots meet the pair is replaced by the double-root form. Johann Bernoulli and Leibniz both worked out the method for integrating rational functions around 1702.
Spot a mistake or have an idea?