Calculus
Textbooks
Boundless Calculus
Inverse Functions and Advanced Integration
Techniques of Integration
Calculus Textbooks Boundless Calculus Inverse Functions and Advanced Integration Techniques of Integration
Calculus Textbooks Boundless Calculus Inverse Functions and Advanced Integration
Calculus Textbooks Boundless Calculus
Calculus Textbooks
Calculus
Concept Version 7
Created by Boundless

Approximate Integration

The trapezoidal rule (also known as the trapezoid rule or trapezium rule) is a technique for approximating the definite integral $\int_{a}^{b} f(x)\, dx$.

Learning Objective

  • Use the trapezoidal rule to approximate the value of a definite integral


Key Points

    • The trapezoidal rule works by approximating the region under the graph of the function $f(x)$ as a trapezoid and calculating its area: $\int_{a}^{b} f(x)\, dx \approx (b-a)\frac{f(a) + f(b)}{2}$.
    • For a domain discretized into $N$ equally spaced panels, or $N+1$ grid points $(1, 2, \cdots, N+1)$, where the grid spacing is $h=\frac{(b-a)}{N}$, the approximation to the integral becomes $\int_{a}^{b} f(x)\, dx = \frac{b-a}{2N}(f(x_1) + 2f(x_2) + 2f(x_3) + \ldots + 2f(x_N) + f(x_{N+1}))$.
    • In two and more dimensions, where simple approximation methods become prohibitively expensive in terms of computational effort, one may use other methods such as the Monte Carlo method.

Term

  • trapezoid

    a (convex) quadrilateral with two (non-adjacent) parallel sides


Full Text

Numerical integration, in some instances also known as numerical quadrature, asks for the value of a definite integral. Popular methods use one of the Newton–Cotes formulas (such as midpoint rule or Simpson's rule) or Gaussian quadrature. These methods rely on a "divide and conquer" strategy, whereby an integral on a relatively large set is broken down into integrals on smaller sets. In higher dimensions, where these methods become prohibitively expensive in terms of computational effort, one may use other methods such as the Monte Carlo method. Here, we will study a very simple approximation technique, called a trapezoidal rule.

Trapezoidal rule

The trapezoidal rule (also known as the trapezoid rule or trapezium rule) is a technique for approximating the definite integral $\int_{a}^{b} f(x)\,dx$. The trapezoidal rule works by approximating the region under the graph of the function $f(x)$ as a trapezoid and calculating its area. It follows that:

 $\displaystyle{\int_{a}^{b} f(x)\, dx \approx (b-a)\frac{f(a) + f(b)}{2}}$

The trapezoidal rule tends to become extremely accurate when periodic functions are integrated over their periods.

Approximation by Linear Functions

The function $f(x)$ (in blue) is approximated by a linear function (in red).

Numerical Implementation of the Trapezoidal Rule

For a domain discretized into $N$ equally spaced panels, or $N+1$ grid points $(1, 2, \cdots, N+1)$, where the grid spacing is $h=\frac{(b-a)}{N}$, the approximation to the integral becomes:

$\begin{aligned}\int_{a}^{b} f(x)\, dx &\approx \frac{h}{2} \sum_{k=1}^{N} \left( f(x_{k+1}) + f(x_{k}) \right) {} \\ &= \frac{b-a}{2N}(f(x_1) + 2f(x_2) + \cdots + 2f(x_N) + f(x_{N+1}))\end{aligned}$

Although the method can adopt a nonuniform grid as well, this example used a uniform grid for the the approximation.

[ edit ]
Edit this content
Prev Concept
Integration Using Tables and Computers
Improper Integrals
Next Concept
Subjects
  • Accounting
  • Algebra
  • Art History
  • Biology
  • Business
  • Calculus
  • Chemistry
  • Communications
  • Economics
  • Finance
  • Management
  • Marketing
  • Microbiology
  • Physics
  • Physiology
  • Political Science
  • Psychology
  • Sociology
  • Statistics
  • U.S. History
  • World History
  • Writing

Except where noted, content and user contributions on this site are licensed under CC BY-SA 4.0 with attribution required.