Integration begins with a simple idea: if a region is too curved to measure with one familiar geometry formula, approximate it with many simple shapes. A Riemann sum approximates accumulated change by cutting an interval into small pieces and adding rectangle areas.
Suppose we want the signed area under f(x) on [a,b]. Divide the interval into n subintervals of equal width
Δx=nb−a.
Choose one sample point xi∗ in each subinterval. The rectangle on that subinterval has height f(xi∗) and width Δx, so the total approximation is
i=1∑nf(xi∗)Δx.
The sample point determines the type of Riemann sum. There are three types of rectangular Riemann sums: left Riemann sums, right Riemann sums, and midpoint Riemann sums.
A left Riemann sum uses the left endpoint of each subinterval. On an increasing function, left sums usually underestimate because each rectangle uses the smaller height from its interval.
Example. Approximate ∫02x2dx with a left Riemann sum using n=4.
A right Riemann sum uses the right endpoint of each subinterval. On an increasing function, right sums usually overestimate because each rectangle uses the larger height from its interval.
Example. Approximate ∫02x2dx with a right Riemann sum using n=4.
A midpoint Riemann sum uses the center of each subinterval. Midpoint sums often give a better estimate than left or right sums with the same number of intervals because the rectangle height is chosen from the middle.
Example. Approximate ∫02x2dx with a midpoint Riemann sum using n=4.
The subintervals are [0,0.5], [0.5,1], [1,1.5], and [1.5,2]. Their midpoints are 0.25,0.75,1.25,1.75. Thus
The trapezoidal rule uses trapezoids instead of rectangles. On each subinterval, connect the two endpoint heights with a straight segment. The area of one trapezoid is
21(width)(left height+right height).
For equal spacing Δx,
∫abf(x)dx≈2Δx[y0+2y1+2y2+⋯+2yn−1+yn].
Example. Approximate ∫02x2dx with the trapezoidal rule using n=4.
With table data, the width of each subinterval matters. Equal spacing is convenient, but AP tables often use unequal intervals.
For left and right sums, multiply each function value by the width of its interval. For trapezoids, each interval contributes
21(width)(left height+right height).
If the function is increasing, a left sum underestimates and a right sum overestimates. If the function is decreasing, the reverse is true. Concavity controls whether trapezoids or midpoints tend to overestimate or underestimate.
Example. A car’s velocity is measured in miles per hour:
t (hours)v(t) (mph)020135350442
Approximate the distance traveled from t=0 to t=4 using a left Riemann sum.
The intervals have widths 1, 2, and 1. A left sum uses the left endpoint velocity on each interval:
20(1)+35(2)+50(1)=20+70+50=140.
The car traveled approximately 140 miles. The units work because
Although Riemann sums are a great way to approximate the area under the curve, you always end of over- or underestimating the actual area. One way to fix this is to shrink the width of the rectangles used to an infinitesimally small value dx (basically 0) so that the height of each rectangle represents the actual height. We define a function called the definite integral to model this limit.
Definition. The definite integral of f from a to b is the limit of Riemann sums:
∫abf(x)dx=n→∞limi=1∑nf(xi∗)Δx,
as the width of the largest subinterval approaches 0, assuming this limit exists. f(x) is called the integrand, and dx is “integrating with respect to x”. a and b are the bounds of integration, with a being the bottom bound and b being the top bound.
A key property of the definite integral is
∫abf(x)dx=−∫baf(x)dx.
This is because we usually define the definite integral using singed area (talked about right after this), meaning that the direction of the area matters. We usually take right and above as positive, meaning that integrating from right to left or integrating under the x-axis results in a negative area.
The definite integral is defined as a limiting area process, but computing a limit of Riemann sums every time would be painful. The Fundamental Theorem of Calculus gives the shortcut: if you can find an antiderivative, then a definite integral can be evaluated by subtracting endpoint values.
The theorem also explains why derivatives and integrals are inverse processes. Derivatives measure instantaneous change; integrals add up accumulated change.
Theorem (Fundamental Theorem of Calculus). If for some functions F(x) and f(x), F′(x)=f(x), then
∫abf(x)dx=F(b)−F(a).
Also, if
g(x)=∫axf(t)dt,
then
g′(x)=f(x)
when f is continuous.
Proof (Fundamental Theorem of Calculus). Let
G(x)=∫axf(t)dt.
To find G′(x), use the derivative definition:
G′(x)=h→0limhG(x+h)−G(x).
Substitute the definition of G:
G(x+h)−G(x)=∫ax+hf(t)dt−∫axf(t)dt=∫xx+hf(t)dt.
Thus
G′(x)=h→0limh1∫xx+hf(t)dt.
If f is continuous, then on a very small interval from x to x+h, the average value of f approaches f(x). Therefore
G′(x)=f(x).
Now suppose F′(x)=f(x). Since G′(x)=f(x) too, the functions F and G differ only by a constant. Using total change,
This is can be thought of as the chain rule for FTC.
Proof (Chain rule form of FTC). Define
A(x)=∫axf(t)dt.
By the Fundamental Theorem,
A′(x)=f(x).
If the upper limit is v(x), then
∫av(x)f(t)dt=A(v(x)).
Differentiate using the chain rule:
dxdA(v(x))=A′(v(x))v′(x)=f(v(x))v′(x).
For a lower limit u(x), rewrite
∫u(x)v(x)f(t)dt=∫av(x)f(t)dt−∫au(x)f(t)dt.
Differentiate both pieces:
dxd∫u(x)v(x)f(t)dt=f(v(x))v′(x)−f(u(x))u′(x).
Example. Find dxd∫0x2costdt.
Here the upper limit is v(x)=x2 and the lower limit is the constant 0. By the chain-rule form of the Fundamental Theorem, evaluate the integrand at the upper limit and multiply by its derivative:
v′(x)=2x.
Therefore
dxd∫0x2costdt=cos(x2)⋅2x=2xcos(x2).
The lower limit contributes nothing because its derivative is zero.
Definition. An antiderivative of f is any function F such that
F′(x)=f(x).
However, antiderivatives are more commonly known as indefinite integrals. Another way to represent the antiderivative is using the integral sign:
F(x)=∫f(x)dx.
Note that antiderivatives have no bounds. Instead of finding a value, the antiderivative finds a function whose derivative calculates to the original function.
This is the key difference:
A definite integral has bounds and returns a number.
An indefinite integral has no bounds and returns a family of functions.
For indefinite integrals, you always have to add a constant of integration+C. The +C is necessary because derivatives lose constant information. For example,
dxd(x2)=2x,dxd(x2+5)=2x,dxd(x2−11)=2x.
So when reversing the derivative of 2x, all of those possibilities must be included:
∫2xdx=x2+C.
Example. Compute ∫(3x2+4x)dx.
Apply the reverse power rule to each term, raising the exponent by one and dividing:
∫3x2dx=x3,∫4xdx=2x2.
Combining the pieces and adding the constant of integration gives
∫(3x2+4x)dx=x3+2x2+C.
The +C is required because every constant has derivative zero, so the antiderivative is only determined up to a constant.
Before integrating, check the form of the integrand and the bounds. They can suggest a substitution, a symmetry, or another way to simplify the calculation.
King’s rule and Queen’s rule are symmetry shortcuts for definite integrals. King’s rule says that
∫abf(x)dx=∫abf(a+b−x)dx.
This comes from the substitution u=a+b−x. It reflects the input across the midpoint of the interval. The most common move is to write the integral once normally, write it again using King’s rule, and then add the two versions.
Queen’s rule is a related way to split an interval in half:
∫02af(x)dx=∫0a[f(x)+f(2a−x)]dx.
This is useful when the whole interval has symmetry around x=a, but adding the two mirrored pieces is easier than working on the full interval. Both rules are relatively easy to prove, and it is left to the reader to prove.
Example. Evaluate
I=∫0π/2sinx+cosxsinxdx.
Here a=0 and b=2π, so King’s rule uses
x↦2π−x.
Then
I=∫0π/2sin(2π−x)+cos(2π−x)sin(2π−x)dx.
Use sin(2π−x)=cosx and cos(2π−x)=sinx:
I=∫0π/2sinx+cosxcosxdx.
Add this to the original integral:
2I=∫0π/2sinx+cosxsinx+cosxdx=∫0π/21dx=2π.
Therefore
I=4π.
Example. Evaluate
I=∫0π1+cos2xxsinxdx.
The interval [0,π] has midpoint 2π, so write it in Queen’s-rule form with 2a=π:
The tabular method is a faster way to organize repeated integration by parts when one factor eventually differentiates to 0, such as a polynomial.
It is best for integrals of the form
∫(polynomial)(easy-to-integrate function)dx.
Make two columns:
differentiate the polynomial until it becomes 0,
integrate the other factor the same number of times.
Then multiply along the diagonals and alternate signs +,−,+,−,…. This is the same integration by parts formula repeated several times, just organized in a table.
Example. Use the tabular method to compute
∫x2exdx.
Differentiate x2 repeatedly and integrate ex repeatedly:
Partial fractions break a rational function into simpler rational pieces. Before using them, make sure the numerator degree is smaller than the denominator degree. If not, divide first.
For a denominator like
(x−a)(x−b),
write
(x−a)(x−b)P(x)=x−aA+x−bB.
Then solve for the constants and integrate each term. For more details, you can look at Unit 13 of AP Precalculus for a reminder of how to solve partial fractions.
Definition. An improper integral is a definite integral where ordinary endpoint evaluation does not make sense. This happens in two main ways:
the interval is infinite, such as [1,∞),
the integrand becomes unbounded, such as 1/x near x=0.
Improper integrals are not evaluated by simply plugging in infinity or plugging in a vertical asymptote. They must be rewritten as limits.
For an infinite interval,
∫1∞x21dx=b→∞lim∫1bx21dx.
For an infinite discontinuity inside the interval, split at the discontinuity. For example,
∫01x1dx=a→0+lim∫a1x1dx.
The integral converges if the limit is finite and diverges otherwise. If an improper integral has two problematic endpoints or an interior discontinuity, every required limit must converge.
Convergence means the limiting accumulated value is finite. Divergence means the accumulated value does not settle to a finite number.
Example. Evaluate ∫1∞x21dx.
Because the interval is infinite, rewrite the integral as a limit with a finite upper endpoint b:
∫1∞x21dx=b→∞lim∫1bx−2dx.
Compute the inner integral using ∫x−2dx=−x−1:
∫1bx−2dx=[−x1]1b=−b1+1=1−b1.
Now take the limit:
b→∞lim(1−b1)=1.
The limit is finite, so the improper integral converges and its value is 1.