- Estimate definite integrals using the midpoint and trapezoidal rules
- Use Simpson’s rule to find definite integrals with a specified accuracy
Why Do We Need Numerical Integration?
Here’s the reality: many functions you’ll encounter don’t have antiderivatives that can be expressed in simple, closed forms. What does this mean for you? You can’t always use the Fundamental Theorem of Calculus to evaluate definite integrals directly.
The solution? We use numerical integration techniques to approximate these integral values. Think of it as getting a really good estimate when an exact answer isn’t practical.
Remember that we defined definite integrals as limits of Riemann sums? Well, any Riemann sum can serve as an estimate for the integral [latex]\displaystyle\int_a^b f(x),dx[/latex].
Let’s recall how Riemann sums work:
Setting up a Riemann sum:
- Partition the interval [latex][a,b][/latex] into subintervals: [latex]P = \{x_0, x_1, x_2, \ldots, x_n\}[/latex] where [latex]a = x_0 < x_1 < x_2 < \cdots < x_n = b[/latex]
- Choose sample points in each subinterval: [latex]S = \{x_1^{*}, x_2^{*}, \ldots, x_n^{*}\}[/latex] where [latex]x_{i-1} \leq x_i^{*} \leq x_i[/latex] for all [latex]i[/latex]
- Calculate the Riemann sum: [latex]\sum_{i=1}^n f(x_i^*) \Delta x_i[/latex] where [latex]\Delta x_i = x_i - x_{i-1}[/latex]
The width [latex]\Delta x_i[/latex] represents the length of the [latex]i[/latex]th subinterval, and [latex]f(x_i^*)[/latex] gives us the height of each rectangle in our approximation.
The Midpoint Rule
One specific and very useful type of Riemann sum is the midpoint rule. Here’s what makes it special:
- Use subintervals of equal width
- Choose the midpoint [latex]m_i[/latex] of each subinterval as your sample point [latex]x_i^*[/latex]
This approach often gives you better approximations than using left or right endpoints, especially when the function is curved.
The Midpoint Rule
Assume that [latex]f\left(x\right)[/latex] is continuous on [latex]\left[a,b\right][/latex]. Let n be a positive integer and [latex]\Delta x=\frac{b-a}{n}[/latex]. If [latex]\left[a,b\right][/latex] is divided into [latex]n[/latex] subintervals, each of length [latex]\Delta x[/latex], and [latex]{m}_{i}[/latex] is the midpoint of the [latex]i[/latex]th subinterval, set
Then [latex]\underset{n\to \infty }{\text{lim}}{M}_{n}={\displaystyle\int }_{a}^{b}f\left(x\right)dx[/latex].
As we can see in Figure 1, if [latex]f\left(x\right)\ge 0[/latex] over [latex]\left[a,b\right][/latex], then [latex]\displaystyle\sum _{i=1}^{n}f\left({m}_{i}\right)\Delta x[/latex] corresponds to the sum of the areas of rectangles approximating the area between the graph of [latex]f\left(x\right)[/latex] and the [latex]x[/latex]-axis over [latex]\left[a,b\right][/latex]. The graph shows the rectangles corresponding to [latex]{M}_{4}[/latex] for a nonnegative function over a closed interval [latex]\left[a,b\right][/latex].

Use the midpoint rule to estimate [latex]{\displaystyle\int }_{0}^{1}{x}^{2}dx[/latex] using four subintervals. Compare the result with the actual value of this integral.
Use [latex]{M}_{6}[/latex] to estimate the length of the curve [latex]y=\frac{1}{2}{x}^{2}[/latex] on [latex]\left[1,4\right][/latex].