« previous | Thursday, February 13, 2014 | next »
Section 4.3: Numerical Integration
If we have a function
that is impossible (or really hard) to integrate exactly on an interval
, we can estimate the integral based on the values of
at
points
.
- Choose a partition of the interval
→ 
- Pick

- Form the riemann sum
.
We usually define partition intervals by a diameter
. The Riemann integral, if it exists, is the limit of the sum as
.
In practice, we approximate
with a polynomial
, and then integrate the polynomial:
Our error is going to be 0 if
is a polynomial of degree
.
We can get an upper bound on this error by approximating
. Hence
For equidistant points, this bound can be better estimated by
- Construct a numerical rule which is exact for degree at most

- Find the degree of accuracy[1] of the rule
Quadrature Rule
Given
,
Thus
, where
In a simple case where
and
, we get the trapezoid rule.
The degree of accuracy is between
and
.
To find
's, we can set up a linear system instead of integrating the Lagrange polynomials
Change of Variables
Suppose we have a rule for
when
. We can scale the rule to fit an arbitrary interval
as follows:
, where
is a polynomial of the same degree:
Performing a substitution in the integral
gives
This integral can now be approximated by
, where
If
for
, then it is also exact for
of degree
.
Take
- ↑ the degree of accuracy is the largest polynomial degree for which