CH7 Numerical Integration
CH7 Numerical Integration
CH7 Numerical Integration
Numerical Integration
Introduction
Numerical integration is a technique in numerical
analysis that is used to approximate the value of a
definite integral. It involves dividing the area
under a curve into small sub-intervals and
computing the area of each sub-interval using
some approximation formula. Numerical
integration is widely used in various fields such
as engineering, physics, economics, and finance
to solve complex problems that cannot be solved
analytically.
Introduction
In this presentation, we will explore several methods of numerical
integration, starting from the basic ones such as Trapezoidal Rule,
Simpson's 1/3 Rule, Simpson's 3/8 Rule, and Boole's Rule. Then,
we will move on to more advanced methods such as Romberg
Integration, Gauss Integration, and Monte Carlo Integration. We
will discuss the theoretical background of each method, their
advantages and disadvantages, and provide examples to illustrate
their application in solving practical problems. By the end of this
presentation, you will have a good understanding of numerical
integration and be able to choose the appropriate method for a given
problem.
Table of contents
01 02
Analytical Integration vs Purpose and
Numerical Integration importance
03 04
Comparison of
Methods
Methods
Analytical vs
01
Numerical
Integration
Analytical
Integration
Analytical integration is the process of finding the exact
value of a definite integral using analytical methods.
It involves applying integration rules and techniques to
derive a closed-form expression for the integral.
Analytical integration is often the preferred method for
computing integrals when a closed-form expression
exists, as it provides exact results.
However, analytical integration is not always possible or
practical, especially for complex or highly oscillatory
functions.
Analytical Integration
Analytical integration should be used when a closed-form expression for the integral exists and is
computationally efficient to evaluate.
Numerical integration should be used when analytical methods are not possible or practical, or when the integral
is too complex or high-dimensional for analytical methods.
02
Purpose and importance
Purpose of Numerical Integration
Economics and
Physics
Finance
Numerical integration is used in physics to Numerical integration is used in
compute the trajectory of a projectile, simulate finance to compute the value of
the behavior of a fluid, or calculate the energy financial derivatives, such as options
of a system. For example, it can be used to or futures contracts. For example, it
simulate the motion of planets in the solar can be used to compute the price of a
system or to calculate the scattering cross- call option on a stock or the value of a
section of particles. bond.
Practical Application of Numerical
Integration
Trapezoidal Rule
Simpson’s Rule
Simpson’s 1/3 Rule
Simpson’s 3/8 Rule
Boole's Method
Romberg Integration
Gaussian Quadrature
Step 2: Calculate the values of the function at each of the segment endpoints
using the formula f(x) = sin(x) + e^x. For 1 segments, we need to calculate
the values at 2 points:
x0 = 0.1
x1 = 0.5
Steps:
● Define the function f(x) to be integrated over the interval [a,b].
● Choose the number of segments, n, to be used in the trapezoidal rule.
● Calculate the step size, h, using the formula h = (b-a)/n.
● Use the trapezoidal rule with step size h to calculate T(1,1), the first term in the Romberg
tableau.
● Use the trapezoidal rule with step size h/2 to calculate T(2,1), the second term in the first
column of the tableau.
● Use the extrapolation formula T(i,j) = (4^(j-1) * T(i,j-1) - T(i-1,j-1)) / (4^(j-1) - 1) to calculate
the remaining terms in the first column of the tableau, where i > j.
● Repeat steps 5-6 for the remaining columns of the tableau.
● The final estimate of the integral is the last element in the tableau, T(n,n).
Excel formula
Gaussian Quadrature
● Gauss quadrature is a numerical
integration method that uses a weighted
sum of function values at specific points to
approximate integrals. It is based on the
idea of choosing the optimal points and
weights to minimize the error in the
approximation. The method works best for
integrals over a finite interval and for
smooth functions.
Gauss Quadrature
● The main steps of Gauss quadrature are:
● Choose the number of quadrature points, n, based on the desired accuracy of the approximation.
● Determine the optimal quadrature points and weights for the chosen number of points using a
predetermined algorithm (such as the Gauss-Legendre formula).
● Evaluate the integrand at each of the quadrature points and multiply each value by its corresponding
weight.
● Gaussian quadrature has a high degree of accuracy compared to other numerical integration
methods, and is particularly useful for integrals that are difficult or impossible to solve analytically.
Gauss Quadrature
●
Monte Carlo Integration
Monte Carlo integration is a numerical integration method that relies on random sampling to approximate
the value of an integral.
● Define the region of integration: Determine the region of the function you want to integrate.
● Generate random points: Generate a large number of random points within the region of integration.
● Evaluate the function at each point: Calculate the value of the function at each random point.
● Calculate the average: Find the average value of the function by summing up all the values and
dividing by the number of random points.
● Multiply by the area: Multiply the average value by the area of the region of integration to obtain the
estimate of the integral.
Monte Carlo Integration
Factors to consider when choosing a
method: Integration
Computing interval
Accuracy resources
The range of the The availability and
The accuracy requirement of integration interval. limitations of the
the integration solution.
computing resources for
the integration method.
Factors
Function Number of
properties Implementation
dimensions
The smoothness and complexity
complexity of the function The number of dimensions
to be integrated. of the function to be The complexity of
integrated. implementing and using
the integration method.
Numerical
Summary
Integration
process of finding the numerical Methods
approximation of a definite Newton-Cotes Integration includes
integral. Trapezoidal Rule, Simpson's 1/3
Newton Cotes Integration Rule, Simpson's 3/8 Rule, and
Analytical integration -Trapezoidal Rule Boole's Rule.
process of determining the definite - Simpson’s 1/3 Rule Romberg Integration uses
integral of a given function using - Simpson’s 3/8 Rule Richardson Extrapolation to
calculus. - Boole’s Rule improve the accuracy of
Factors in choosing numerical integration.
Romberg Integration Gaussian Quadrature approximates
methods Gauss Quadrature integrals using weighted sum of
Accuracy Monte Carlo Integration function values at predetermined
Integration interval points.
Computing resources Monte Carlo Integration uses random
Function properties sampling to estimate integrals.
Number of dimensions
Implementation complexity
Conclusions
In conclusion, numerical integration methods are used to approximate the definite integral of
a function when the integral cannot be evaluated analytically. There are various numerical
integration methods, such as Newton-Cotes integration methods like Trapezoidal Rule,
Simpson’s 1/3 Rule, Simpson’s 3/8 Rule, and Boole’s Rule. Additionally, there are more
advanced methods such as Romberg integration, Gaussian quadrature, and Monte Carlo
integration.
The choice of method depends on several factors, such as the accuracy required, the
smoothness of the function, and the computational resources available. Each method has its
strengths and weaknesses, and the appropriate method should be chosen based on the
problem at hand.
Overall, numerical integration methods are essential tools for approximating integrals in
various fields, including physics, engineering, and economics.