MATH 417 Lecture 13

From Notes
Jump to navigation Jump to search

« 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

Theorem. [Gaussian Rule]. The degree of accuracy of the Gaussian Rule is if and only if for all polynomials of degree

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
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle N \approx 10^5} , so we sample the function at Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle 10^5} points
Trapezoidal rule
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{c}{12} \, \left( \frac{1}{N} \right)^2 < 10^{-10}}
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle N \approx 10^5} , so we sample the function at Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle 10^5+1} points


Hence the midpoint and Trapezoidal rules are lousy, but for a concave-up function (i.e. Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle f'' > 0} ), 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 Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \left[ a,b \right]} (let be the midpoint between Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle a} and Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle b} ):

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \int_a^b - \frac{b-a}{2} \left( f(a) + 4f(a+h) + f(b) = -\frac{f^{(4)}(\mu)}{90} h^5 \right)}

Now what if we split the interval at the midpoint and compute two Simpson's rules:

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \int_a^{a+h} f(x) \,\mathrm{d}x + \int_{a+h}^{b} f(x) \,\mathrm{d}x - \left[ S \left( a, \frac{a+b}{2} \right) + S \left( \frac{a+b}{2}, b \right) \right] = \ldots = \frac{1}{16} \left( -\frac{f^{(4)}(\xi)}{90} \, h^5 \right)}


If we assume Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle f^{(4)}} is either constant or does not change much, we can assume Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle f''(\mu) \approx f''(\xi)} :

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \Delta = S \left( a, \frac{a+b}{2} \right) + S \left( \frac{a+b}{2}, b \right) - S(a,b) \approx 15 \cdot \left( -\frac{1}{16} \, \frac{f^{(4)}(\xi)}{90} h^5 \right) = 15 \cdot \mbox{error of}\ S \left( a, \frac{a+b}{2} \right) + S \left( \frac{a+b}{2}, b \right)}


Algorithm 4.3

Given:

  • Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \epsilon > 0}
  • "flexibility coefficient" Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle k} (usually 10)
  • interval Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle [a,b]}
  1. Compute Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \Delta} (do simpson's rule on Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle [a,b]} and on half-intervals)
  2. if Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \left| \Delta \right| < k \, \epsilon} , then stop
  3. Otherwise, subdivide Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \left[ a,b \right]} into half-intervals with Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{\epsilon}{2}} accuracy
  4. Go to 1 (recursive)