Title: Numerical integration
1Numerical integration Idea is to do integral in
small parts - like the way you first learned
integration - a summation
2- Numerical methods just try to make it faster and
more accurate - Newton-Cotes
- Simpson's rule
- Romberg integration, Gauss quadrature
3Numerical integration Newton-Cotes formulas -
based on idea
where
4can be linear
5can be quadratic
6Polynomial can be piecewise over the data
7- Closed and open forms
- data points at the beginning and end limit of
integration are known in closed - open methods have integration limits that extend
beyond the data - open methods are akin to extrapolation
- generally not used with Newton-Cotes
8Trapezoid rule - first of the Newton-Cotes
methods uses first order polynomial - straight
line
9f(a)
f(b)
a
b
10Trapezoid rule uses area of trapezoid to
approximate derivative
Error for Trapezoid rule
If function being integrated is linear - exact
(no second derivative)
11Can apply trapezoid rule to multiple segments
over integration limits
Two segments
Three segments
Four segments
Many segments
12Use n1 equally spaced points interval is Take
original trapezoidal rule
and break up limits of integration
13Substituting trapezoid rule result for each
integral
14Can be thought of as
width
Average height
Error can be estimated by
is the average second derivative
15Example Numerically integrate
from a0.2 to b0.8
16Single application of trapezoidal rule
We dont know zeta so approximate with average f
17(No Transcript)
18True value of integral is 12.82 Trapezoid rule
is 11.26 - within approx error - Etrue is 12
19Multiple segment trapezoidal rule Use segments
(0.2,0.4),(0.4,0.6),(0.6,0.8)
20Etrue is now 2
21Use segments (0.2,0.3),(0.3,0,4), etc
22Etrue is now 0.5