Calculus II: Integration
Two questions, one answer#
Integration answers two apparently unrelated questions. Question one: what is the area under a curve? Chop it into rectangles, add them up, refine forever:

\int_a^b f(x)\,dx = \lim_{n\to\infty} \sum_{i=1}^n f(x_i)\,\Delta x.
Question two: which function has derivative f? Such an F (with F' = f) is an antiderivative, written \int f(x)\,dx = F(x) + C — the constant C because derivatives kill constants.
That these two questions have the same answer is the miracle at the center of calculus:
The Fundamental Theorem of Calculus. If F' = f, then \int_a^b f(x)\,dx = F(b) - F(a). Area — a global, accumulated quantity — is computed by evaluating an antiderivative at just the two endpoints. Accumulation and rate-of-change are inverse operations: the odometer is the integral of the speedometer.
The basic antiderivatives are the derivative table read in reverse:
\begin{aligned}\int x^n dx = \frac{x^{n+1}}{n+1} + C \;(n \ne -1), \\ \int \frac{dx}{x} = \ln|x| + C, \\ \int e^x dx = e^x + C,\end{aligned} \begin{aligned}\int \cos x\, dx = \sin x + C, \\ \int \sin x\, dx = -\cos x + C.\end{aligned}
The two great techniques#
Substitution is the chain rule run backwards. The chain rule says \frac{d}{dx}\sin(x^2) = \cos(x^2) \cdot 2x — so if we meet \int 2x\cos(x^2)\,dx, the answer must be \sin(x^2) + C. Substitution is the bookkeeping that makes this recognition systematic. The five-step ritual, fully narrated:
Evaluate \int 2x\cos(x^2)\,dx.
- Choose u: pick the inner function. u = x^2
\begin{aligned}&\text{2. Compute } du: \text{ differentiate } u. && \frac{du}{dx} = 2x \ \Rightarrow\ du = 2x\,dx \\ &\text{3. Rewrite the integral entirely in } u: && \int \cos(\underbrace{x^2}_{u})\,\underbrace{2x\,dx}_{du} = \int \cos u\,du \\ &\phantom{3.}\ \text{— the } 2x\,dx \text{ we "happened" to have is } du.\end{aligned}
(that coincidence is the whole method)
\begin{aligned}&\text{4. Integrate in } u: && \int \cos u\,du = \sin u + C \\ &\text{5. Substitute back } u = x^2: && \boxed{\sin(x^2) + C}\end{aligned}
Verify by differentiating — the habit that makes integration self-correcting: \frac{d}{dx}\sin(x^2) = \cos(x^2)\cdot 2x ✓, exactly the integrand.
What if the constant doesn’t match perfectly? Then balance it by hand. For \int x\,e^{x^2}dx: choose u = x^2, so du = 2x\,dx — but the integrand has only x\,dx, which is \frac{1}{2}du. So \begin{gathered}\int x e^{x^2} dx \\ = \int e^u \cdot \tfrac{1}{2}\,du \\ = \tfrac{1}{2}e^u + C \\ = \tfrac{1}{2}e^{x^2} + C,\end{gathered} and differentiating the answer gives \frac{1}{2}e^{x^2}\!\cdot 2x = xe^{x^2} ✓. Substitution succeeds precisely when the integrand contains a function and (up to a constant) its derivative; training the eye to spot that pair is the skill.
Integration by parts is the product rule run backwards. Start from the product rule and integrate both sides: \begin{gathered}(uv)' \\ = u'v + uv' \\ \Rightarrow uv \\ = \int u'v\,dx + \int uv'\,dx \\ \Rightarrow \int u\,dv \\ = uv - \int v\,du.\end{gathered} It is a trade: swap the integral you have for a (hopefully easier) one. The craft is choosing which factor to call u — pick the factor that gets simpler when differentiated (a useful priority order: Logs, Inverse trig, Algebraic powers, Trig, Exponentials — differentiate the earlier, integrate the later). Fully worked:
Evaluate \int x e^x\,dx.
\begin{aligned}&\text{1. Choose: } u = x \text{ (a power — differentiating kills it)}, && dv = e^x dx \\ &\text{2. Then: } du = dx, && v = \int e^x dx = e^x \\ &\text{3. Apply the formula: } \int u\,dv = uv - \int v\,du && \int xe^x dx = xe^x - \int e^x\,dx\end{aligned}
- The new integral is elementary: = xe^x - e^x + C = (x-1)e^x + C.
Verify: \frac{d}{dx}\big[(x-1)e^x\big] = 1\cdot e^x + (x-1)e^x = xe^x ✓. (Try the other choice, u = e^x, dv = x\,dx: you get \int \frac{x^2}{2}e^x dx — harder than what you started with. Parts punishes bad casting immediately, which at least makes the mistake obvious.)
What integrals compute#
Everything that accumulates. The area between curves f (above) and g (below) is \int_a^b (f - g)\,dx. A solid of revolution about the x-axis has volume \pi\int_a^b f(x)^2\,dx (a stack of discs). Distance is the integral of speed; total rainfall the integral of rainfall rate; probability the integral of a density — the normal curve of Chapter 9 encloses total area exactly 1.
Worked example, start to finish. Find the area enclosed between y = x^2 and y = x + 2.
- Where do they cross? Set them equal: x^2 = x + 2
\begin{aligned}&\phantom{1.}\ \text{Rearrange and factor:} && (x-2)(x+1) = 0 \;\Rightarrow\; x = -1,\ 2 \\ &\text{2. Which is on top? Test } x = 0: && x + 2 = 2 > 0 = x^2 \text{ — the line} \\ &\text{3. Area} = \int_{-1}^{2}\big[\text{top} - \text{bottom}\big]\,dx && = \int_{-1}^{2}\big[(x+2) - x^2\big]dx\end{aligned}
- Antidifferentiate term by term: \left[\frac{x^2}{2} + 2x - \frac{x^3}{3}\right]_{-1}^{2}
\begin{aligned}&\text{5. Evaluate at } x = 2: && 2 + 4 - \frac{8}{3} = \frac{10}{3} \\ &\text{6. Evaluate at } x = -1: && \frac{1}{2} - 2 + \frac{1}{3} = -\frac{7}{6}\end{aligned}
- Subtract the two: \frac{10}{3} + \frac{7}{6} = \frac{27}{6} = \boxed{\frac{9}{2}}.
A positive answer is a sanity check in itself — an enclosed area must be positive; getting a negative number almost always means top and bottom were swapped in step 3.
If you keep one thing from this chapter: Integration accumulates, differentiation reads rates, and the Fundamental Theorem says they are inverse operations: area from just two endpoint values of an antiderivative.
Exercises 14
- Evaluate \displaystyle\int_0^1 (3x^2 - 2x + 4)\,dx and \displaystyle\int_1^{e} \frac{dx}{x}.
- Use substitution: \displaystyle\int x\sqrt{x^2 + 1}\;dx and \displaystyle\int \tan x \, dx.
- Use parts: \displaystyle\int x \ln x \, dx.
- Find the area enclosed by y = \sin x and the x-axis for 0 \le x \le \pi.
- The region under y = \sqrt{x} from 0 to 4 is revolved about the x-axis. Find the volume.
In the wild. Integrals compute every accumulated quantity in engineering: energy from power, charge from current, distance from GPS velocity. Probability lives on integrals — the chance a continuous quantity lands in a range is an area under a density (Chapter 20). And whenever a computer “integrates” (weather models, physics engines, option pricing), it is running a Riemann sum with a very large n: numerical integration is the middle panel of the figure above, industrialized.
Checkpoint Review III — The Whole of School Mathematics
Cumulative, Chapters 9–14, closing Part II.
- Compute (2 - i)(3 + 2i).
- What is the probability of exactly 2 heads in 4 fair flips?
- Show (1, 2, 2) and (2, -2, 1) are perpendicular.
- Why does \begin{pmatrix}2 & 1\\ 4 & 2\end{pmatrix} have no inverse? What does that mean for the system 2x + y = 1, 4x + 2y = 5?
- Differentiate \sin^2 x and recognize the result.
- Evaluate \int_0^1 (1 - x^2)\,dx.
- Find the tangent line to y = e^x at x = 0.
- Find the area under y = \frac{1}{x} from 1 to e^2.
Answers. 1. 6 + 4i - 3i - 2i^2 = 8 + i. 2. \binom{4}{2}/2^4 = \frac{6}{16} = \frac38. 3. Dot product 2 - 4 + 2 = 0. 4. \det = 4 - 4 = 0 — the rows are proportional, so the lines are parallel; and since 1 \times 2 \ne 5, they are distinct parallels: no solution. 5. 2\sin x\cos x = \sin 2x — the chain rule rediscovering the double angle. 6. [x - \frac{x^3}{3}]_0^1 = \frac23. 7. Slope e^0 = 1 through (0,1): y = x + 1 (the linear approximation behind “e^x \approx 1 + x”). 8. [\ln x]_1^{e^2} = 2.