Numerical Integration (By Approximation)

Integrals can be approximated through Reimann Sums (the Midpoint Rule), the Trapezoidal Rule, and Simpson's Rule. Each rule can be applied to find the total error in comparison to the continuous integration.

The Essentials

(1) Reimann Sums (the Midpoint Rule):

This rule adds the sum of the area of n amount of subintervals (sections) in an interval from a to b. Each section is evaluated at the midpoint of the section. This is denoted by...

\[ lim_{n \to +\infty}\sum_{i=-0}^{n}f(m_i)\Delta x = \int_{a}^{b}f(x)dx \]

where:
\( \Delta x = \frac{b-a}{n} \)
\( m_i \)= the center point of each sub-interval
\( n \) = number of sub-intervals (sections)

Error Bounds for Midpoint Rule:

The bounds of error for the midpoint rule can be found using...

\[ M_n\leq \frac{M(b-a)^3}{24n^2} \]

where:
\( M \) = the maximum value of \( |f"(x)| \) over the interval [a,b]
\( n \) = number of sub-intervals

(2) The Trapezoidal Rule:

This rule sums up the area of trapezoids beneath the function instead of rectangles like the midpoint rule. It is derived by using the equation for the area for a trapezoid. This is denoted by...

\[ T_n=\frac{1}{2}\Delta x(f(x_0)+2f(x_1)+2f(x_2)+...+2f(x_{n-1})+f(x_n) \]
\[ lim_{n \to +\infty} (T_n)= \int_a^bf(x)dx \]

where:
\( \Delta x = \frac{b-a}{n} \)
\( n \) = number of trapezoids (sections)

Error Bounds for Trapezoidal Rule:

The bounds of error for the trapezoidal rule can be found using...

\[ T_n\leq \frac{M(b-a)^3}{12n^2} \]

where:
\( M \) = the maximum value of \( |f"(x)| \) over the interval [a,b]
\( n \) = number of sub-intervals

(3) Simpson's Rule:

Simpson's rule creates parabolic approximations for each section for a more accurate approximation. This is denoted by...

\[ S_n=\frac{\Delta x}{3}(f(x_0)+4f(x_1)+2f(x_2)+4f(x_3)+2f(x_4)+...+2f(x_{n-2})+4f(x_{n-1})+f(x_n) \]
\[ lim_{n \to +\infty} (S_n)=\int_a^bf(x)dx \]

where:
\( \Delta x = \frac{b-a}{n} \)
\( n \) = number of sections

Error Bounds for Simpson's Rule

The bounds of error for Simpson's rule can be found using...

\[ S_n\leq \frac{M(b-a)^5}{180n^4} \]

where:
\( M \) = the maximum value of \( |f^4(x)| \) over the interval [a,b]
\( n \) = number of sub-intervals

Example

Using Simpson's Rule, we can find the approximation of $f(x)=3x^3+2x^2-4$ across the interval [5,8] with 6 intervals;

\[ \int_5^8f(x)dx\approx\frac{\frac{8-5}{6}}{3}(f(5)+4f(5.5)+2f(6)+4f(6.5)+2f(7)+4f(7.5)+f(8)) \]
\[ 1/6(421+4(555.625)+2(716)+4(904.375)+2(1123)+4(1374.125)+(1660)) \]
\[ \int_5^8f(x)dx\approx2849.25 \]

Next we can find the margin of error for the approximation using the formula shown above.

\[ S_6=\frac{18(8-5)^5}{180(6^4)}=0.01875 \]

Although the maximum error that is possible for this approximation is 0.01875. The actual error can be found to be 0 because the actual integral is also 2849.25.

Practice

Evaluate these expressions:

  1. \( f(x)=sin(3x) \) on the interval [ \( \frac{\pi}{2}$,$\frac{11\pi}{6} \)] where n=4 using the trapezoidal rule
  2. Find the margin of error for the equation in practice 1
  3. Find the actual error of the equation in practice 1

Solutions:

  1. 0
  2. 0.8612
  3. \( 1.67*10^{-12} \)