28 min read

For six chapters you have been a differentiation machine. Feed in a function $f$, turn the crank, and out comes its rate of change $f'$. You can do it to polynomials, to $\sin$ and $\cos$, to $e^x$ and $\ln x$, through products and quotients and...

Prerequisites

  • Chapter 11: Linear Approximation and Newton's Method

Learning Objectives

  • Compute antiderivatives of basic functions.
  • Use the notation $\int f(x) dx = F(x) + C$.
  • Solve initial value problems: given $f'$ and a point, find $f$.
  • Recognize antiderivatives of standard functions (polynomials, exponential, trig).
  • Apply antiderivatives to physical problems (kinematics).

Chapter 12 — Antiderivatives and the Idea of Integration

12.1 Running the Machine Backward

For six chapters you have been a differentiation machine. Feed in a function $f$, turn the crank, and out comes its rate of change $f'$. You can do it to polynomials, to $\sin$ and $\cos$, to $e^x$ and $\ln x$, through products and quotients and chains. Differentiation has become almost mechanical.

This chapter asks the opposite question — and it is a surprisingly deep one.

Given a rate of change, can you recover the function it came from?

Suppose all you know is that some function $f$ has derivative $f'(x) = 2x$. What was $f$? You have done enough differentiation to guess: $f(x) = x^2$ works, because $(x^2)' = 2x$. The act of finding a function from its derivative is called antidifferentiation, and the function you find is an antiderivative of $2x$.

But here is the first subtlety, and it never goes away. The function $x^2$ is not the only antiderivative of $2x$. So is $x^2 + 1$. So is $x^2 - 5$, and $x^2 + \pi$, and $x^2 + 1000$. Every one of them has derivative $2x$, because the derivative of a constant is zero. Differentiation forgets constants, so antidifferentiation cannot recover them.

This is the central theme of the whole chapter, and the bridge into the rest of the book. Calculus is the mathematics of change: derivatives measure change, and antiderivatives — as we are about to see — accumulate it back into a total. Differentiating loses information (the constant); to put that information back, you need one extra fact about the function. We will spend this chapter learning to recover $f$ from $f'$, and we will end by posing the question that the entire third part of this book is built to answer: what does antidifferentiation have to do with area?

The Key Insight. Antidifferentiation is differentiation run backward. It is well-defined, but only up to an additive constant — the integration constant $C$. Differentiation throws away constants; a single extra condition (an "initial value") puts the right one back and pins down $f$ exactly.

12.2 The +C Is Not Optional: Antiderivative Families

Let us be precise about why every antiderivative comes with a "$+C$" attached, because it is one of the few places in calculus where a theorem you already proved does real work.

Two functions can have the same derivative everywhere. We saw it above: $x^2$ and $x^2+1$ both differentiate to $2x$. The question is whether two functions with the same derivative can differ by anything other than a constant. The answer is no, and the reason is the Mean Value Theorem from Chapter 9.

Theorem (Antiderivatives differ by a constant). If $F'(x) = G'(x)$ for every $x$ in an interval, then $F(x) = G(x) + C$ for some constant $C$ on that interval.

Why it is true. Let $H(x) = F(x) - G(x)$. Then $H'(x) = F'(x) - G'(x) = 0$ everywhere on the interval. A function whose derivative is identically zero cannot go up or down — by the Mean Value Theorem, if $H$ took different values at two points $a$ and $b$, there would be a point between them where $H'$ equals the nonzero average slope $\frac{H(b)-H(a)}{b-a}$, contradicting $H' = 0$. So $H$ is constant: $H(x) = C$, which means $F(x) = G(x) + C$. $\blacksquare$

So the antiderivatives of a given function form a tidy family: take any one of them and add an arbitrary constant, and you have all of them. Geometrically, the family is a stack of identical curves, each a vertical shift of the others.

Geometric Intuition. Picture the antiderivatives of $2x$ as an infinite stack of parabolas: $x^2$, $x^2+1$, $x^2-3$, and so on, all the same shape, each slid up or down. At any fixed $x$, every parabola in the stack has the same slope $2x$ — that is the whole point, since they all share the derivative $2x$. Choosing a value of $C$ just decides which rung of the ladder you are standing on. An initial condition like "the curve passes through $(0,5)$" selects exactly one rung.

Warning. The "differ by a constant" theorem needs the domain to be a single interval. On a disconnected domain it can fail. Consider $F(x) = \ln|x|$ and $G(x) = \ln|x| + 3\,\mathrm{sign}(x)$. Both have derivative $1/x$ on $(-\infty,0)\cup(0,\infty)$, yet they do not differ by a single constant — they differ by $+3$ on the right and $-3$ on the left. The theorem still holds on each interval separately; it just cannot stitch a constant across the gap at $x=0$. This is why "$+C$" really means "one constant per interval of the domain."

12.3 The Indefinite Integral and Its Notation

We need a symbol for "the family of all antiderivatives of $f$." That symbol is the indefinite integral:

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

where $F$ is any one antiderivative of $f$ and $C$ is an arbitrary constant. Reading the pieces:

  • $\int$ is the integral sign — an elongated "S," which will mean "sum" once we reach Chapter 13.
  • $f(x)$ is the integrand — the function being antidifferentiated.
  • $dx$ specifies the variable of integration — here, $x$. It is not decoration; in $\int 2xt\,dx$ versus $\int 2xt\,dt$ the $dx$ tells you which letter is the variable and which is a constant.
  • $F(x) + C$ is the antiderivative family.

For now, treat $\int f(x)\,dx$ as nothing more than shorthand for "all the antiderivatives of $f$." The deliberately suggestive notation — the sum-sign $\int$, the differential $dx$ — is hinting at a connection to area and accumulation that we will not unveil until Chapters 13 and 14. The notation is a promissory note; the payoff is coming.

A worked reading: $\int 2x\,dx = x^2 + C$, spoken "the integral of $2x$ with respect to $x$ is $x^2$ plus a constant." Equivalently, "$x^2 + C$ is the general antiderivative of $2x$."

Common Pitfall. Many students drop the "$+C$" on an indefinite integral, writing $\int 2x\,dx = x^2$. This is not a harmless shorthand — it is a wrong answer. The indefinite integral is a whole family, not one function, and the constant carries the information that differentiation destroyed. Worse, omitting $C$ will sink you in initial value problems (Section 12.7), where the entire job is to find that constant. Train yourself now: every indefinite integral ends in $+C$.

12.4 The Basic Antiderivative Table

Every differentiation formula you memorized in Chapter 7 runs backward into an antidifferentiation formula. There is nothing new to learn here — just to read the derivative table from right to left. The verification of each line is always the same one move: differentiate the right side and check you recover the integrand.

Differentiation fact Antidifferentiation formula
$\dfrac{d}{dx}\dfrac{x^{n+1}}{n+1} = x^n$ $\displaystyle\int x^n\,dx = \frac{x^{n+1}}{n+1} + C \quad (n \neq -1)$
$\dfrac{d}{dx}\ln\lvert x\rvert = \dfrac{1}{x}$ $\displaystyle\int \frac{1}{x}\,dx = \ln\lvert x\rvert + C$
$\dfrac{d}{dx}e^x = e^x$ $\displaystyle\int e^x\,dx = e^x + C$
$\dfrac{d}{dx}\dfrac{a^x}{\ln a} = a^x$ $\displaystyle\int a^x\,dx = \frac{a^x}{\ln a} + C \quad (a>0,\ a\neq 1)$
$\dfrac{d}{dx}\sin x = \cos x$ $\displaystyle\int \cos x\,dx = \sin x + C$
$\dfrac{d}{dx}(-\cos x) = \sin x$ $\displaystyle\int \sin x\,dx = -\cos x + C$
$\dfrac{d}{dx}\tan x = \sec^2 x$ $\displaystyle\int \sec^2 x\,dx = \tan x + C$
$\dfrac{d}{dx}\sec x = \sec x \tan x$ $\displaystyle\int \sec x \tan x\,dx = \sec x + C$
$\dfrac{d}{dx}\arctan x = \dfrac{1}{1+x^2}$ $\displaystyle\int \frac{1}{1+x^2}\,dx = \arctan x + C$
$\dfrac{d}{dx}\arcsin x = \dfrac{1}{\sqrt{1-x^2}}$ $\displaystyle\int \frac{1}{\sqrt{1-x^2}}\,dx = \arcsin x + C$

These ten lines are the alphabet of integration. Every integral you compute for the rest of the book reduces, eventually, to recognizing one of these forms. Master them the way you mastered the multiplication table — by recall, not derivation.

Check Your Understanding. Without looking back at the table, write down an antiderivative of $\cos x$ and an antiderivative of $\sin x$. The sign trips people up.

Answer$\int \cos x\,dx = \sin x + C$ and $\int \sin x\,dx = -\cos x + C$. The minus sign lives with $\sin$, not $\cos$. Check both by differentiating: $(\sin x)' = \cos x$ ✓ and $(-\cos x)' = -(-\sin x) = \sin x$ ✓.

12.5 The Power Rule for Integration

The first line of the table deserves its own spotlight, because it is the single most-used antiderivative formula in all of calculus.

$$\int x^n\,dx = \frac{x^{n+1}}{n+1} + C \qquad (n \neq -1).$$

The recipe in words: raise the exponent by one, then divide by the new exponent. It is the exact reverse of the differentiation power rule, which lowered the exponent by one and multiplied by the old one. Verify it once and for all by differentiating the answer:

$$\frac{d}{dx}\left[\frac{x^{n+1}}{n+1}\right] = \frac{(n+1)x^{n}}{n+1} = x^n. \checkmark$$

The rule works for any exponent except $n = -1$ — negative, fractional, irrational, all fine — because the only thing that can break it is dividing by $n+1 = 0$.

Example 1 (positive integer power). $\displaystyle\int x^3\,dx = \frac{x^4}{4} + C.$

Example 2 (negative power). $\displaystyle\int x^{-2}\,dx = \frac{x^{-1}}{-1} + C = -\frac{1}{x} + C.$ Here $n=-2$, so $n+1 = -1$, and the rule applies cleanly. Check: $\left(-x^{-1}\right)' = x^{-2}$. ✓

Example 3 (fractional power / a root). $\displaystyle\int \sqrt{x}\,dx = \int x^{1/2}\,dx = \frac{x^{3/2}}{3/2} + C = \frac{2}{3}x^{3/2} + C.$ Dividing by $3/2$ means multiplying by $2/3$ — a step students rush and botch.

Common Pitfall. The exponent $n = -1$ is the one value the power rule cannot touch, and it is no accident which case breaks. Plugging $n=-1$ into the formula would force you to divide by $n+1 = 0$. Students who forget this write the nonsense $\int \frac{1}{x}\,dx = \frac{x^0}{0}$. The correct answer takes a completely different form — a logarithm: $\int \frac{1}{x}\,dx = \ln\lvert x\rvert + C$ (Section 12.6). Whenever you reach for the power rule, glance at the exponent first; if it is exactly $-1$, switch to the log.

12.6 The Logarithm: The Exception $n = -1$

The power rule has a hole at $n = -1$. The function $1/x = x^{-1}$ still has an antiderivative — it is just not a power of $x$. It is the natural logarithm:

$$\int \frac{1}{x}\,dx = \ln\lvert x\rvert + C.$$

Why the absolute value? The function $1/x$ is defined for all nonzero $x$, including negatives, but $\ln x$ is only defined for $x > 0$. The absolute value extends the antiderivative to negative inputs. Check that it works on the negative side: for $x < 0$, $\ln\lvert x\rvert = \ln(-x)$, and by the chain rule $\frac{d}{dx}\ln(-x) = \frac{1}{-x}\cdot(-1) = \frac{1}{x}$. ✓ The same derivative $1/x$ emerges on both sides of zero, so $\ln\lvert x\rvert$ is the right antiderivative everywhere $1/x$ lives.

This is the only place in the basic table where running differentiation backward produces a function of a genuinely different type than the one you started with — a rational input yields a transcendental output. It is a small miracle, and a glimpse of how integration can take you outside the family of functions you began with (a theme that explodes in Section 12.9).

12.7 Linearity: Breaking Integrals Apart

Antidifferentiation, like differentiation, is linear. Two rules let you dismantle any sum:

$$\int \big(f(x) + g(x)\big)\,dx = \int f(x)\,dx + \int g(x)\,dx, \qquad \int c\,f(x)\,dx = c\int f(x)\,dx.$$

In words: the integral of a sum is the sum of the integrals, and constant factors slide out front. Together they mean you can integrate any polynomial term by term, then bundle every constant of integration into a single $C$ at the end.

Example. Integrate the polynomial $3x^2 - 4x + 7$:

$$\int (3x^2 - 4x + 7)\,dx = 3\cdot\frac{x^3}{3} - 4\cdot\frac{x^2}{2} + 7x + C = x^3 - 2x^2 + 7x + C.$$

Notice the single $C$. Each term technically contributes its own constant, but the sum of arbitrary constants is just one arbitrary constant. There is never a reason to write $+C_1 + C_2 + C_3$.

Warning. Linearity covers sums and constant multiples — nothing else. There is no product rule and no quotient rule for integrals. In particular, $\int f(x)g(x)\,dx$ is almost never $\big(\int f\big)\big(\int g\big)$. Test it: $\int x\cdot x\,dx = \int x^2\,dx = x^3/3 + C$, but $\big(\int x\,dx\big)^2 = (x^2/2)^2 = x^4/4$ — completely different. Products and quotients require the genuine techniques of Chapter 15 (integration by parts) and Chapter 16. For now, expand or simplify the integrand into a sum before integrating, and never split a product.

12.7½ Reading the Chain Rule Backward

Linearity and the basic table let you integrate sums of standard functions. But a huge fraction of real integrands are standard functions with a linear inner function — $\sin(2x)$ instead of $\sin x$, $e^{3x+1}$ instead of $e^x$, $(4 + x^2)$ in a denominator. These are not in the table, yet they are within reach, because you can read the chain rule backward.

Recall the chain rule: $\frac{d}{dx}F(ax+b) = a\,F'(ax+b)$. That extra factor of $a$ is the only difference from the un-shifted case. So to antidifferentiate a standard function of $ax+b$, integrate as usual and then divide by $a$ to cancel the factor the chain rule would have introduced. This single observation handles a whole catalog of integrals:

Integral Antiderivative Why
$\displaystyle\int e^{kx}\,dx$ $\dfrac{1}{k}e^{kx} + C$ divide by the inner slope $k$
$\displaystyle\int \sin(kx)\,dx$ $-\dfrac{1}{k}\cos(kx) + C$ $\tfrac1k$ cancels the chain factor
$\displaystyle\int \cos(kx)\,dx$ $\dfrac{1}{k}\sin(kx) + C$ same
$\displaystyle\int (ax+b)^n\,dx$ $\dfrac{(ax+b)^{n+1}}{a(n+1)} + C \;(n\neq -1)$ power rule, then $\div a$
$\displaystyle\int \dfrac{1}{ax+b}\,dx$ $\dfrac{1}{a}\ln\lvert ax+b\rvert + C$ the $n=-1$ case, then $\div a$
$\displaystyle\int \dfrac{1}{a^2 + x^2}\,dx$ $\dfrac{1}{a}\arctan\!\dfrac{x}{a} + C$ rescaled arctangent

Three worked examples, each verified by differentiating:

Example 1. $\displaystyle\int e^{3x+1}\,dx = \frac{1}{3}e^{3x+1} + C.$ Check: $\big(\tfrac13 e^{3x+1}\big)' = \tfrac13\cdot 3\,e^{3x+1} = e^{3x+1}$. ✓

Example 2. $\displaystyle\int \cos(3x - 2)\,dx = \frac{1}{3}\sin(3x-2) + C.$ Check: $\big(\tfrac13\sin(3x-2)\big)' = \tfrac13\cdot 3\cos(3x-2) = \cos(3x-2)$. ✓

Example 3. $\displaystyle\int \frac{1}{4 + x^2}\,dx = \frac{1}{2}\arctan\!\frac{x}{2} + C,$ since here $a^2 = 4$ so $a = 2$. Check: $\frac{d}{dx}\big[\tfrac12\arctan(x/2)\big] = \tfrac12\cdot\frac{1/2}{1+(x/2)^2} = \frac{1}{4+x^2}$. ✓

These are sometimes called "almost-substitutions," because they are the easy cases of the $u$-substitution method that Chapter 15 develops in full generality. The restriction is essential: this trick works only when the inner function is linear ($ax+b$), because only then is the chain-rule factor a constant you can divide out. For a nonlinear inner function like $x^2$, the factor would be $2x$ — not a constant — and you cannot simply divide by it. That genuinely harder case is what substitution is for.

Common Pitfall. The divide-by-the-inner-slope trick is for linear inner functions only. Students over-apply it and write $\int \cos(x^2)\,dx = \frac{1}{2x}\sin(x^2) + C$ — which is flat wrong, as differentiating it (with the quotient rule!) immediately shows. You cannot "divide by $2x$" because $2x$ is not constant; it would re-enter the derivative. In fact $\int \cos(x^2)\,dx$ is non-elementary (a Fresnel integral, Section 12.9). Reserve the trick for $ax+b$, and never for $ax^2$, $\sqrt{x}$, or any other nonlinear interior.

12.8 Initial Value Problems: Pinning Down the Constant

We now confront the constant head-on. An indefinite integral hands you a whole family of functions; most real problems want exactly one. The extra information that selects it is an initial condition — the value of the function at a single point. The combined problem is a first-order initial value problem (IVP):

Find $f$ such that $f'(x) = g(x)$ and $f(a) = b$.

The recipe has three steps, and it is the same every time:

  1. Antidifferentiate to get the family: $f(x) = \int g(x)\,dx = G(x) + C$.
  2. Substitute the initial condition $f(a) = b$ to solve for the constant: $G(a) + C = b \;\Rightarrow\; C = b - G(a)$.
  3. Write the particular solution: $f(x) = G(x) + \big(b - G(a)\big)$.

Example. Solve $f'(x) = 2x$ with $f(1) = 5$.

Step 1: $f(x) = x^2 + C$. Step 2: the condition $f(1) = 5$ gives $1 + C = 5$, so $C = 4$. Step 3: $f(x) = x^2 + 4$.

Out of the infinite stack of parabolas $x^2 + C$, the initial condition picked the single one passing through $(1,5)$. That is what initial conditions do: they choose a rung on the ladder of Section 12.2.

Geometric Intuition. Picture the equation $f'(x) = 2x$ as a field of little slope-marks drawn across the plane: at every point $(x,y)$, draw a short segment with slope $2x$ (the slope depends only on $x$ here, so each vertical column of marks tilts the same way). A solution curve is any curve that flows tangent to these marks everywhere — and the whole family $y = x^2 + C$ does exactly that, an endless nest of parallel parabolas threading the field. The initial condition $f(1)=5$ drops a single dot at $(1,5)$; only one parabola in the nest passes through that dot. Solving an IVP is choosing the unique flow-line through your starting point. You will see these slope fields again, drawn for real differential equations, in Chapter 19.

A subtler example, requiring two integrations. Solve $f''(x) = 6x$ with $f'(0) = 1$ and $f(0) = 2$. Integrating once: $f'(x) = 3x^2 + C_1$, and $f'(0) = 1$ forces $C_1 = 1$, so $f'(x) = 3x^2 + 1$. Integrating again: $f(x) = x^3 + x + C_2$, and $f(0) = 2$ forces $C_2 = 2$. So $f(x) = x^3 + x + 2$. Each integration introduces one constant; each initial condition kills one. The bookkeeping always balances.

Check Your Understanding. Solve the IVP $f'(x) = \cos x$ with $f(\pi) = 1$.

AnswerAntidifferentiate: $f(x) = \sin x + C$. Apply the condition: $f(\pi) = \sin\pi + C = 0 + C = 1$, so $C = 1$. The particular solution is $f(x) = \sin x + 1$. (Check: $f'(x) = \cos x$ ✓ and $f(\pi) = 0 + 1 = 1$ ✓.)

12.9 When the Antiderivative Isn't Elementary

Here is a fact that startles most people the first time they meet it, and it is worth stating before we go on to applications, because it sets the honest boundary of the subject.

You can differentiate anything. Hand me any elementary function — any finite combination of polynomials, roots, exponentials, logarithms, and trig functions — and the differentiation rules will grind out its derivative in finite time, every time. Differentiation is a closed, mechanical procedure.

Antidifferentiation is not. There exist perfectly innocent-looking functions whose antiderivatives cannot be written using any finite combination of elementary functions:

$$\int e^{-x^2}\,dx, \qquad \int \sin(x^2)\,dx, \qquad \int \frac{1}{\ln x}\,dx, \qquad \int \frac{e^x}{x}\,dx.$$

This is not a confession that we are not clever enough. It is a theoremLiouville's theorem (1830s) — that these antiderivatives provably escape the elementary functions. An antiderivative still exists (we will see in Chapter 14 that every continuous function has one); it simply cannot be captured by a formula built from the functions you know. Mathematicians respond by defining new functions to name them: $\int e^{-x^2}\,dx$ becomes the error function $\mathrm{erf}$, and $\int \sin(x^2)\,dx$ becomes a Fresnel integral.

The first of these, $e^{-x^2}$, is no curiosity — it is the unnormalized bell curve, the beating heart of statistics. We will meet the area under it as a recurring anchor of this book, beginning in Chapter 13 and resolved with Taylor series in Chapter 23. The lesson for now: differentiation is easy and always works; integration is hard and sometimes has no formula at all. That asymmetry is one of the genuine surprises of calculus.

12.10 Rectilinear Motion: Acceleration → Velocity → Position

The cleanest, most physical use of antiderivatives is reconstructing motion. A particle moving along a line has three linked quantities, each the derivative of the one before:

$$\text{position } s(t) \;\xrightarrow{\ \frac{d}{dt}\ }\; \text{velocity } v(t) = s'(t) \;\xrightarrow{\ \frac{d}{dt}\ }\; \text{acceleration } a(t) = v'(t).$$

Differentiation walks this chain to the right. Antidifferentiation walks it to the left — and at each leftward step you pick up a constant that an initial condition must supply.

From velocity to position. Given $v(t)$ and an initial position $s(0) = s_0$, antidifferentiate $v$ and use the initial condition to fix the constant.

From acceleration to velocity. Given $a(t)$ and an initial velocity $v(0) = v_0$, antidifferentiate $a$ and use $v_0$.

Example (braking car). A car travels at $30$ m/s and brakes with constant deceleration $5$ m/s². Take $s(0) = 0$. Find its position, and how far it travels before stopping.

The acceleration is $a(t) = -5$. Antidifferentiate: $v(t) = -5t + C_1$, and $v(0) = 30$ gives $C_1 = 30$, so $v(t) = 30 - 5t$. Antidifferentiate again: $s(t) = 30t - \tfrac{5}{2}t^2 + C_2$, and $s(0) = 0$ gives $C_2 = 0$, so

$$s(t) = 30t - 2.5t^2.$$

The car stops when $v(t) = 0$, i.e. $30 - 5t = 0$, so $t = 6$ s. Its stopping distance is $s(6) = 180 - 2.5(36) = 180 - 90 = 90$ m. Two antidifferentiations and two initial conditions turned "how hard are the brakes" into "where does it stop."

Example (free fall, the canonical physics problem). Near Earth's surface, gravity gives every object the same downward acceleration $a = -g$, with $g \approx 9.8$ m/s². Throw a ball straight up at $v_0 = 20$ m/s from ground level, $h_0 = 0$.

Antidifferentiate acceleration: $v(t) = -9.8t + 20$. Antidifferentiate velocity: $s(t) = -4.9t^2 + 20t$ (the constant is $h_0 = 0$). Now read the motion off the formulas:

  • Maximum height occurs where $v = 0$: $t = 20/9.8 \approx 2.04$ s, giving $s(2.04) = -4.9(2.04)^2 + 20(2.04) \approx 20.4$ m.
  • Landing occurs where $s = 0$: $20t - 4.9t^2 = t(20 - 4.9t) = 0$, so $t = 0$ (the throw) or $t = 20/4.9 \approx 4.08$ s (the catch).

The total flight time, $\approx 4.08$ s, is exactly twice the time to the top — the up-and-down symmetry that antidifferentiation reproduces automatically. The same two antiderivatives, applied to $a = -g$, encode the entire trajectory of every thrown object near Earth.

Real-World Application — Vehicle stopping distances and road safety (engineering). Traffic engineers compute stopping sight distances using exactly the braking-car antiderivative above. Because stopping distance grows with the square of initial speed (the $t^2$ term integrates the constant deceleration), doubling your speed roughly quadruples your stopping distance — the antiderivative is why a $60$ mph crash is so much more than twice as dangerous as a $30$ mph one. The same kinematic integrals set highway curve banking, signal timing, and the "two-second rule" you were taught in driver's ed.

Real-World Application — Pharmacokinetics: reconstructing drug levels (medicine). When a drug is infused at a known time-varying rate $r(t)$ and cleared at another, the amount in the bloodstream is the antiderivative of the net rate of change, pinned by the initial dose. Reconstructing the concentration-versus-time curve from these rates — an initial value problem — is how pharmacologists choose dosing schedules that keep a drug above its therapeutic threshold but below its toxic one. Calculus appears in every quantitative field, and clinical dosing is one where the antiderivative is quite literally a matter of life and death.

12.11 Reconstructing Totals from Rates, Across Fields

Strip away the physics and a pattern remains: whenever you know how fast a quantity is changing and want the quantity itself, you antidifferentiate, then use a known value to fix the constant. This is the same three-step IVP recipe wearing different clothes in different disciplines.

  • Physics. Total electric charge from current: $Q' = I(t)$, so $Q(t) = \int I(t)\,dt + Q_0$. Current is the rate; charge is the total.
  • Economics. Total cost from marginal cost: a firm's marginal cost $C'(q)$ is the cost of the next unit produced; the cost function itself is $C(q) = \int C'(q)\,dq$, with the constant fixed by the fixed cost $C(0)$. Marginal anything is a derivative; total anything is its antiderivative.
  • Biology. Population from a growth rate: if $P'(t)$ is the net rate of births minus deaths, the population is $P(t) = \int P'(t)\,dt + P_0$.
  • Data science / statistics. The cumulative distribution function from a probability density: $F'(x) = p(x)$, so $F(x)$ — the probability of landing at or below $x$ — is an antiderivative of the density. Every CDF you ever build is an antiderivative of a PDF.

Common Pitfall. Some of these rates depend on the quantity itself — for instance, unconstrained population growth obeys $P'(t) = kP(t)$, where the rate is proportional to the current population. That is not a plain antidifferentiation problem, because the right-hand side contains the unknown $P$, not just $t$. You cannot simply integrate $kP$ with respect to $t$ when $P$ is what you are solving for. Such equations are differential equations (Section 12.12), and they need the separation-of-variables technique of Chapter 19. Plain antidifferentiation solves only $y' = g(x)$, where the right-hand side is a known function of $x$ alone.

12.12 The Simplest Differential Equation: A Preview

An equation that relates a function to its own derivatives is a differential equation. You have, in this chapter, already solved the simplest kind without naming it:

$$y'(x) = g(x).$$

Its solution is pure antidifferentiation: $y(x) = \int g(x)\,dx + C$, with $C$ set by an initial condition. Every initial value problem in this chapter is a baby differential equation.

What makes it the simplest is that the right-hand side depends only on the independent variable $x$, never on the unknown $y$. The moment $y$ appears on the right — as in $y' = ky$, or Newton's law of cooling $T' = -k(T - T_a)$, or the logistic growth model — antidifferentiation alone is no longer enough, and you need the machinery of Chapter 19. But the foundation under all of it is the skill you built here: given a rate, recover the total.

Math Major Sidebar — Existence and uniqueness, foreshadowed. Two questions hover over every IVP. Does a solution exist? And is it unique? For the clean case $y' = g(x)$ with $g$ continuous, the answer to both is yes: an antiderivative exists (Chapter 14 will prove it, via the accumulation function), and the "differ-by-a-constant" theorem of Section 12.2 makes the solution unique once the initial value fixes $C$. For general first-order equations $y' = f(x,y)$, existence and uniqueness become a genuine theorem (Picard–Lindelöf) requiring $f$ to be well-behaved in $y$. The constant $C$ you have been chasing is the simplest shadow of that deep theory: it counts the one degree of freedom an initial condition must remove.

12.13 Verifying Antiderivatives: Differentiate to Check

Integration has a built-in error-detector that differentiation lacks, and you should use it on every problem. Because antidifferentiation is the inverse of differentiation, you can always check an antiderivative by differentiating your answer — if you do not recover the integrand, your answer is wrong.

If $\displaystyle\int f(x)\,dx = F(x) + C$, then $F'(x)$ must equal $f(x)$.

This catches the three most common errors instantly: sign slips, wrong coefficients, and forgotten chain-rule factors. It costs ten seconds and it is foolproof — differentiation never lies.

Example. Claim: $\displaystyle\int (3x^2 - 4x)\,dx = x^3 - 2x^2 + C$. Differentiate the right side: $(x^3 - 2x^2)' = 3x^2 - 4x$. ✓ The claim holds.

The Key Insight. Because differentiation is mechanical and reliable, every integration answer can and should be checked by differentiating it. This is a luxury unique to integration — there is no comparably easy way to double-check most computations in mathematics. Use it relentlessly: on homework, on exams, and especially when a problem looks hard.

12.14 Computation: Symbolic Integration with SymPy

By hand you build understanding; with a computer you build power. SymPy will antidifferentiate symbolically, which lets you verify hand calculations and watch the boundary of "elementary" appear in real time.

import sympy as sp

x = sp.symbols('x')

# Polynomial — power rule and linearity, term by term
print(sp.integrate(x**3 + 2*x, x))
# Output: x**4/4 + x**2      (SymPy omits the +C by convention)

# Trigonometric and exponential — straight from the basic table
print(sp.integrate(sp.cos(x), x))   # Output: sin(x)
print(sp.integrate(sp.exp(x), x))   # Output: exp(x)

# The non-elementary case from Section 12.9 — SymPy reaches for a special function
print(sp.integrate(sp.exp(-x**2), x))
# Output: sqrt(pi)*erf(x)/2   <-- it had to invent erf; no elementary formula exists
import sympy as sp

# Verify a hand answer by differentiating it back (Section 12.13 in code)
x = sp.symbols('x')
F = x**3 - 2*x**2          # our claimed antiderivative of 3x^2 - 4x
print(sp.diff(F, x))       # Output: 3*x**2 - 4*x   -> matches the integrand, so F is correct

Computational Note. Two habits to internalize. First, SymPy returns one antiderivative and silently drops the "$+C$" — you must restore it mentally, because the family, not the representative, is the indefinite integral. Second, when sp.integrate returns erf, a Fresnel integral, or Si/Ci, that is the software telling you the integral is non-elementary (Section 12.9). It did not fail; it correctly reported that no elementary formula exists and named the special function instead. The machine respects Liouville's theorem just as you must.

12.15 The Question That Opens Part III

You can now run the differentiation machine backward. Given a rate, you recover the quantity, up to a constant that an initial condition supplies. You have a table of basic antiderivatives, the power rule, linearity, and a verification habit. That is a complete, self-contained skill — and it raises a question it cannot answer.

Look again at the notation we adopted in Section 12.3: the integral sign $\int$, an elongated "S" for sum, and the differential $dx$, a "little piece of $x$." Why on earth would the operation "find the function whose derivative is $f$" be written with the symbol for a sum? We brushed past it then as merely suggestive. It is not. It is a clue to the deepest fact in all of mathematics.

Here is the mystery, stated plainly. There is a second, completely different problem in calculus — older than antiderivatives, going back to Archimedes — that has nothing obviously to do with reversing derivatives:

The area problem. Given a curve $y = f(x)$ above an interval $[a,b]$, how much area lies between the curve and the $x$-axis?

Computing area means slicing the region into thin strips, approximating each by a rectangle, summing the rectangles, and taking a limit as the strips shrink — a process of accumulation that we will make precise in Chapter 13 under the name the definite integral, written $\int_a^b f(x)\,dx$. Notice it uses the same integral sign. That cannot be a coincidence, and it is not.

The breathtaking claim — which we will state in Chapter 14 as the Fundamental Theorem of Calculus, the single most important result in mathematics — is that these two unrelated-looking problems are the same problem in disguise. The area under $f$ from $a$ to $b$ is computed by finding an antiderivative $F$ and subtracting:

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

Finding areas (accumulating change) and finding antiderivatives (reversing rates) turn out to be inverse activities, exactly as differentiation and antidifferentiation are. The "$+C$" you fought with all chapter will cancel in the subtraction $F(b)-F(a)$, which is why it never mattered which antiderivative you picked. The humble skill you learned here — reversing the derivative — is about to become a machine for computing areas, volumes, work, probabilities, and totals of every kind.

We will not prove this yet. For now, just hold the mystery: what does antidifferentiation have to do with area? Two thousand years of mathematics could not see the connection. Newton and Leibniz did. Chapters 13 and 14 are where you will see it too.

Add to Your Modeling Portfolio. This chapter contributes the "recover the total from the rate" tool to your model — your first act of integration. Pick your track and add an antidifferentiation step with an initial condition. Biology: start from a population growth rate $P'(t)$ and antidifferentiate to a population function $P(t)$, using a known starting population $P_0$ to fix the constant. Economics: start from a marginal cost $C'(q)$ and recover the total cost $C(q)$, fixing the constant with the fixed cost $C(0)$. Physics: start from an acceleration $a(t)$ and integrate twice — to velocity, then position — using initial velocity and initial position as your two conditions. Data Science: start from a probability density $p(x)$ and antidifferentiate toward a cumulative distribution $F(x)$, the running total of probability. Note where this stalls — the bell curve $e^{-x^2/2}$ has no elementary antiderivative (Section 12.9); flag it, and we will return to it in Chapter 23.

Looking Ahead

This chapter is the last of Part II and the doorway into Part III. You arrived able to differentiate; you leave able to antidifferentiate, to solve initial value problems, and to reconstruct motion from acceleration.

Chapter 13 — The Definite Integral unveils what $\int_a^b$ truly means: the limit of Riemann sums, and geometrically, the area under a curve. Chapter 14 — The Fundamental Theorem of Calculus delivers the payoff promised in Section 12.15, welding antiderivatives to areas in one luminous equation and explaining at last why the sum-sign $\int$ is the right symbol for antidifferentiation. Chapters 15 and 16 build the techniques — substitution, parts, trigonometric methods, partial fractions — for finding the antiderivatives that Chapter 14 will demand. Chapter 19 returns to the differential equations we previewed here, when the rate depends on the quantity itself.

The handful of antiderivative formulas you memorized in this chapter is the launching pad for all of integration. Keep the table close; you are about to use it constantly.