Title: Numerical Integration:
1Numerical Integration
- Approximating an integral by a sum
2Integrals as areas
3Integrals as areas
Approximate the integral by a finite sum of areas
rectangles
4Integrals as areas
Approximate the integral by a finite sum of areas
trapeziums
5Integrals as areas
Trapezium rule
Associated error
6Integrals as areas
Composite trapezium rule
7Integrals as areas
Simpsons rule
8Integrals as areas
- the rectangle approximation takes the function
to be - constant in the interval
- the trapezium rule uses linear interpolation
between points - Simpsons rule uses polynomial (quadratic)
interpolation - between the points and has an associated error
- these should be compared to a Taylor expansion,
the first - term is a constant, the second term is linear,
the third is - quadratic
9Simpsons rule derivation by method of
undetermined
coefficients
- express the integral as
- this must hold for polynomials of degree two or
less. - In particular, it must hold for
- but we already know the left hand side for
these
10Simpsons rule derivation by method of
undetermined
coefficients
Now calculate the right-hand-side
Solving these gives
11Romberg integration integration by iteration
- make repeated use of the trapezium rule
etc.
etc.
- this gives a series of approximations which can
be used to - extrapolate to give the answer
12Romberg integration doing the extrapolation
- the algorithm takes the form of a triangle, Rjk,
where we start with R00 and work down
R00 R10 R11 R20 R21 R22 R30 R31 R32 R33
are the approximations, repeat until
13Romberg integration doing the extrapolation
The left hand column are given by the trapezium
rule
starting with
To work from the left to the right for a given
column use
14so
Example,
15Example,
We end up with the following triangle
First approximation
Second approximation
Third approximation
16Infinite ranged integrals
- evaluate an integral over an infinite range
- the previous methods would lead to an infinite
sum - so cannot be used
- transform the integral into a finite ranged
integral, e.g.
- change the variable in the second integral
(prove this)