MATH 417 Lecture 11

From Notes
Jump to navigation Jump to search

« previous | Tuesday, February 18, 2014 | next »


Section 4.1: Numerical Differentiation

Given some points , , and , approximate using the values 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(x_0-h)} , 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(x_0)} , 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 f(x_0 + 3h)} within 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 O(h^2)} accuracy.

Taylor Method:

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(x_0) = f(x_0-h + h) = f(x_0 - h) + h \, f'(x_0-h) + \frac{h^2}{2} \, f''(x_0-h) + \frac{h^3}{3!} \, f'''(\xi_1)}

To cancel the term, we need to multiply the first equation by 16 and subtract the equations. Doing so yields

Now we solve for :


Section 4.3: Numerical Integration

Given an interval , we want to find .

To do this, we must find a rule with the least degree of accuracy (DAC) such that the approximation is equivalent for polynomials of degree .

Hence we get the system

The solution: , , and

Hence the approximation is equal for polynomials of degree 2:

.

This approximation does not work for polynomials of degree 3 because is "approximated" to be 0, but is actually positive.


Shifted and Scaled Interval

Using the previous approximation, we want to approximate . The interval maps correspondingly:

We keep the same coefficients, but multiply by the ratio of the new interval length to the old:

We keep the same degree of accuracy (i.e. 2) because shifting and scaling is just a linear change of variables.


We can find an alternate rule if we keep the other endpoint (i.e. 10):


Composite Simpson's Rule

As done by Stirling (ca. 1730)

Simpson's rule:

This rule is exact for polynomials of of up to degree 3, hence DAG = 3


We are going to need the following theorem:

Theorem. [Intermediate Value Theorem]. let and be continuous functions with (without loss of generality) on an interval . Then

If ,

Proof. (omitted)

quod erat demonstrandum


Given , we interpolate at , , , and (Find ).

The first 3 terms are the Lagrange interpolating polynomial , and the third is "more" ... something to do with .

Now

Now , so we're left with the integral of the interpolating polynomial :


Computing the Error

So

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} f(x) \,\mathrm{d}x - \int_{a}^{b}p_3(x) = -\frac{1}{24} \, \int_{a}^{b} f^{(4)}(\xi(x)) \, (x-a) \, (x-b) \, \left( x-\frac{a+b}{2} \right)^2}

Let 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 h(x) = f^{(4)}(\xi(x))} , 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 g(x) = (x-a) \, (x-b) \, \left( x - \frac{a+b}{2} \right)}

Then 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} h(x) \, g(x) \,\mathrm{d}x = h(\zeta) \, \int_{a}^{b} g(x) \,\mathrm{d}x} by the intermediate value theorem.

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} g(x) \,\mathrm{d}x = \int_{a}^{b} (x-a) \, (x-b) \, \left( x-\frac{a+b}{2} \right) \,\mathrm{d}x}

Let 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 y = x - \frac{a+b}{2}} 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 h = \frac{b-a}{2}} , then

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_{-h}^{h} y^2 \, (y+h) \, (y-h) \,\mathrm{d}y = \frac{4h^5}{15}}


Therefore, the error is 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{f^{(4)}(\xi(\zeta))}{24} \, \frac{4h^5}{15} = -\frac{f^{(4)}(\xi_1)}{90} \, h^5}


Composite Rule

Suppose we apply Simpson's 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 n} times (hence we need 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 2n} points) over a large 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 \left[ a,b \right]} . In other words, we take 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} sub-intervals of 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]} that have equal length.

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} f(x) \,\mathrm{d}x = \sum_{k=0}^{n-1} \int_{x_{2k}}^{x_{2k+2}} f(x) \,\mathrm{d}x \approx \sum_{k=0}^{n-1} h \, \left( f(x_{2k}) + 4f(x_{2k+1}) + f(x_{2k+2}) \right)}

Where 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 h = \frac{b-a}{2h}} .

Simplifying the expression above gives

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} f(x) \,\mathrm{d}x = \frac{b-a}{2n} \, \left( f(a) + f(b) + 4 \, \sum_{k=0}^{n-1} f(x_{2k+1}) + \sum_{k=1}^{n-1} f(x_{2k}) \right)}


The error of this composite is given by

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 \sum_{k=1}^n \left( -\frac{f^{(4)}(\xi_k)}{90} \, \left( \frac{b-a}{2n} \right)^5 \right) = -\frac{h^4 \, (b-a)}{180} \cdot \underbrace{ \frac{1}{n} \, \sum_{k=1}^n f^{(4)}(\xi_k)}_{f^{(4)}(\zeta)}}

Hence 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 error \in O(h^4)}