Start the course

Integrals

What is an integral? Area, Riemann sums, and the definite integral

7 min readUpdated

Quick answer

An integral adds up a quantity that changes continuously, such as the area under a curve or the distance traveled at a changing speed. The definite integral ∫abf(x)dx is defined as the limit of Riemann sums: approximate the area with n thin rectangles, then let n→∞. Area below the x-axis counts as negative, so the result is a net signed area.

Key points
  • A Riemann sum approximates an area with rectangles: width Δx times the function's height, added up.
  • The definite integral is the limit of Riemann sums as the rectangles get infinitely thin; it is a number.
  • Area above the x-axis counts as positive and area below counts as negative (net signed area).
  • The indefinite integral ∫f(x)dx is different: it means the family of antiderivatives, F(x)+C.
  • In practice, definite integrals are evaluated with antiderivatives, using the Fundamental Theorem of Calculus.

What problem does the integral solve?

If a car drives at a constant 50 mph for 3 hours, it travels 50×3=150 miles. On a graph of speed against time, that's the area of a rectangle 3 wide and 50 tall. But if the speed keeps changing, there's no single number to multiply by, and the region under the speed graph isn't a rectangle. The same problem appears whenever a rate varies: water flowing into a tank, a cost that builds up, the area of any curved shape. The integral is how calculus adds up a quantity that changes continuously.

What is a Riemann sum?

The idea is to cut the region into thin vertical strips and treat each strip as a rectangle. Over a narrow strip the curve barely changes, so a rectangle is a good approximation. Adding the rectangles' areas gives an estimate of the whole area, called a Riemann sum (after the mathematician Bernhard Riemann).

  • Cut the interval [a,b] into n equal pieces, each of width Δx= b−an (read "delta x": Δ means "change in").
  • In each piece, pick a sample point xi and use f(xi) as the rectangle's height. Common choices are the right endpoint, the left endpoint, or the midpoint of each piece.
  • Add up the rectangles: height times width, for each one.

The sum is written with sigma notation, where ∑ (the Greek capital S, for sum) means "add up":

∑i=1nf(xi)Δx=f(x1)Δx+f(x2)Δx+⋯+f(xn)Δx
Worked example: Estimating an area with rectangles

Estimate the area under y=x2 from x=0 to x=2 with 4 rectangles, using right endpoints.

  1. Width: Δx= 2−04= 0.5. The pieces are [0,0.5], [0.5,1], [1,1.5] and [1.5,2].
  2. Right endpoints: 0.5, 1, 1.5 and 2, so the heights are 0.25, 1, 2.25 and 4.
  3. Sum: (0.25+1+2.25+4)×0.5= 7.5×0.5= 3.75.

Answer: About 3.75. (The exact area turns out to be 83≈2.67; right endpoints overestimate here because the curve is rising.)

0.511.521234right endpointssum = 3.75
Four right-endpoint rectangles under y=x2 on [0,2]. Their tops stick out above the curve, so the estimate 3.75 is too big.

What is the definite integral?

More rectangles give a better estimate, because thinner strips hug the curve more closely. The exact area is what the estimates approach as the number of rectangles grows without bound, so we define it with a limit:

Definition: definite integral

The definite integral of f from a to b is ∫abf(x)dx= limn→∞∑i=1nf(xi)Δx, when this limit exists. Every continuous function on [a,b] has one, whichever sample points are used.

The notation copies the Riemann sum piece by piece:

SymbolNameMeaning
∫integral signa stretched S, for sum; it replaces ∑
a, blower and upper limits of integrationwhere the adding starts and stops (here "limit" means end point)
f(x)integrandthe height of each thin rectangle
dxthe differentialthe infinitely thin width, replacing Δx; it also names the variable

The result is a number, not a function. For ∫02x2dx, letting the number of rectangles grow without bound gives exactly 83.

What does it mean when an integral is negative?

If f(x) is negative, the rectangle "heights" f(xi) are negative, so those rectangles contribute negative amounts. The definite integral therefore measures net signed area: area above the x-axis counts as positive, area below counts as negative, and they partly cancel.

Worked example: Net area from geometry

Evaluate ∫03(2x−2)dx using areas.

  1. The graph is the straight line y=2x−2, which crosses the x-axis at x=1.
  2. From 0 to 1 it's below the axis: a triangle with base 1 and height 2, area 12⋅1⋅2= 1. This counts as −1.
  3. From 1 to 3 it's above: a triangle with base 2 and height 4 (since 2⋅3−2=4), area 12⋅2⋅4= 4.
  4. Net: −1+4=3.

Answer: 3

0.511.522.53-2-11234−1+4
y=2x−2 on [0,3]: the small triangle below the axis counts as −1 and the larger one above as +4, so the integral is 3.
Common mistake

Confusing net area with total area. ∫03(2x−2)dx= 3, but the total area between the line and the axis is 1+4=5. If a question asks for total area (or total distance), split the integral where the function changes sign; see the Fundamental Theorem of Calculus.

What are the basic properties of definite integrals?

PropertyIn symbols
Integrals of sums split∫ab(f+g)dx= ∫abfdx+∫abgdx
Constants come out∫abcf(x)dx= c∫abf(x)dx
Reversing the limits flips the sign∫bafdx= −∫abfdx
Zero width gives zero∫aafdx=0
Intervals add∫acfdx+∫cbfdx= ∫abfdx

What is the difference between a definite and an indefinite integral?

A definite integral ∫abf(x)dx has limits and is a number: a net area. An indefinite integral ∫f(x)dx, with no limits, means something different: the family of all antiderivatives of f, the functions whose derivative is f. For example, ∫2xdx=x2+C, where C stands for any constant, because the derivative of x2+C is 2x whatever C is.

The two ideas are connected by the most important result in the subject, the Fundamental Theorem of Calculus: to evaluate ∫abf(x)dx, find an antiderivative F and compute F(b)−F(a). For ∫02x2dx, the antiderivative x33 gives 83−0=83 in one line, with no rectangles at all.

Learn it step by step

The full lessons in the course explain this from the ground up, with graphs, worked examples, and practice problems that each have a complete worked solution.

Open the lesson

Frequently asked questions

What is an integral in simple terms?

A way of adding up infinitely many infinitely small pieces. Geometrically, the definite integral is the (signed) area under a curve between two points.

What is the difference between a Riemann sum and an integral?

A Riemann sum adds up a finite number of rectangles, so it's an approximation. The definite integral is the exact value those sums approach as the number of rectangles grows without bound.

Can an integral be negative?

Yes. Area below the x-axis counts as negative, so if more of the region lies below the axis than above, the definite integral is negative.

What does dx mean in an integral?

It stands for the width of the infinitely thin rectangles, the limit of Δx, and it tells you which variable you're integrating with respect to.

What is the integral of a constant?

The constant times the length of the interval: ∫abcdx= c(b−a), the area of a rectangle. As an indefinite integral, ∫cdx=cx+C.

Is integration the opposite of differentiation?

In a precise sense, yes: the Fundamental Theorem of Calculus shows that differentiating an area function gives back the original function, and that definite integrals can be computed with antiderivatives.