Integrals — summing infinitely many terms
The integral built from the ground up: genesis (Archimedes' method of exhaustion, the problem of area, Newton and Leibniz), the Riemann sum with lower and upper sums, the definite integral as area, the antiderivative and the indefinite integral, the fundamental theorem of calculus with justification, integration by substitution and by parts (with geometric interpretation), improper integrals, economic applications (total cost, consumer surplus, present value), double integrals as volume in 3D, and the generalisation to ℝⁿ. Every concept and every example with its own figure.
If the derivative measures the rate of change, then the integral measures accumulation — a sum of infinitely many infinitely small increments. Geometrically it is the area under a graph; in economics it is the total cost summed from the marginal cost, consumer surplus, or the present value of a stream of payments. This chapter builds the notion of the integral from the historical problem of area, through the Riemann sum and the fundamental theorem of calculus, up to improper integrals and multiple integrals in the space $\mathbb{R}^n$. Every concept and every example is given its own figure.
The genesis of the concept of an integral
The integral is historically older than the derivative. As early as the third century BC, Archimedes determined the areas of curvilinear figures by the method of exhaustion: he inscribed ever-finer polygons (or rectangles) in a figure, whose total area grew and approached the area of the figure. By this route he proved that the area of a parabolic segment is exactly $\tfrac{4}{3}$ of the area of the triangle inscribed in it — a result reached two millennia later by a one-line integral computation.
Archimedes’ method was ingenious, but each case required fresh inventiveness. The breakthrough came in the seventeenth century, when Isaac Newton and Gottfried Wilhelm Leibniz discovered that the area under a graph and the slope of the tangent are mutually inverse operations — what we now call the fundamental theorem of calculus. From then on, area is computed not by laborious summation but by reversing differentiation. A rigorous definition of area itself was given in the nineteenth century by Bernhard Riemann, and it is where we begin.
The Riemann sum and the definite integral
To define the area under the graph of a function $f$ on an interval $[a,b]$, we divide the interval into $n$ pieces of width $\Delta x$, choose a point $x_i^*$ in each, and approximate the area by the sum of the areas of rectangles of heights $f(x_i^*)$.
The definite integral of a function $f$ on an interval $[a,b]$ is the limit of the Riemann sums as the partition is refined without bound:
$$ \int_a^b f(x)\,dx=\lim_{n\to\infty}\sum_{i=1}^{n}f(x_i^*)\,\Delta x, $$provided this limit exists and does not depend on the partition or the choice of the points $x_i^*$. Geometrically it is the area enclosed between the graph, the horizontal axis, and the lines $x=a$ and $x=b$.
That the limit exists and is independent of the details of the partition is seen from trapping the area between two approximations. The lower sum uses the smallest value of the function on each piece (the rectangles fit under the graph), the upper sum the largest (the rectangles protrude above). The true area always lies between them, and both sums converge to a common value as the partition is refined.
The antiderivative and the indefinite integral
Computing the limit of Riemann sums each time would be laborious. The key lies in the notion inverse to the derivative.
An antiderivative of a function $f$ is any function $F$ such that $F'(x)=f(x)$. If $F$ is an antiderivative, then so is $F+C$ (for any constant $C$), since the derivative of a constant is zero. The set of all antiderivatives is written as the indefinite integral:
$$ \int f(x)\,dx=F(x)+C. $$The constant $C$ is not an arbitrary addition — it reflects the fact that area measured from different reference levels differs by a constant. Geometrically, all the antiderivatives form a family of curves shifted vertically, having at every point the identical slope $f(x)$.
Each of these formulas is simply the reversal of the corresponding differentiation rule.
For example $\int x^3\,dx=\tfrac{x^4}{4}+C$, because $\big(\tfrac{x^4}{4}\big)'=x^3$.
The fundamental theorem of calculus
This theorem binds together the two poles of analysis — differentiation and integration — making them mutually inverse operations.
Let $f$ be continuous on $[a,b]$. Then:
(part I) the area function $A(x)=\displaystyle\int_a^x f(t)\,dt$ is differentiable and $A'(x)=f(x)$;
(part II) for any antiderivative $F$ (where $F'=f$),
$$ \int_a^b f(x)\,dx=F(b)-F(a). $$- Increment of area. The difference $A(x+h)-A(x)$ is the area of a narrow strip over the interval $[x,x+h]$.
- Estimating the strip. For small $h$ the strip is nearly a rectangle of base $h$ and height $f(x)$, so $A(x+h)-A(x)\approx f(x)\,h$. More precisely, by the continuity of $f$ the height of the strip lies between the extrema of $f$ on $[x,x+h]$, both of which tend to $f(x)$.
- Difference quotient. Hence $\dfrac{A(x+h)-A(x)}{h}\to f(x)$ as $h\to 0$, i.e. $A'(x)=f(x)$.
- Conclusion (part II). Since $A$ and $F$ have the same derivative $f$, they differ by a constant; the increment $A(b)-A(a)=\int_a^b f$ thus equals $F(b)-F(a)$. $\;$
Thanks to this theorem we compute the definite integral without Riemann sums. For example
$$ \int_0^3 x^2\,dx=\Big[\frac{x^3}{3}\Big]_0^3=\frac{27}{3}-0=9. $$Methods of integration
Integration by substitution
This method reverses the chain rule. If the integrand contains a function and its derivative, we substitute $u=g(x)$, whence $du=g'(x)\,dx$.
In the integral $\displaystyle\int 2x\,e^{x^2}\,dx$ we take $u=x^2$, so $du=2x\,dx$:
$$ \int 2x\,e^{x^2}\,dx=\int e^u\,du=e^u+C=e^{x^2}+C. $$For the definite version $\displaystyle\int_0^1 2x\,e^{x^2}\,dx=\big[e^{x^2}\big]_0^1=e-1\approx 1.718$.
Integration by parts
This method reverses the product rule. From $(uv)'=u'v+uv'$, after integration we obtain
$$ \int u\,dv=uv-\int v\,du. $$We use it when the integrand is a product of functions of different types (e.g. a polynomial and an exponential).
In the integral $\displaystyle\int x\,e^x\,dx$ we take $u=x$ and $dv=e^x\,dx$, whence $du=dx$ and $v=e^x$:
$$ \int x\,e^x\,dx=x e^x-\int e^x\,dx=x e^x-e^x+C=e^x(x-1)+C. $$Improper integrals
The integral can be extended to infinite intervals by treating it as a limit. Surprisingly, the area under an infinitely long tail can be finite:
$$ \int_1^{\infty}\frac{1}{x^2}\,dx=\lim_{b\to\infty}\Big[-\frac{1}{x}\Big]_1^b=\lim_{b\to\infty}\Big(1-\frac{1}{b}\Big)=1. $$This convergence underlies the present value of a perpetuity: an infinite stream of decreasing, discounted payments sums to a finite amount.
Applications in economics
Total cost from marginal cost
Since marginal cost $MC(Q)$ is the derivative of total cost, total cost is its integral. For $MC(Q)=3Q^2-4Q+5$ and fixed cost $FC=100$:
$$ TC(Q)=100+\int_0^Q(3q^2-4q+5)\,dq=100+Q^3-2Q^2+5Q. $$Consumer surplus
Consumer surplus is the difference between what buyers would be willing to pay and what they actually pay — geometrically the area between the demand curve and the market price. For demand $Q=100-2P$ and price $P^*=20$ (whence $Q^*=60$) we invert demand to $P=50-\tfrac{Q}{2}$ and integrate:
$$ CS=\int_0^{60}\Big(50-\frac{Q}{2}-20\Big)\,dQ=\Big[30Q-\frac{Q^2}{4}\Big]_0^{60}=1800-900=900. $$Present value of a continuous stream
For a continuous stream of payments $\pi(t)$ at a discount rate $r$, the net present value is
$$ NPV=\int_0^T \pi(t)\,e^{-rt}\,dt, $$which is the continuous counterpart of the discrete sum $\sum_{t=0}^{T}\tfrac{\pi_t}{(1+r)^t}$. The continuous form is analytically more convenient and connects with the limit defining continuous compounding.
Multiple integrals and the space $\mathbb{R}^n$
Just as the single integral sums the areas of strips, giving the area under a curve, the double integral sums the volumes of columns, giving the volume under a surface:
$$ \iint_D f(x,y)\,dx\,dy. $$Integrals in $\mathbb{R}^n$ and the fourth dimension.
The Riemann-sum construction generalises to any dimension: the single integral sums over segments, the double over rectangles, the triple $\iiint f\,dx\,dy\,dz$ over cubes, and the $n$-fold $\int_{\mathbb{R}^n} f\,d\mathbf{x}$ over $n$-dimensional cubes. The result in $\mathbb{R}^4$ and higher cannot be drawn as a “solid,” but the computation is the same — we sum infinitely many infinitely small elements. In statistics such integrals give the probability mass: the integral of a density over a region in $\mathbb{R}^n$ is the probability that the vector of random variables falls in that region. A four-dimensional integral can be computed “layer by layer,” fixing one variable and integrating over three-dimensional slices (Fubini’s theorem).
Application — case study: net present value of an investment (NPV)
An investment generates a continuous stream of revenue — approximately $100$ thousand per year for $10$ years. At a discount rate $r=8\%$, revenue received at time $t$ is worth $100\,e^{-0.08t}$ today (continuous discounting, see limits). The total present value of this stream is given by an integral:
$$ \mathrm{NPV}_{\text{revenue}}=\int_0^{10}100\,e^{-0.08t}\,dt=100\cdot\Big[-\tfrac{1}{0.08}e^{-0.08t}\Big]_0^{10}=1250\big(1-e^{-0.8}\big)\approx 688\ \text{thousand}. $$If the initial outlay is $500$ thousand, the project’s net present value is $688-500=188$ thousand $\gt 0$ — the investment is profitable. Geometrically, NPV is the area under the discounted revenue curve.
This case study shows why the integral is indispensable in finance: summing infinitely many instantaneous, decreasingly discounted revenues is exactly the operation of integration, and the result decides the profitability of a decision.
Further reading
Polish textbooks
- G. M. Fichtenholz, Differential and Integral Calculus, vol. II, PWN.
- W. Krysicki, L. Włodarski, Analiza matematyczna w zadaniach, vol. II, PWN.
World and economics classics
- W. Rudin, Principles of Mathematical Analysis, McGraw-Hill, 1976.
- T. M. Apostol, Calculus, vol. I, Wiley, 1967.
- A. C. Chiang, K. Wainwright, Fundamental Methods of Mathematical Economics, McGraw-Hill, 2005.
Historical sources
- C. B. Boyer, The History of the Calculus and its Conceptual Development, Dover, 1959.
Summary
The integral is the limit of Riemann sums — the area under a graph and a sum of infinitely many terms. The fundamental theorem of calculus makes integration the operation inverse to differentiation, and the methods of substitution and integration by parts let us reduce complex integrals to elementary ones. The generalisation to multiple integrals in $\mathbb{R}^n$ leads directly to probability theory and distributions.
- G. M. Fichtenholz, Differential and Integral Calculus, vol. II
- W. Rudin, Principles of Mathematical Analysis
- Python:
scipy.integrate.quad(f, a, b)— definite integral;sympy.integrate(f, x) - R:
integrate(f, lower, upper)— numerical integration