Derivatives answer "how fast is this quantity changing right now?". Integral calculus answers the reverse question: given how fast a quantity is changing, how much of it has accumulated? This chapter builds that idea from the simplest possible cases up to the Fundamental Theorem of Calculus, which shows that accumulation and instantaneous rate of change are, in a precise sense, inverse operations of one another.
From Constant Rates to Areas
Some accumulation problems require no new machinery at all, because the rate involved never changes. Stack identical circular disks of area \(A\) on top of each other to height \(h\): since every cross-section contributes the same area, the total volume is just \(V=A\cdot h\), a single multiplication. There is nothing to "accumulate" in a meaningful sense, because the quantity being summed is constant throughout.
The same simplicity appears whenever a rate is constant. If a car travels at a constant velocity \(v\), the distance covered after time \(t\) is
\[d = v\cdot t.\]
Geometrically, this is the area of a rectangle of width \(t\) and height \(v\) in a velocity-versus-time graph. For a general function \(f\), the analogous quantity — the area between the graph of \(f\) and the horizontal axis over an interval — is exactly what integral calculus sets out to define and compute, and \(f(x)=v\) is the simplest possible case: a horizontal line whose "area under the graph" up to \(x\) is \(v\cdot x\).
Accumulating a Changing Rate
Difficulty appears the moment the rate is no longer constant. Suppose a car drives for \(2\) minutes at \(50\text{ km/h}\) and then for \(3\) minutes at \(100\text{ km/h}\). The velocity is still constant on each piece separately, so the total distance is just the sum of the two rectangle areas:
\[ d = \underbrace{\frac{2}{60}\text{h}\cdot 50\tfrac{\text{km}}{\text{h}}}_{\text{first piece}} + \underbrace{\frac{3}{60}\text{h}\cdot 100\tfrac{\text{km}}{\text{h}}}_{\text{second piece}} = \frac{5}{3}\text{ km}+5\text{ km} = \frac{20}{3}\text{ km}\approx 6.67\text{ km}. \]
Written this way, the total distance is a sum of "rate times duration" terms — exactly the area under a step-shaped velocity-time graph, one rectangle per piece. The relationship between the three quantities involved is itself a derivative, as already introduced with distance, velocity, and acceleration:
\[ \text{velocity}=\frac{d(\text{distance})}{dt}, \qquad \text{acceleration}=\frac{d(\text{velocity})}{dt}=\frac{d^2(\text{distance})}{dt^2}. \]
Recovering distance from velocity is the reverse of this differentiation — and once the velocity is no longer piecewise constant but changes continuously, the sum of finitely many rectangles is no longer exact. The rest of this chapter develops the tool needed to make that recovery precise for arbitrary continuous rates.
A Discrete Preview: Summing a Changing Rate
Before tackling continuous rates, it helps to see the same accumulation idea in a purely discrete setting, where it reduces to a familiar sum. Consider adding up the odd numbers one at a time:
let s = 0;
for (let i = 0; i < 10; i++) {
s += 2 * i + 1;
console.log(s);
} This prints \(1,4,9,16,25,\ldots,100\): the running total after \(n\) steps is always \(n^2\), as already shown directly with a visual grid argument for sums of odd numbers. The term being added at step \(i\) is \(2i+1\) — itself a linear (degree-1) function of \(i\) — while the accumulated total \(n^2\) is a quadratic (degree-2) function of \(n\). Accumulating a linear rate produces a quadratic total. This is a first hint of a pattern that reappears, in continuous form, once the power rule for integrals is derived below.
The step from this discrete accumulation to a continuous one is exactly the step from a coarse partition of an interval into a few pieces to a partition into arbitrarily many, arbitrarily thin pieces — which is the construction taken up next.
Approximating the Area Under a Curve
Let \(f\) be a bounded function on \([a,b]\). Split \([a,b]\) into \(n\) subintervals by choosing points
\[a=x_0<x_1<x_2<\cdots<x_n=b,\]
called a partition of \([a,b]\). On each subinterval \([x_{i-1},x_i]\), approximate the area under the graph of \(f\) by a rectangle of width \(x_i-x_{i-1}\) and height equal to the function value at some chosen point \(\xi_i\in[x_{i-1},x_i]\) — for instance the right endpoint, the left endpoint, or the midpoint. Summing these rectangle areas gives a Riemann sum
\[ R(f,\{x_i\},\{\xi_i\})=\sum_{i=1}^{n}f(\xi_i)\,(x_i-x_{i-1}). \]
The figure above illustrates the general notation for an arbitrary partition and an arbitrary function. To make the same construction tangible, fix a concrete function, \(f(x)=x^2\) on \([0,4]\), and let the number of subintervals and the choice of \(\xi_i\) become adjustable:
\(R(f,\{\xi_i\})=\) 0 vs. \(\int_0^4 x^2\,dx=\) 0
The right-endpoint rule always overestimates the area under an increasing function, and for the simplest such function, \(f(x)=x\), the size of that overestimate can be computed exactly rather than just bounded. Partition \([0,n]\) into \(n\) unit subintervals \([i-1,i]\), \(i=1,\ldots,n\). The right-endpoint rectangle over \([i-1,i]\) has height \(f(i)=i\), so the resulting Riemann sum is exactly the sum of the first \(n\) integers,
\[\sum_{i=1}^n i.\]
Within that same column, the true area under the diagonal \(f(x)=x\) is the trapezoid \(\int_{i-1}^i x\,dx=i-\frac12\) — the average of the two parallel heights \(i-1\) and \(i\), times the unit width. The rectangle exceeds this by exactly the triangular sliver above the diagonal: a right triangle with both legs of length \(1\), of area \(\frac12\), regardless of \(i\):
Summing the excess over all \(n\) columns gives the exact gap between the discrete sum and the integral:
\[ \sum_{i=1}^n i-\int_0^n x\,dx=\sum_{i=1}^n\left(i-\Bigl(i-\frac12\Bigr)\right)=\sum_{i=1}^n\frac12=\frac n2>0, \]
so \(\sum_{i=1}^n i=\int_0^n x\,dx+\frac n2\) always strictly exceeds \(\int_0^n x\,dx=\frac{n^2}{2}\) — a concrete instance of what the upper-sum inequality above guarantees in general. Since the excess \(\frac n2\) grows only linearly while the sum and the integral both grow quadratically, the relative error \(\bigl(\frac n2\bigr)\big/\bigl(\frac{n^2}{2}\bigr)=\frac1n\) still shrinks to zero as \(n\to\infty\), exactly as the mesh-refinement argument predicts.
Two particular choices of \(\xi_i\) bound every possible Riemann sum for a bounded \(f\): taking \(\xi_i\) to be the point where \(f\) attains its supremum on \([x_{i-1},x_i]\) gives the largest possible rectangle on that piece, and the point of infimum gives the smallest. Summed over all pieces, these give the upper sum and lower sum of the partition \(Z=\{x_0,\ldots,x_n\}\),
\[ O(f,Z)=\sum_{i=1}^{n}\Bigl(\sup_{[x_{i-1},x_i]}f\Bigr)(x_i-x_{i-1}), \qquad U(f,Z)=\sum_{i=1}^{n}\Bigl(\inf_{[x_{i-1},x_i]}f\Bigr)(x_i-x_{i-1}), \]
and every Riemann sum for that partition satisfies \(U(f,Z)\le R(f,Z,\{\xi_i\})\le O(f,Z)\). Adding more points to a partition can only shrink each subinterval, so it can only raise the lower sum and lower the upper sum — refining a partition always squeezes \(O(f,Z)\) and \(U(f,Z)\) closer together. The function \(f\) is called integrable on \([a,b]\) if, as the mesh \(\max_i(x_i-x_{i-1})\) shrinks to \(0\), the upper and lower sums converge to the same number; that common value is the integral of \(f\).
Every continuous function on \([a,b]\) is integrable in this sense. Continuity on the compact interval \([a,b]\) is automatically uniform: for every \(\varepsilon>0\) there is a \(\delta>0\) such that \(|f(x)-f(y)|<\varepsilon\) whenever \(|x-y|<\delta\), regardless of where \(x\) and \(y\) sit in \([a,b]\). Once a partition has mesh smaller than \(\delta\), the supremum and infimum of \(f\) on each piece \([x_{i-1},x_i]\) differ by less than \(\varepsilon\), so
\[ O(f,Z)-U(f,Z) = \sum_{i=1}^{n}\Bigl(\sup_{[x_{i-1},x_i]}f-\inf_{[x_{i-1},x_i]}f\Bigr)(x_i-x_{i-1}) < \varepsilon\sum_{i=1}^{n}(x_i-x_{i-1}) = \varepsilon(b-a). \]
Since \(\varepsilon\) was arbitrary, \(O(f,Z)-U(f,Z)\to0\) as the mesh shrinks, so upper and lower sums squeeze onto a single common limit.
The Definite Integral
For an integrable \(f\) on \([a,b]\), the common limit of the upper and lower sums — equivalently, the limit of any Riemann sum as the mesh shrinks to \(0\) — is written
\[\int_a^b f(x)\,dx.\]
This is the definite integral of \(f\) from \(a\) to \(b\). For \(f\ge0\) it equals the area between the graph of \(f\) and the \(x\)-axis; where \(f<0\), each rectangle contributes a negative area, so regions below the axis are subtracted rather than added.
Two conventions extend the definition to degenerate or reversed intervals. First, the integral over a single point is zero, \(\int_a^a f(x)\,dx=0\). Second, reversing the limits flips the sign,
\[\int_b^a f(x)\,dx=-\int_a^b f(x)\,dx,\]
which is consistent with treating \(x_i-x_{i-1}\) as a signed width in the Riemann sum. With this convention, integrals over adjacent intervals add up regardless of the order of \(a\), \(b\), and \(c\):
\[\int_a^b f(x)\,dx+\int_b^c f(x)\,dx=\int_a^c f(x)\,dx.\]
The Mean Value Theorem for Integrals
A crude but useful estimate for a definite integral comes from bounding the integrand by its extreme values before integrating at all. If \(f\) is continuous on \([a,b]\), the Extreme Value Theorem guarantees that \(f\) attains a minimum \(m\) and a maximum \(M\) somewhere on \([a,b]\). Since \(m\le f(x)\le M\) for every \(x\in[a,b]\), a rectangle of width \(b-a\) and height \(m\) always lies below the graph of \(f\), and one of height \(M\) always lies above it, so
\[m(b-a)\le\int_a^b f(x)\,dx\le M(b-a).\]
Dividing by \(b-a>0\) shows that the average value of \(f\) over \([a,b]\), namely \(\frac{1}{b-a}\int_a^b f(x)\,dx\), lies between \(m\) and \(M\). Because \(f\) is continuous, the Intermediate Value Theorem then guarantees a point \(c\in[a,b]\) where \(f\) actually attains that average value:
\[ \boxed{ \exists\,c\in[a,b]:\quad \int_a^b f(x)\,dx=f(c)\,(b-a) } \]
This is the Mean Value Theorem for Integrals. Geometrically, it says that the area under the graph of \(f\) always equals the area of some rectangle of the same width whose height is an actual value of \(f\), not merely an average computed from it.
Antiderivatives and the Indefinite Integral
Riemann sums define the integral but are hopeless as a computational tool: nobody wants to take a limit of sums every time an area is needed. The way around this goes through the reverse of differentiation.
A function \(F\) is an antiderivative of \(f\) on an interval if \(F'(x)=f(x)\) for every \(x\) in that interval. Antiderivatives are never unique: if \(F\) is one, then so is \(F+C\) for any constant \(C\), since constants differentiate to zero. Conversely, any two antiderivatives of the same \(f\) on an interval differ only by a constant — a function with zero derivative throughout an interval is constant there, a consequence of the Mean Value Theorem. So the set of all antiderivatives of \(f\) is exactly \(\{F+C: C\in\mathbb{R}\}\) for any single antiderivative \(F\), written as the indefinite integral
\[\int f(x)\,dx=F(x)+C.\]
The constant \(C\) is called the integration constant, and \(f\) inside the integral is the integrand. For example, \(\int 3x^2\,dx=x^3+C\), because \(\frac{d}{dx}x^3=3x^2\).
The Fundamental Theorem of Calculus
The link between the indefinite integral (an antiderivative) and the definite integral (a limit of areas) is made through the area accumulated so far. For a continuous \(f\) on \([a,b]\), define
\[A(x)=\int_a^x f(t)\,dt,\qquad x\in[a,b].\]
Before making this precise, it helps to see why \(A'(x)=f(x)\) should be true at all. For a very small step \(\varepsilon\), the strip added to the area is thin enough that \(f\) barely changes across it, so the strip is almost indistinguishable from a rectangle of width \(\varepsilon\) and height \(f(x)\):
\[A(x+\varepsilon)-A(x)\approx \varepsilon\,f(x).\]
Dividing by \(\varepsilon\) and letting it shrink to zero turns the approximation into an exact statement about the derivative of \(A\):
\[\lim_{\varepsilon\to0}\frac{A(x+\varepsilon)-A(x)}{\varepsilon}=f(x),\qquad\text{i.e.}\qquad A'(x)=f(x).\]
This is exactly the claim to be proved; the only gap is the word "almost" in "almost indistinguishable from a rectangle." Making that approximation rigorous — replacing it with an actual equality, valid for every \(\varepsilon\) rather than just in the limit — is precisely what the Mean Value Theorem for Integrals does.
Compare \(A(x)\) to \(A(x+h)\) for small \(h>0\): by additivity over adjacent intervals,
\[A(x+h)-A(x)=\int_x^{x+h}f(t)\,dt.\]
By the Mean Value Theorem for Integrals applied to \(f\) on \([x,x+h]\), there is a point \(\xi_h\in[x,x+h]\) with \(\int_x^{x+h}f(t)\,dt=f(\xi_h)\,h\), so
\[\frac{A(x+h)-A(x)}{h}=f(\xi_h).\]
As \(h\to0\), \(\xi_h\) is trapped between \(x\) and \(x+h\), so \(\xi_h\to x\); continuity of \(f\) then gives \(f(\xi_h)\to f(x)\). Taking the limit on both sides,
\[\boxed{A'(x)=f(x)}.\]
So \(A\) itself is an antiderivative of \(f\). If \(F\) is any other antiderivative of \(f\), the two differ only by a constant, \(A(x)=F(x)+C\). Setting \(x=a\) pins down \(C\): since \(A(a)=\int_a^a f(t)\,dt=0\),
\[0=F(a)+C\quad\Longrightarrow\quad C=-F(a),\]
and therefore \(A(x)=F(x)-F(a)\). Evaluating at \(x=b\) gives the result that makes integrals computable:
\[ \boxed{ \int_a^b f(x)\,dx=F(b)-F(a)=\Bigl.F(x)\Bigr|_a^b } \]
This is the Fundamental Theorem of Calculus: to evaluate a definite integral, find any single antiderivative \(F\) of the integrand and subtract its value at the lower limit from its value at the upper limit. The integration constant is irrelevant here, since it cancels in the subtraction — which is exactly why it can be dropped once an integral has actual numeric limits.
For instance, with \(F(x)=\frac{1}{3}x^3\) as an antiderivative of \(f(x)=x^2\),
\[\int_1^3 x^2\,dx=\left.\frac{1}{3}x^3\right|_1^3=\frac{27}{3}-\frac{1}{3}=\frac{26}{3}.\]
Leibniz Notation: Why We Write \(\int f(x)\,dx\)
The area under a curve can be pictured as built from infinitely many, infinitely thin rectangles rather than finitely many wide ones. Writing \(dx\) for an infinitesimally small width \(h\), each such rectangle has infinitesimal area \(f(x)\,dx\), and the elongated "S" \(\int\) — literally standing for sum — collects all of them from \(a\) to \(b\):
\[\int_a^b f(x)\,dx.\]
This picture is exactly what the Riemann-sum construction makes rigorous: \(f(x)\,dx\) is the limiting form of the term \(f(\xi_i)(x_i-x_{i-1})\) as the rectangle width shrinks to zero, and \(\int\) is the limiting form of \(\sum\). The notation \(dx\) after the integrand is not just decoration — it names the variable being integrated over, which matters as soon as an integrand depends on more than one symbol.
Properties of the Definite Integral
Because the definite integral is a limit of Riemann sums, and sums are linear, so is the integral. For integrable \(f,g\) and constants \(r,s\),
\[ \int_a^b\bigl(r f(x)+s g(x)\bigr)\,dx = r\int_a^b f(x)\,dx+s\int_a^b g(x)\,dx. \]
Combined with the additivity over adjacent intervals and the sign flip under reversed limits from above, these are the only algebraic tools needed to reduce a complicated integral to simpler, already-known ones. One further property follows immediately from the Fundamental Theorem: for a fixed antiderivative \(F\) and a linear inner argument \(f(cx+d)\),
\[\int f(cx+d)\,dx=\frac{1}{c}F(cx+d)+C,\qquad c\neq0,\]
since, by the chain rule, \(\frac{d}{dx}\left[\frac{1}{c}F(cx+d)\right]=\frac{1}{c}F'(cx+d)\cdot c=f(cx+d)\). This is the special case of the substitution rule derived in full below.
Area Between Two Curves
A direct application of linearity computes the area enclosed between two curves \(f\) and \(g\) that meet at \(x=a\) and \(x=b\), with \(f(x)\ge g(x)\) throughout \([a,b]\). Approximating with thin vertical strips, each strip has height \(f(x)-g(x)\) rather than \(f(x)\) alone, so the same Riemann-sum limit gives
\[\text{Area}=\int_a^b\bigl(f(x)-g(x)\bigr)\,dx.\]
If the curves cross somewhere inside \([a,b]\), the sign of \(f(x)-g(x)\) changes there, so the integral must be split at each crossing point and the absolute value of each piece taken — otherwise regions where the curves swap positions would cancel rather than add, since a signed area below the axis and a signed area where \(g\) is momentarily above \(f\) are indistinguishable to the integral on their own. This is the same subtlety already noted for the definite integral itself: \(\int_a^b f(x)\,dx\) is a signed area, not a literal one.
Basic Integration Rules
Every rule for indefinite integrals is verified the same way: differentiate the claimed antiderivative and check that the original integrand comes back out.
Power rule. For \(n\neq-1\),
\[\int x^n\,dx=\frac{1}{n+1}x^{n+1}+C,\]
because \(\frac{d}{dx}\frac{x^{n+1}}{n+1}=\frac{(n+1)x^n}{n+1}=x^n\). This is the continuous counterpart of the discrete pattern already seen above: summing the linear rate \(2i+1\) produced the quadratic total \(n^2\); integrating the linear function \(x\) produces the quadratic \(\frac{1}{2}x^2\).
Factor rule. A constant factor passes through the integral,
\[\int c\cdot f(x)\,dx=c\int f(x)\,dx.\]
Sum and difference rule.
\[\int\bigl(f(x)\pm g(x)\bigr)\,dx=\int f(x)\,dx\pm\int g(x)\,dx.\]
Together, the factor and sum rules integrate any polynomial term by term. For instance,
\[\int(3x^2-4x+5)\,dx=x^3-2x^2+5x+C.\]
Integration by Parts
The product rule for derivatives, \((fg)'=f'g+fg'\), integrates on both sides to
\[f(x)g(x)+C=\int f'(x)g(x)\,dx+\int f(x)g'(x)\,dx,\]
which rearranges into the rule for integration by parts:
\[\int f(x)g'(x)\,dx=f(x)g(x)-\int f'(x)g(x)\,dx.\]
It is useful whenever the integrand is a product and one factor has a known antiderivative, ideally one that becomes simpler after being differentiated once. For \(\int x e^x\,dx\), take \(f(x)=x\) (so \(f'(x)=1\), which is simpler) and \(g'(x)=e^x\) (so \(g(x)=e^x\)):
\[\int x e^x\,dx=x e^x-\int e^x\,dx=x e^x-e^x+C=(x-1)e^x+C.\]
The same idea handles \(\ln x\), which has no elementary antiderivative on its own but a very simple derivative. Writing \(\int\ln x\,dx=\int \ln x\cdot 1\,dx\) and taking \(f(x)=\ln x\), \(g'(x)=1\) (so \(g(x)=x\)):
\[\int\ln x\,dx=x\ln x-\int x\cdot\frac{1}{x}\,dx=x\ln x-\int 1\,dx=x\ln x-x+C.\]
Integration by Substitution
The chain rule, \(\frac{d}{dx}F(g(x))=F'(g(x))\,g'(x)=f(g(x))\,g'(x)\) for \(F'=f\), integrates to
\[\int f(g(x))\,g'(x)\,dx=F(g(x))+C,\]
the rule for integration by substitution. In practice, one writes \(u=g(x)\), so that formally \(du=g'(x)\,dx\), and replaces every occurrence of \(x\) accordingly:
\[\int f(g(x))\,g'(x)\,dx=\int f(u)\,du=F(u)+C=F(g(x))+C.\]
For a definite integral, the limits transform along with the variable, since \(x=a\) corresponds to \(u=g(a)\) and \(x=b\) to \(u=g(b)\):
\[\int_a^b f(g(x))\,g'(x)\,dx=\int_{g(a)}^{g(b)}f(u)\,du.\]
A recurring pattern is an integrand of the form \(\frac{g'(x)}{g(x)}\), which is exactly \(f(u)=\frac{1}{u}\) composed with \(u=g(x)\), so
\[\int\frac{g'(x)}{g(x)}\,dx=\ln|g(x)|+C.\]
This immediately gives the integral of the tangent, since \(\tan x=\frac{\sin x}{\cos x}\) has numerator equal to \(-\frac{d}{dx}\cos x\):
\[\int\tan x\,dx=-\int\frac{-\sin x}{\cos x}\,dx=-\ln|\cos x|+C.\]
A Table of Standard Integrals
Reading the catalogue of standard derivatives backwards gives a catalogue of standard antiderivatives directly, since \(F'=f\) is exactly the statement that \(F\) is an antiderivative of \(f\):
| \(f(x)\) | \(\int f(x)\,dx\) |
|---|---|
| \(0\) | \(C\) |
| \(c\) | \(cx+C\) |
| \(x^n\ (n\neq-1)\) | \(\dfrac{1}{n+1}x^{n+1}+C\) |
| \(1/x\) | \(\ln|x|+C\) |
| \(e^x\) | \(e^x+C\) |
| \(a^x\ (a>0,\ a\neq1)\) | \(\dfrac{1}{\ln a}a^x+C\) |
| \(\ln x\) | \(x\ln x-x+C\) |
| \(\sin x\) | \(-\cos x+C\) |
| \(\cos x\) | \(\sin x+C\) |
| \(\tan x\) | \(-\ln|\cos x|+C\) |
| \(\sec^2x\) | \(\tan x+C\) |
| \(\csc^2x\) | \(-\cot x+C\) |
| \(\sec x\tan x\) | \(\sec x+C\) |
| \(\csc x\cot x\) | \(-\csc x+C\) |
| \(1/\sqrt{1-x^2}\) | \(\arcsin x+C\) |
| \(1/(1+x^2)\) | \(\arctan x+C\) |
| \(1/\bigl(|x|\sqrt{x^2-1}\bigr)\) | \(\operatorname{arcsec}x+C\) |
| \(\sinh x\) | \(\cosh x+C\) |
| \(\cosh x\) | \(\sinh x+C\) |
The entry for \(\arccos x\) follows the same integration-by-parts pattern used above for \(\ln x\): with \(f(x)=\arccos x\), \(g'(x)=1\), and \(f'(x)=-1/\sqrt{1-x^2}\),
\[ \int\arccos x\,dx = x\arccos x+\int\frac{x}{\sqrt{1-x^2}}\,dx = x\arccos x-\sqrt{1-x^2}+C, \]
where the remaining integral is a substitution with \(u=1-x^2\), \(du=-2x\,dx\).
Improper Integrals
The definite integral was defined for a bounded function on a bounded interval. Two situations push past that: an unbounded interval of integration, or an integrand that becomes unbounded at an endpoint. Both are handled the same way, by first integrating over a safely finite range and then taking a limit.
For an unbounded interval,
\[ \int_a^\infty f(x)\,dx=\lim_{b\to\infty}\int_a^b f(x)\,dx, \qquad \int_{-\infty}^b f(x)\,dx=\lim_{a\to-\infty}\int_a^b f(x)\,dx, \]
provided the limit exists, in which case the integral is called convergent; otherwise it is divergent. For a singularity at an endpoint, say at \(b\),
\[\int_a^b f(x)\,dx=\lim_{\varepsilon\to0^+}\int_a^{b-\varepsilon}f(x)\,dx.\]
Two classic examples give opposite outcomes for what looks like a similar integrand:
\[ \int_1^\infty\frac{1}{x^2}\,dx = \lim_{b\to\infty}\left[-\frac{1}{x}\right]_1^b = \lim_{b\to\infty}\left(1-\frac{1}{b}\right) =1, \]
\[ \int_1^\infty\frac{1}{x}\,dx = \lim_{b\to\infty}\bigl[\ln x\bigr]_1^b = \lim_{b\to\infty}\ln b =\infty. \]
The first converges because \(1/x^2\) decays fast enough as \(x\to\infty\) for the tail to shrink to nothing; the second diverges because \(1/x\) decays just slowly enough that the accumulated area still grows without bound, if only logarithmically. The same distinction shows up at a singular endpoint:
\[ \int_0^1\frac{1}{\sqrt{x}}\,dx = \lim_{\varepsilon\to0^+}\bigl[2\sqrt{x}\bigr]_\varepsilon^1 = \lim_{\varepsilon\to0^+}\bigl(2-2\sqrt{\varepsilon}\bigr) =2, \]
so the vertical spike of \(1/\sqrt{x}\) near \(x=0\) is thin enough to still enclose a finite area, unlike \(1/x\) near \(0\), whose integral diverges by the same computation as \(\int_1^\infty\frac{1}{x}\,dx\) above.
This behavior generalizes to every power \(p>0\): the integral \(\int_1^\infty x^{-p}\,dx\) converges exactly when \(p>1\), and the integral \(\int_0^1 x^{-p}\,dx\) converges exactly when \(p<1\) — the two cases trade places at \(p=1\), where both integrals diverge, as just seen for \(1/x\). Every power function \(x^{-p}\) therefore splits its improper behavior into one finite piece and one infinite piece, except at the single boundary case \(p=1\), where both pieces are infinite.
Closing Remarks
Not every continuous function has an antiderivative expressible in closed form — \(e^{-x^2}\) is the standard example, central to probability theory, whose antiderivative cannot be written using elementary functions at all. The Fundamental Theorem of Calculus still guarantees that \(\int_a^x e^{-t^2}\,dt\) exists and is differentiable with derivative \(e^{-x^2}\); it simply cannot be evaluated by writing down \(F(b)-F(a)\) for a closed-form \(F\). In exactly these cases, the Riemann sums this chapter started with stop being just a definition and become the practical tool again: partitioning \([a,b]\) finely and summing rectangle — or, better, trapezoid — areas gives a numerical approximation to the integral to any desired accuracy, even when no elementary antiderivative exists at all.
Improper integrals over an infinite interval are not just a technicality reserved for pathological examples: the Gamma function, which extends the factorial \(n!\) to non-integer and complex \(n\), is itself defined by exactly such an integral, \(\Gamma(n)=\int_0^\infty x^{n-1}e^{-x}\,dx\), evaluated with the same integration-by-parts rule derived above.