Skip to content

CalculusLesson 5 of 6

From derivatives to integrals

The fundamental theorem of calculus

Fix a start aa and let xx slide. For a continuous function ff, let A(x)A(x) be its signed area from aa up to xx: the accumulated total. How quickly does this total change as xx moves?

Slide xx right by Δx\Delta x. The area grows by one new sliver, width Δx\Delta x and height f(x)f(x):

A(x+Δx)A(x)    f(x)ΔxA(x + \Delta x) - A(x) \;\approx\; f(x)\,\Delta x

Divide by Δx\Delta x and shrink:

A(x)=f(x)A'(x) = f(x)

The slope of the running total is the height you are adding right now. Where the curve is tall, area piles up fast and AA climbs steeply. Where the curve is near zero, AA goes flat. For a continuous density, the running total of probability works this way: the density is the slope of the CDF.

The hill f(x) = x(3 − x) on top, its running total A below. The area under f between two points equals A's climb. A's slope at any point equals f's height.

You want abf(x)dx\int_a^b f(x)\,dx. Find any function FF whose slope is ff. That is an antiderivative. On the interval from aa to bb, AA and FF have the same slope, so they are the same curve shifted up or down: A(x)=F(x)+CA(x) = F(x) + C. At x=ax = a nothing has been collected, so A(a)=0A(a) = 0, which means C=F(a)C = -F(a). Therefore:

abf(x)dx  =  F(b)F(a)\int_a^b f(x)\,dx \;=\; F(b) - F(a)

Find a function whose slope is the curve. Subtract its values at the two ends. For x2x^2, the slope of x3/3x^3/3 is x2x^2, so

01x2dx  =  133033  =  13\int_0^1 x^2\,dx \;=\; \frac{1^3}{3} - \frac{0^3}{3} \;=\; \frac13

This gives the same limit as the rectangle sums. For the hill in the widget, f(x)=3xx2f(x) = 3x - x^2 has antiderivative 32x213x3\tfrac32 x^2 - \tfrac13 x^3, so the area from 0 to 3 is 2729=4.5\tfrac{27}{2} - 9 = 4.5.

Here is the same theorem read the other way. Take any smooth FF and chop [a,b][a, b] into steps. The total change is the sum of the step changes. Every middle value appears once with a plus and once with a minus, and cancels:

[F(x1)F(a)]+[F(x2)F(x1)]+[F(b)F(x2)]  =  F(b)F(a)[F(x_1) - F(a)] + [F(x_2) - F(x_1)] + [F(b) - F(x_2)] \;=\; F(b) - F(a)

Each step change is about F(x)ΔxF'(x)\,\Delta x, one sliver under the curve FF'. Shrink the steps:

abF(x)dx  =  F(b)F(a)\int_a^b F'(x)\,dx \;=\; F(b) - F(a)

Add up all the small changes and you get the total change. Integrate speed, get distance. Integrate a slope, get the climb. This is the other direction of the fundamental theorem: integrating a continuous derivative recovers the total change.

On an interval, any two antiderivatives of ff differ by a constant. x3/3x^3/3, x3/3+7x^3/3 + 7, and x3/3100x^3/3 - 100 all have slope x2x^2. Written without ends, x2dx=x3/3+C\int x^2\,dx = x^3/3 + C. The CC cancels in F(b)F(a)F(b) - F(a). So antiderivatives are the derivative table read backwards:

Apply these formulas on an interval where the function is continuous. For arbitrary real powers, use x>0x>0; for 1/x1/x, the interval cannot cross zero.

height ffan antiderivative FFbecause
xnx^n (n1n \neq -1)xn+1n+1\dfrac{x^{n+1}}{n+1}(xn+1n+1)=xn\left(\dfrac{x^{n+1}}{n+1}\right)' = x^n
1/x1/x (x0x\ne0)lnx\ln\lvert x\rvertthe log’s slope
exe^xexe^xits own slope
cccxcxa line’s slope is cc

Some continuous functions have no antiderivative expressible using elementary functions such as polynomials, exponentials, and logarithms. One example is ex2e^{-x^2}. Its integrals can still be defined and approximated numerically. The standard normal CDF Φ\Phi is a related integral, using the normalized density ex2/2/2πe^{-x^2/2}/\sqrt{2\pi}.

Go deeper: the telescoping sum, with numbers

F(x)=x2F(x) = x^2 from 0 to 2 in four steps of 12\tfrac12. The step changes are 0.25,0.75,1.25,1.750.25, 0.75, 1.25, 1.75, which sum to 4=F(2)F(0)4 = F(2) - F(0). The predictions F(x)Δx=2x12F'(x)\,\Delta x = 2x \cdot \tfrac12 at each step’s left end are 0,0.5,1.0,1.50, 0.5, 1.0, 1.5, sum 3. At the right ends, 0.5,1,1.5,20.5, 1, 1.5, 2, sum 5. Shrink the steps and both close on 4.

A model’s loss can depend on many parameters. The next lesson holds all but one input fixed to define partial derivatives, then combines them to predict changes in several inputs.

Definition

Read the full glossary entry →