Integral Calculus and Differential Equations › The Definite Integral as Accumulation

Michael BrenndoerferOctober 28, 20256 min read
Quantitative FinanceAll chapters
Part 1 of 15Mathematical Foundations
Chapter 7Integral Calculus and Differential Equations › The Definite Integral as Accumulation
Reading section 2 of 14 · The Definite Integral as Accumulation · 6 minSection 2 of 14 · 6 min

Book contents

Section 2 of 14 · 6 min read

Integral Calculus and Differential Equations › The Definite Integral as AccumulationOne section · Sections in this chapter2 / 14 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

The definite integral of a rate gives its net accumulated change over an interval. If you know the flow rate through a pipe, integrating it gives the volume that passed through. Similarly, if f(t)f(t) is a financial rate of change in dollars per year, ∫abf(t) dt\int_a^b f(t)\,dt gives the change in dollars. Integrating a balance itself would instead have units of dollar-years, not dollars.

Geometrically, the definite integral equals the signed area under the curve f(t)f(t) between t=at = a and t=bt = b. Areas above the horizontal axis contribute positively, while areas below contribute negatively. This interpretation has direct financial meaning. If f(t)f(t) represents a continuous cash flow rate, the integral gives the total cash accumulated over the period. Positive net flows increase the tracked account's cash balance, while negative flows decrease it. Transfers between your own accounts or loan repayments need not change total net worth by the same amount.

The challenge, of course, is computing these areas precisely when the curve is not a simple geometric shape. This is where the formal definition through Riemann sums becomes essential, and gives a rigorous foundation for calculating accumulated quantities even when the rate of change follows complex patterns.

Definite Integral

For a Riemann-integrable function f(t)f(t) on [a,b][a,b], with a<ba<b, the definite integral is the common limit of its tagged sums. Every continuous function on this closed interval meets this condition:

∫abf(t) dt=lim⁡n→∞∑i=1nf(ti∗)Δt\int_a^b f(t) \, dt = \lim_{n \to \infty} \sum_{i=1}^{n} f(t_i^*) \Delta t

where:

  • [a,b][a, b]: the interval of integration
  • nn: number of subintervals (approaches infinity in the limit)
  • Δt=(b−a)/n\Delta t = (b-a)/n: width of each subinterval
  • ti∗t_i^*: a sample point in the ii-th subinterval
  • f(ti∗)f(t_i^*): value of ff at a sample point in the ii-th subinterval
  • f(ti∗)Δtf(t_i^*)\Delta t: signed area of the approximating rectangle, approximating the integral over the ii-th subinterval

The sum adds these signed rectangle areas. As n→∞n\to\infty, their widths tend to zero and, for a Riemann-integrable function, the sums converge to the same integral regardless of the sample points chosen.

The intuition behind Riemann sums is straightforward: we approximate a complex shape using familiar ones. Just as ancient mathematicians approximated the area of a circle by inscribing polygons with ever more sides, we approximate the area under a curve by filling it with thin rectangles. Each rectangle has width Δt\Delta t and height determined by the function value at some point within that slice. The product f(ti∗)Δtf(t_i^*) \Delta t gives the area of each rectangle, and summing all rectangles approximates the total area. As we use more rectangles (larger nn), each rectangle becomes narrower (Δt\Delta t shrinks), and the sums converge for a Riemann-integrable function, though successive errors need not decrease monotonically.

Out[3]:
Visualization
Five midpoint rectangles approximate a curved deposit-rate function; the panel reports the approximation and signed error.
Midpoint Riemann sum with n=5 rectangles and its signed error.
Ten midpoint rectangles approximate the same curved function with a smaller absolute error.
Midpoint Riemann sum with n=10 rectangles and its signed error.
Twenty midpoint rectangles approximate the same curved function with a still smaller absolute error.
Midpoint Riemann sum with n=20 rectangles and its signed error.

For a continuous ff on [a,b][a,b], the Fundamental Theorem of Calculus connects differentiation and integration: differentiating the accumulation function ∫atf(s) ds\int_a^t f(s)\,ds recovers f(t)f(t). Integrating a derivative instead recovers the original function's change; an indefinite antiderivative is determined only up to an additive constant. If F′(t)=f(t)F'(t)=f(t), then:

∫abf(t) dt=F(b)−F(a)\int_a^b f(t) \, dt = F(b) - F(a)

This theorem turns the problem of computing integrals into finding antiderivatives, which is often more tractable than evaluating limits of sums directly. Rather than computing an infinite limit of rectangle sums, we can simply find a function whose derivative equals our integrand, then evaluate the difference at the endpoints. This is why antiderivative tables and integration techniques are so useful: they provide shortcuts to what would otherwise require tedious limiting arguments.

A Financial Interpretation

Consider a savings account with a time-varying deposit rate d(t)d(t) measured in dollars per year. This rate might change because your income grows over time, or because you commit to increasing your contributions annually. Over a small time interval Δt\Delta t, you deposit approximately d(t)⋅Δtd(t) \cdot \Delta t dollars, the rate times the duration. To find the total amount deposited from time 00 to time TT, we must sum all these infinitesimal contributions, which is precisely what the integral computes:

Total Deposits=∫0Td(t) dt\text{Total Deposits} = \int_0^T d(t) \, dt

If d(t)=1000+100td(t)=1000+100t dollars per year, with tt in years, the deposit rate increases continuously by $100 per year for each elapsed year. Over five years:

∫05(1000+100t) dt=[1000t+50t2]05=5000+1250=6250\int_0^5 (1000 + 100t) \, dt = \left[ 1000t + 50t^2 \right]_0^5 = 5000 + 1250 = 6250

You would deposit a total of $6,250 over the five-year period. Notice how the antiderivative 1000t+50t21000t + 50t^2 captures both the base contribution (1000t1000t) and the cumulative effect of the increasing contributions (50t250t^2). The Fundamental Theorem lets us compute this by simple evaluation rather than summing five years of daily deposits.

In[4]:
Code
from scipy import integrate


# Define the deposit rate function
def deposit_rate(t):
    return 1000 + 100 * t


# Compute the integral numerically
total_deposits, error = integrate.quad(deposit_rate, 0, 5)
Out[5]:
Console
Total deposits over 5 years: $6,250.00
Numerical integration error estimate: $6.94e-11

The numerical result confirms our analytical calculation. The scipy.integrate.quad function uses adaptive QUADPACK routines and returns an error estimate. Requested tolerances and the subdivision limit constrain the algorithm. Integrand behavior and problem conditioning also matter, as does floating-point arithmetic.