Numerical Integration Methods: Fresh Take

  • Estimate definite integrals using the midpoint and trapezoidal rules
  • Use Simpson’s rule to find definite integrals with a specified accuracy

The Midpoint Rule

The Main Idea 

Many real-world functions don’t have neat, closed-form antiderivatives that you can write down with elementary functions. When the Fundamental Theorem of Calculus hits a wall, numerical integration steps in to give you excellent approximations of definite integrals.

The Midpoint Rule – Your First Tool: The midpoint rule uses rectangles with heights determined by function values at the midpoint of each subinterval. Here’s the setup:

  1. Divide the interval [latex][a,b][/latex] into [latex]n[/latex] equal subintervals, each with width [latex]\Delta x = \frac{b-a}{n}[/latex]
  2. Find the midpoint [latex]m_i[/latex] of each subinterval
  3. Calculate the approximation: [latex]M_n = \sum_{i=1}^n f(m_i) \Delta x[/latex]

Midpoints often provide better approximations than left or right endpoints because they tend to balance out the over- and under-estimation errors, especially for curved functions.

More subintervals (larger [latex]n[/latex]) generally mean better approximations, but they also mean more calculations. The key is finding the right balance between accuracy and computational effort.

Use the midpoint rule with [latex]n=2[/latex] to estimate [latex]{\displaystyle\int }_{1}^{2}\frac{1}{x}dx[/latex].

The Trapezoidal Rule

The Main Idea 

The trapezoidal rule improves on basic Riemann sums by using trapezoids instead of rectangles. Instead of creating “steps” that miss curved portions, trapezoids connect adjacent function values with straight lines, following the curve’s shape more naturally.

How It Works:

  1. Divide the interval [latex][a,b][/latex] into [latex]n[/latex] equal subintervals with width [latex]\Delta x = \frac{b-a}{n}[/latex]
  2. Use the trapezoid area formula for each piece: [latex]\frac{1}{2}\Delta x(f(x_i) + f(x_{i+1}))[/latex]
  3. Add up all trapezoid areas: [latex]T_n = \frac{1}{2}\Delta x(f(x_0) + 2f(x_1) + 2f(x_2) + \cdots + 2f(x_{n-1}) + f(x_n))[/latex]

Notice that interior function values get multiplied by [latex]2[/latex], while the endpoints [latex]f(x_0)[/latex] and [latex]f(x_n)[/latex] appear only once. This happens because interior points serve as endpoints for two adjacent trapezoids.

The trapezoidal rule is actually the average of left and right Riemann sums: [latex]T_n = \frac{1}{2}(L_n + R_n)[/latex]. This makes intuitive sense—you’re averaging the left and right endpoint heights for each subinterval.

Trapezoids provide better curve-following than rectangles, but the midpoint rule often gives even better approximations due to its error-balancing properties.

  • Concave up functions: Trapezoids systematically overestimate (sit above the curve)
  • Concave down functions: Trapezoids systematically underestimate (sit below the curve)
  • Midpoint rule advantage: Often more accurate because errors tend to cancel out rather than accumulate in one direction

Use the trapezoidal rule with [latex]n=2[/latex] to estimate [latex]{\displaystyle\int }_{1}^{2}\frac{1}{x}dx[/latex].

Simpson’s Rule

The Main Idea 

Simpson’s rule takes numerical integration to the next level by approximating functions with parabolas instead of straight lines or rectangles. Since many real functions are curved, using quadratic approximations captures their shape much more accurately than simpler methods.

Setup Requirements:

  • Must use an even number of subintervals (this is non-negotiable!)
  • Each subinterval has equal width [latex]\Delta x = \frac{b-a}{n}[/latex]
  • Work in pairs: every two adjacent subintervals get fitted with one parabola

How It Works:

  1. Take three consecutive points like [latex](x_0, f(x_0))[/latex], [latex](x_1, f(x_1))[/latex], [latex](x_2, f(x_2))[/latex]
  2. Fit a unique parabola [latex]p(x) = Ax^2 + Bx + C[/latex] through these points
  3. Integrate the parabola over the two subintervals [latex][x_0, x_2][/latex]
  4. Repeat the process for the next three points, and so on

[latex]S_n = \frac{\Delta x}{3}(f(x_0) + 4f(x_1) + 2f(x_2) + 4f(x_3) + 2f(x_4) + \cdots + 4f(x_{n-1}) + f(x_n))[/latex]

Error Bound for Simpson’s Rule

The Main Idea 

Simpson’s rule doesn’t just give you an approximation—it also comes with a mathematical guarantee about how accurate that approximation can be. The error bound formula tells you the maximum possible error, giving you confidence in your results.

The Error Bound Formula: If [latex]M[/latex] is the maximum value of [latex]|f^{(4)}(x)|[/latex] over [latex][a,b][/latex], then: [latex]\text{Error in } S_n \leq \frac{M(b-a)^5}{180n^4}[/latex]

Simpson’s rule can be expressed as a weighted average: [latex]S_{2n} = \frac{2}{3}M_n + \frac{1}{3}T_n[/latex] This shows how Simpson’s rule cleverly combines the midpoint and trapezoidal rules.

Special Cases:

  • Polynomials of degree 3 or less: [latex]f^{(4)}(x) = 0[/latex], so [latex]M = 0[/latex] and the error is exactly zero
  • This means Simpson’s rule gives exact answers for cubic and lower-degree polynomials

Problem-Solving Strategy:

  1. Find the fourth derivative of your function
  2. Determine its maximum absolute value over your interval
  3. Apply the error bound formula to see if your approximation meets your precision needs
  4. Adjust [latex]n[/latex] if needed for better accuracy

Use [latex]{S}_{2}[/latex] to estimate [latex]{\displaystyle\int }_{1}^{2}\frac{1}{x}dx[/latex].