9. Topic 9(COLON) Mathematical Modelling and Numerical Methods

Lesson 9.3: Numerical Integration

#### Lesson focus #### Learning outcomes Students should be able to:.

Lesson 9.3: Numerical Integration

Introduction

Welcome to Lesson 9.3 of Foundation Further Mathematics, students! 🌟 In this lesson, we will dive into the world of numerical integration. This is an essential topic that allows us to find approximate solutions to integrals when an exact solution may be impossible to obtain. By the end of this lesson, you will understand how to use the trapezium rule and Simpson's rule to estimate definite integrals, evaluate the errors associated with these methods, and refine your estimates for improved accuracy.

Learning Objectives

  • Understand the trapezium rule and Simpson's rule.
  • Learn how to estimate and reduce errors by increasing the number of strips.
  • Compare numerical results with exact results when applicable.
  • Estimate a definite integral using the trapezium rule and Simpson's rule.
  • Refine your estimates by adjusting the subdivisions used in integration.

Understanding Numerical Integration

Numerical integration is a technique used to approximate the area under a curve when an exact integral cannot be easily calculated. It's particularly useful in applied mathematics, engineering, and physics.

The Trapezium Rule

The trapezium rule approximates the area under a curve by dividing it into trapezoids rather than rectangles. The basic formula, when using $ n $ equally spaced intervals, is given by:

$$\int_{a}^{b} f(x) \, dx \approx \frac{b - a}{2n} \left( f(x_0) + 2 \sum_{i=1}^{n-1} f(x_i) + f(x_n)

ight)$$

where:

  • $ a $ and $ b $ are the limits of integration,
  • $ n $ is the number of trapezoids (or intervals),
  • $ x_0, x_1, \ldots, x_n $ are evenly spaced points within the interval.

Example of the Trapezium Rule

Let's estimate the integral $ \int_{0}^{2} (x^2 + 1) \, dx $ using the trapezium rule with 4 intervals.

  1. First, calculate $ f(x) = x^2 + 1 $ at the limits and the points in between:
  • $ f(0) = 0^2 + 1 = 1 $
  • $ f(0.5) = (0.5)^2 + 1 = 1.25 $
  • $ f(1) = 1^2 + 1 = 2 $
  • $ f(1.5) = (1.5)^2 + 1 = 3.25 $
  • $ f(2) = 2^2 + 1 = 5 $
  1. The widths of the trapezoids are:
  • Width = $ \frac{2 - 0}{4} = 0.5 $
  1. Apply the trapezium rule:

$$ \int_{0}^{2} (x^2 + 1) \, dx \approx \frac{0.5}{2} \left( 1 + 2(1.25 + 2 + 3.25) + 5

ight) $$

  1. Calculate:

$$ = 0.25 \left( 1 + 2(6.5) + 5

ight) = $0.25 \left( 1$ + 13 + 5

ight) = $0.25 \times 19$ = 4.75 $$

Thus, the trapezium rule gives us an approximate value of $ \int_{0}^{2} (x^2 + 1) \, dx \approx 4.75 $.

Simpson's Rule

Simpson's rule offers a more accurate approximation than the trapezium rule, especially when the function is well-behaved. The formula for Simpson's rule for $ n $ intervals (where $ n $ is even) is:

$$\int_{a}^{b} f(x) \, dx \approx \frac{b - a}{3n} \left( f(x_0) + 4 \sum_{i=1}^{n/2} f(x_{2i-1}) + 2 \sum_{i=1}^{n/2-1} f(x_{2i}) + f(x_n)

ight)$$

Example of Simpson's Rule

Using the same function $ f(x) = x^2 + 1 $, we can estimate the same integral with Simpson's rule with 4 intervals.

  1. Calculate $ f $ at the points:
  • $ f(0) = 1 $, $ f(0.5) = 1.25 $, $ f(1) = 2 $, $ f(1.5) = 3.25 $, $ f(2) = 5 $
  1. Apply Simpson's rule:

$$ \int_{0}^{2} (x^2 + 1) \, dx \approx \frac{0.5}{3 \times 2} \left( 1 + 4(1.25) + 2(2) + 4(3.25) + 5

ight) $$

  1. Calculate:

$$ = \frac{0.5}{6} \left( 1 + 5 + 4 + 13 + 5

ight) = $\frac{0.5}{6}$ $\times 28$ = $\frac{14}{6}$ = $\frac{7}{3}$ $\approx 2$.33 $$

Thus, using Simpson's rule, we find an approximate value of $ \int_{0}^{2} (x^2 + 1) \, dx \approx 2.33 $.

Reducing the Error

Both the trapezium rule and Simpson’s rule give approximate results, and the accuracy of these methods can be improved by increasing the number of intervals, $ n $. As $ n $ increases, the amount of error generally decreases because the shapes of the approximated areas fit the curve more closely.

Comparing Results

As we saw, using more intervals changes our estimates significantly. For precise contexts or applications, always compare these estimates against known values (if available) or numerical solutions to assess their accuracy.

Conclusion

In today’s lesson, students, you have learned how to apply the trapezium rule and Simpson's rule to estimate areas under curves. You were introduced to reducing the error by refining your subdivisions and learned about how to compare numerical and exact results. Remember, these numerical methods are powerful tools when exact solutions are inconvenient or impossible.

Study Notes

  • Numerical integration helps approximate areas under curves.
  • Trapezium rule formula: $$\int_{a}^{b} f(x) \, dx \approx \frac{b - a}{2n} \left( f(x_0) + 2 \sum_{i=1}^{n-1} f(x_i) + f(x_n)

ight)$$

  • Simpson's rule formula: $$\int_{a}^{b} f(x) \, dx \approx \frac{b - a}{3n} \left( f(x_0) + 4 \sum_{i=1}^{n/2} f(x_{2i-1}) + 2 \sum_{i=1}^{n/2-1} f(x_{2i}) + f(x_n)

ight)$$

  • Increasing the number of intervals generally reduces errors in approximations.
  • Comparing numerical results with exact solutions can validate methods.

Practice Quiz

5 questions to test your understanding