« previous | Tuesday, February 25, 2014 | next »
Gaussian Rule
for points , our degree of accuracy is .
Legendre Polynomials
Our goal is to find roots where
Recall that the inner product space is
for any , where .
Theorem
Proof. Take such that the degree of is at most . Then is identical the Lagrange polynomial
Since the polynomials are equal, then their integrals are equal:
Now take such that the degree of is at most . Then , where .
Observe that the integral is equilavent to zero because , and integrating by parts times gives Evaluating the boundary terms at the points and both give zero, so we are left with .
quod erat demonstrandum
Now on an arbitrary interval, we have simply by change of variables.
Example
has 5 roots . We know that , , .
Solving the equation gives
Error Estimation
Remember Hermite polynomials?
Our error is then
By the intermediate value theorem,
If we let , then
Composite Rule
Recall that the compasite simpson's rule error was
In comparison, the composite gaussian rule error is at most
Example
For example, if and , then how many intervals do we need?
- Gaussian
- If we use the rule as used in the previous example then , so we sample the function at points.
- Simpson
- , so we sample the function at points
- Midpoint
- , so we sample the function at points
- Trapezoidal rule
- , so we sample the function at points
Hence the midpoint and Trapezoidal rules are lousy, but for a concave-up function (i.e. ), the trapezoidal rule always overestimates, and the midpoint rule always underestimates. Therefore, we can get a bound on the value of the exact integral
Section 4.6: Adaptive Integration
If we have a function that "behaves nicely" (i.e. is flat or behaves like a cubic function) on certain intervals and does something interesting on other intervals, we can use several different rules on each interval, but adaptive integratino does this sort of thing "automatically"
Suppose we use Simpson's rule over an entire integral (let be the midpoint between and ):
Now what if we split the interval at the midpoint and compute two Simpson's rules:
If we assume is either constant or does not change much, we can assume :
Algorithm 4.3
Given:
- "flexibility coefficient" (usually 10)
- interval
- Compute (do simpson's rule on and on half-intervals)
- if , then stop
- Otherwise, subdivide into half-intervals with accuracy
- Go to 1 (recursive)