Advanced level

The integral

Integration is differentiation run backwards: we look for the function whose derivative is the one we started with. An indefinite integral gives a formula up to a constant, a definite one gives a number — and that number is the area under the curve.

Before you start

This topic builds on earlier ideas. Before you start, it's worth working through the lessons below — they'll make everything click:

Where this is used

Real situations where you count exactly the way this lesson teaches:

  • Fuel used on a climb
    The trip computer shows instantaneous consumption in litres per hour, while what you want to know is how much fuel actually went. On a two-hour climb consumption rises from 6 to 12 l/h, that is f(t) = 6 + 3t. The amount used is the integral: ∫ (6 + 3t) dt from 0 to 2 = [6t + 1.5t²] = 12 + 6 = 18 litres. Multiplying by the opening reading would say 12 l, by the closing one 24 l — both wrong, and the car’s own gauge does exactly what the integral does: it sums hundreds of short stretches.
  • Work done compressing a spring
    A spring rated 20 N/cm, pressed 8 cm, pushes back with a force rising from zero to 160 N. You cannot get the work as force times distance, because the force keeps changing — you have to integrate: W = ∫ 2000x dx from 0 to 0.08 = 1000 · 0.0064 = 6.4 J. The "peak force times distance" shortcut gives 12.8 J, exactly twice too much, and the designer would order an actuator of double the power it needs.
  • The dose a worker absorbs
    A dosimeter measures dose rate in microsieverts per hour, while the regulations cap the total dose. When a cooling source has its dose rate falling as D(t) = 40 − 8t µSv/h, five hours of work give ∫ (40 − 8t) dt from 0 to 5 = 200 − 100 = 100 µSv, which is 0.5% of the 20 mSv annual limit. Without the integral the only safe answer would be to count at the highest rate — 200 µSv, and a shift half as long.
  • Output from solar panels
    A 5 kW peak array does not deliver 5 kW all day — the power is a curve and the output is the area under it. For the model P(t) = 5 − 0.2(t − 12)² kW between 07:00 and 17:00 the day yields ∫ P(t) dt = 33.3 kWh, not the 50 kWh that peak power times 10 hours suggests. That gap moves the payback from 8 years to 12, and it is the only number in the quotation that really means anything.
  • Consumer surplus
    Demand for tickets follows the curve P(q) = 60 − 2q, where q counts thousands of viewers, and the market price is 20. Everyone who would have paid more keeps the difference, and the sum of those differences is the region between the demand curve and the horizontal price line: ∫ from 0 to 20 of (60 − 2q − 20) dq = [40q − q²] = 800 − 400 = 400, that is 400 thousand. No multiplication of price by ticket count produces that figure — it is the area between TWO curves rather than under one, and it is exactly what the audience gained over what it paid.

All formulas

  • Antiderivative

    F(x)=f(x)F'(x) = f(x)

    F is an antiderivative of f when differentiating F gives f

  • Indefinite integral

    f(x)dx=F(x)+C\int f(x)\,dx = F(x) + C

    the result is a whole FAMILY of functions, hence the constant C

  • Power rule

    xndx=xn+1n+1+C(n1)\int x^n\,dx = \frac{x^{n+1}}{n+1} + C \quad (n \neq -1)

    the exponent grows by one, then divide by the new exponent

  • Newton–Leibniz formula

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

    the constant C cancels in the subtraction, so it never matters

  • Area under a curve

    f(x)0 on a;b    A=abf(x)dxf(x) \geq 0 \ \text{on} \ \langle a; b \rangle \implies A = \int_a^b f(x)\,dx

    the definite integral equals the area only above the axis

  • Area in general

    A=abf(x)dxA = \int_a^b |f(x)|\,dx

    where the curve dips below the axis, the area is computed piece by piece

  • Trigonometric functions

    sinxdx=cosx+C,cosxdx=sinx+C\int \sin x\,dx = -\cos x + C, \qquad \int \cos x\,dx = \sin x + C

    the minus sign changes sides compared with differentiation

  • The integral of 1/x

    1xdx=lnx+C\int \frac{1}{x}\,dx = \ln\lvert x \rvert + C

    the one exponent the power rule cannot handle

  • The exponential function

    exdx=ex+C\int e^x\,dx = e^x + C

    its own derivative, so its own antiderivative too

  • Area between two curves

    f(x)g(x) on a;b    A=ab(f(x)g(x))dxf(x) \geq g(x) \ \text{on} \ \langle a; b \rangle \implies A = \int_a^b \big(f(x) - g(x)\big)\,dx

    integrate the difference: upper curve minus lower

Differentiation answers the question "how fast is this changing". Integration asks the reverse: given the rate of change, what was the quantity? It is the operation inverse to the derivative — and at the same time the way to measure regions bounded by a curve.

The antiderivative

An antiderivative of a function ff is a function FF whose derivative is ff:

F(x)=f(x)F'(x) = f(x)

For f(x)=2xf(x) = 2x an antiderivative is F(x)=x2F(x) = x^2, because differentiating x2x^2 gives 2x2x. But so is x2+7x^2 + 7, and so is x2100x^2 - 100the derivative of a constant is zero, so shifting a graph vertically leaves the slope at every point untouched.

There are therefore infinitely many antiderivatives, and they differ by a constant alone.

The indefinite integral

We write it like this:

f(x)dx=F(x)+C\int f(x)\,dx = F(x) + C

The sign \int is an elongated "S" for sum, and dxdx says which variable we are integrating over. The constant of integration CC is not decoration: without it the notation would name one function instead of a whole family.

The power rule is the exact reverse of the one from differentiation — the exponent grows by one and then we divide by the new exponent:

xndx=xn+1n+1+C(n1)\int x^n\,dx = \frac{x^{n+1}}{n+1} + C \qquad (n \neq -1)
functionintegral
kk (a constant)kx+Ckx + C
xxx22+C\dfrac{x^2}{2} + C
x2x^2x33+C\dfrac{x^3}{3} + C
kx2\dfrac{k}{x^2}kx+C-\dfrac{k}{x} + C
sinx\sin xcosx+C-\cos x + C
cosx\cos xsinx+C\sin x + C
1x\dfrac{1}{x}lnx+C\ln\lvert x \rvert + C
exe^xex+Ce^x + C

The restriction n1n \neq -1 is there because n=1n = -1 would mean dividing by zero. That one exponent — together with the exponential function, which is not a power of the variable at all — is what the next section takes on.

A sum is integrated term by term, and a constant factor passes through an integral just as it passes through a derivative.

Compute the indefinite integral ∫ (6x² − 4x + 5) dx and check the result.

Two rows the power rule cannot reach

The last two rows of the table come the same way as every row before them: by reversing a derivative you already know. There is no new technique here — only a familiar equality read from right to left.

The integral of 1x\tfrac{1}{x}. The derivative of the natural logarithm is 1x\tfrac{1}{x}, so:

(lnx)=1x    1xdx=lnx+C(\ln x)' = \frac{1}{x} \implies \int \frac{1}{x}\,dx = \ln\lvert x \rvert + C

The absolute value is not decoration. A logarithm is defined for positive arguments only, whereas 1x\tfrac{1}{x} makes sense for negative ones too — and there the antiderivative is ln(x)\ln(-x), because (ln(x))=1x=1x(\ln(-x))' = \tfrac{-1}{-x} = \tfrac{1}{x}. Writing lnx\ln\lvert x \rvert covers both halves of the domain with one formula. The logarithm as an operation is taught in logarithms, and its graph in exponential and logarithmic functions.

That closes the power rule: for every exponent n1n \neq -1 the integral is xn+1n+1\tfrac{x^{n+1}}{n+1}, and for n=1n = -1 it is a logarithm. There is no gap left.

The integral of exe^x. The exponential function with base ee is its own derivative, so it is its own antiderivative as well:

(ex)=ex    exdx=ex+C(e^x)' = e^x \implies \int e^x\,dx = e^x + C

Up to a constant factor it is the only function with that property, and that is where the standing of the number ee throughout analysis comes from: with any other base both the derivative and the integral drag an extra factor along.

Compute the indefinite integral ∫ (3/x + 2e^x − x) dx for x > 0 and check the result.

The definite integral and Newton–Leibniz

Once limits of integration are written on the integral sign, the result stops being a function and becomes a number:

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

This is the Newton–Leibniz formula, one of the great theorems of mathematics: it ties differentiation to the measurement of areas. The computation has three steps — find an antiderivative, substitute the upper limit, subtract the value at the lower one.

The constant CC is irrelevant here, because it cancels in the subtraction:

(F(b)+C)(F(a)+C)=F(b)F(a)(F(b) + C) - (F(a) + C) = F(b) - F(a)
Compute the definite integral of (3x² − 4x + 1) from 1 to 3.

The area under a curve

Where do areas come into it? Slice the region under a graph into narrow vertical strips. Each is almost a rectangle of area f(x)Δxf(x) \cdot \Delta x, and the narrower the strips, the smaller the error. Passing to the limit — exactly the limit we met with the derivative — turns the sum of rectangle areas into an integral.

0123401234567xyf(x) = 2x
The region under f(x) = 2x from 0 to 3. Here the answer can be checked with geometry: it is a triangle of base 3 and height 6.

For a function that is non-negative across the interval, the definite integral simply is the area:

f(x)0 on a;b    A=abf(x)dxf(x) \geq 0 \ \text{on} \ \langle a; b \rangle \implies A = \int_a^b f(x)\,dx

Check it against the drawing above. The area of a triangle of base 33 and height 66 is 1236=9\tfrac{1}{2} \cdot 3 \cdot 6 = 9, and the integral:

032xdx=[x2]03=90=9\int_0^3 2x\,dx = \big[x^2\big]_0^3 = 9 - 0 = 9

They agree — and that is the whole power of the method: for a straight line geometry already knew the answer, but the integral computes the region under any curve, including those no formula in a book of shapes covers.

Find the area of the region bounded by f(x) = x², the x-axis and the lines x = 0 and x = 2.

When the curve dips below the axis

A definite integral measures area with a sign: stretches below the axis enter it with a minus. That is why "integral = area" only holds for non-negative functions.

012345−3−2−10123xyf(x) = x − 2
The two shaded triangles have the identical area of 2, but they lie on opposite sides of the axis. The integral subtracts them and returns 0; the area of the region is 4.

Compute both numbers. The antiderivative is F(x)=x222xF(x) = \tfrac{x^2}{2} - 2x, so:

04(x2)dx=(88)0=0\int_0^4 (x - 2)\,dx = (8 - 8) - 0 = 0

The area, on the other hand, is taken piece by piece with absolute values:

A=02(x2)dx+24(x2)dx=2+2=4A = \left| \int_0^2 (x - 2)\,dx \right| + \left| \int_2^4 (x - 2)\,dx \right| = |-2| + |2| = 4

In general:

A=abf(x)dxA = \int_a^b |f(x)|\,dx

The recipe is simple: find the zeros inside the interval, integrate over each piece separately, and add the absolute values of the results.

The area between two curves

So far the other boundary of the region has always been the axis, the line y=0y = 0. Nothing forces that choice: a region can just as well be closed between two curves.

The computation is the one we already have, only the strip is shorter. The narrow vertical strip above a point xx runs from the lower curve to the upper one, so its height is f(x)g(x)f(x) - g(x), and the area is the sum of the strips:

f(x)g(x) on a;b    A=ab(f(x)g(x))dxf(x) \geq g(x) \ \text{on} \ \langle a; b \rangle \implies A = \int_a^b \big(f(x) - g(x)\big)\,dx

Note that nothing is assumed about signs: both curves may lie below the axis and the difference fgf - g is non-negative all the same. What matters is the ordering — the lower curve is taken away from the upper.

Very often the problem states no interval at all, because the region is closed by the curves themselves. Then the limits of integration are computed: they are the intersections, the solutions of f(x)=g(x)f(x) = g(x).

−3−2−10123−6−5−4−3−2−1012345xyf(x) = 4 − x²g(x) = x + 2
The shaded region is closed by the parabola above and the line below. Nobody supplied the limits of integration — the curves fixed them themselves, meeting at x = −2 and x = 1.

Let us compute that area. The intersections:

4x2=x+2    x2+x2=0    (x+2)(x1)=04 - x^2 = x + 2 \iff x^2 + x - 2 = 0 \iff (x + 2)(x - 1) = 0

so a=2a = -2 and b=1b = 1. On that interval the parabola is the upper curve, so we integrate fgf - g:

A=21(4x2x2)dx=21(2xx2)dxA = \int_{-2}^{1} \big(4 - x^2 - x - 2\big)\,dx = \int_{-2}^{1} \big(2 - x - x^2\big)\,dx =[2xx22x33]21=76(103)=276=4.5= \left[2x - \frac{x^2}{2} - \frac{x^3}{3}\right]_{-2}^{1} = \frac{7}{6} - \left(-\frac{10}{3}\right) = \frac{27}{6} = 4.5

When the curves swap places

The formula assumes that the same curve stays on top across the whole interval. If the curves meet inside it, that assumption fails and the move is exactly the one used for a curve crossing the axis: split the interval at the intersection and add the areas of the pieces.

0123012345xyf(x) = x²g(x) = x
On ⟨0; 2⟩ the curves swap places at x = 1: up to 1 the line is higher, past 1 the parabola is. The region falls into two lobes and pinches to a point where they cross.
Find the area between f(x) = x² and g(x) = x on the interval ⟨0; 2⟩.

Two questions, two answers

It pays to keep three easily confused things apart:

  • the indefinite integral — a function (a family of functions), the answer to "what is this the derivative of";
  • the definite integral — a number, the result of the subtraction F(b)F(a)F(b) - F(a), possibly negative;
  • the area — a non-negative number, equal to the integral only when the curve stays above the axis.

That last distinction is the commonest source of wrong answers in area problems.

Exercises

The three kinds of question match the three parts of this lesson. For the indefinite integral, type an antiderivative — the constant C may be written out or left off, because the answer is graded up to a constant. For the definite integral the answer is a number, and it may well come out negative. For the area under a graph the answer is always non-negative, and in the harder questions the curve crosses the axis inside the interval — then the area is computed piece by piece.

Practice

Work through a set of exercises — they get harder as you go. At the end you'll see your score and the mistakes worth reviewing.

Exercise 1 of 8Score: 0
∫ (2x + 6) dx =

Common mistakes

  • Dropping the constant C — the result of an indefinite integral is a family of functions, so +C+\,C belongs to the answer.
  • Integrating as if differentiating — in an integral the exponent grows, and then you divide by the new exponent.
  • Equating the integral with the area — below the axis the integral is negative and an area never is.
  • Adding the pieces without the modulus — that gives the integral back, not the area.
  • Subtracting in the wrong order — it is F(b)F(a)F(b) - F(a): the lower limit is taken away from the upper one.
  • Carrying C through a definite integral — it cancels anyway and only clutters the computation.
  • Subtracting the wrong way round between two curves — integrate upper minus lower; the other order returns the area with a minus sign.
  • Dropping the modulus in 1xdx\int \tfrac{1}{x}\,dxlnx\ln x is an antiderivative only for x>0x > 0; negative arguments need lnx\ln\lvert x \rvert.

Formula card

Topic: The integral

  • Antiderivative

    F(x)=f(x)F'(x) = f(x)

    F is an antiderivative of f when differentiating F gives f

  • Indefinite integral

    f(x)dx=F(x)+C\int f(x)\,dx = F(x) + C

    the result is a whole FAMILY of functions, hence the constant C

  • Power rule

    xndx=xn+1n+1+C(n1)\int x^n\,dx = \frac{x^{n+1}}{n+1} + C \quad (n \neq -1)

    the exponent grows by one, then divide by the new exponent

  • Newton–Leibniz formula

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

    the constant C cancels in the subtraction, so it never matters

  • Area under a curve

    f(x)0 on a;b    A=abf(x)dxf(x) \geq 0 \ \text{on} \ \langle a; b \rangle \implies A = \int_a^b f(x)\,dx

    the definite integral equals the area only above the axis

  • Area in general

    A=abf(x)dxA = \int_a^b |f(x)|\,dx

    where the curve dips below the axis, the area is computed piece by piece

  • Trigonometric functions

    sinxdx=cosx+C,cosxdx=sinx+C\int \sin x\,dx = -\cos x + C, \qquad \int \cos x\,dx = \sin x + C

    the minus sign changes sides compared with differentiation

  • The integral of 1/x

    1xdx=lnx+C\int \frac{1}{x}\,dx = \ln\lvert x \rvert + C

    the one exponent the power rule cannot handle

  • The exponential function

    exdx=ex+C\int e^x\,dx = e^x + C

    its own derivative, so its own antiderivative too

  • Area between two curves

    f(x)g(x) on a;b    A=ab(f(x)g(x))dxf(x) \geq g(x) \ \text{on} \ \langle a; b \rangle \implies A = \int_a^b \big(f(x) - g(x)\big)\,dx

    integrate the difference: upper curve minus lower

0123401234567xyf(x) = 2x
The shaded region under f(x) = 2x on ⟨0; 3⟩. It is a triangle of base 3 and height 6, so its area is 9 — exactly what the definite integral returns.
012345−3−2−10123xyf(x) = x − 2
The region between f(x) = x − 2 and the axis on ⟨0; 4⟩. Two triangles of area 2 sit on opposite sides of the axis: the integral is 0, the area is 4.
−3−2−10123−6−5−4−3−2−1012345xyf(x) = 4 − x²g(x) = x + 2
The region closed between the parabola f(x) = 4 − x² and the line g(x) = x + 2. The limits of integration are not given — they are the intersections x = −2 and x = 1, the solutions of f(x) = g(x). The area is 4.5.

Frequently asked questions

Related articles