Weierstrass Approximation Theorem: If feC[a,b], then there exists a polynomial P(x) such that P(x) is arbitrarily close to f(x) on [a,b].
Pf: Wolog, assume [a,b] = [0,1].Remark: This is an existence theorem. In practice, finding the polynomial might be very difficult and of very high degree.
Indeed, if not we can always apply the theorem to the functiong(x) = f(a+x(b-a)) to get g(0)=f(a) and g(1)=f(b).
Further, wolog assume that f(0) = f(1) = 0.
Indeed, if not, we can apply the theorem to the functionh(x) = f(x) - f(a) - [f(b) - f(a)]*(x-a)/(b-a) to get h(a) = h(b) = 0.
In either case, we can then convert the resulting polynomial P(x) back to the original settings.Define Qn(x) = cn(1 - x2)n, for n=1, 2, 3, ... where cn is chosen so that
Lemma: (1 - x2)n> (1 - nx2), for 0< x < 1.
1 = ó
õ1 -1
Qn(x) dx Pf of Lemma: Consider h(x) = (1 - x2)n - (1 - nx2).Note,
Notice h(0) = 0 and h'(x) = 2nx(1 - (1-x2)n-1) > 0 for 0 < x < 1.
=> h(x) is increasing with a minimum of zero
=> h(x) is non-negative for 0 < x < 1.= 4/ (3 Ön )
ó
õ1 -1
(1-x2)n dx =
2 ó
õ1 0
(1-x2)n dx >
2 ó
õ1 1/n1/2
(1-x2)n dx >
2 ó
õ1 1/n1/2
(1 - nx2) dx =
> 1 / Ön.
Therefore, cn < Ön.
Now, for d < |x| < 1,Qn(x) = cn(1 - x2)n < Ön (1 - d2)n and so Qn(x) -> 0 uniformly for d< |x| < 1.
Considerusing a simple change of variable.
Pn(x) = ó
õ1-x -x
f(x+t)Qn(t) dt =
ó
õ1 0
f(t)Qn(t-x) dt
Notice, the last integral is clearly a polynomial in x since the variable t which involves the function f(t) disappears with the integration and the only place the x appears is in the Qn(t-x) term, where Qn is a polynomial.
Thus {Pn} is a sequence of polynomials.
Since f is a continuous function, given e > 0, choose d > 0 such that|(x+t) - x| < d => |f(x+t) - f(x)| < e/2. Let M = sup |f(x)|.
Then, for 0 < x < 1, noting that we have chosen Qn so that it integrates to 1,< 4M Ön (1 - d2)n + e/2, noting that Qn(t) is even on the first integral.
| Pn(x) - f(x) | =
| ó
õ1 -1
f(x+t)Qn(t)dt - f(x) ó
õ1 -1
Qn(t) dt |
< ó
õ1 -1
|f(x+t)-f(x)|Qn(t)dt , by pulling the absolute value on the inside
< 2M ó
õ-d -1
Qn(t)dt +
e/2 ó
õd -d
Qn(t)dt +
2M ó
õ1 d
Qn(t)dt
< e, for all n large enough...say N
For this N, PN(x) is a finite degree polynomial within e distance from f(x), as desired.
Taylor Polynomials: Given feCn+1[a,b] and some value c with a<c<b,
Pf: Write the polynomial part above as Pn(x). So we want to prove f(x) = Pn(x) + Rn(x).These are created by using Taylor's theorem and throwing away the remainder term.
Certainly for x=c, the statement holds.
Assume x is not equal to c and define Rn(x) = f(x) - Pn(x).
Defineg(t) = f(x) - f(t) - f'(t)(x-t) - f''(t) (x-t)2/2! - f'''(t) (x-t)3/3! - ... f(n)(t) (x-t)n/n! - Rn(x) (x-t)n+1/(x-c)n+1. Notice,g'(t) = - f(n+1)(t) (x-t)n/n! + (n+1)Rn(x) (x-t)n/(x-c)n+1, for all t between c and x.
Moreover, for the fixed x, g(c) = 0 and g(x) = 0.
Thus, by the Mean Value Theorem (actually, the special case known as Rolle's Theorem), there is a number z between c and x such that g'(z) = 0.
Substituting this into the expression above yields0 = - f(n+1)(z) (x-z)n/n! + (n+1)Rn(x) (x-z)n/(x-c)n+1, and by solving yieldsRn(x) = f(n+1)(z) (x-c)n+1/(n+1)! Finally, since g(c)=0, plugging this back into the definition of g(c) yields0 = f(x) - f(c) - f'(t)(x-c) - f''(c) (x-c)2/2! - f'''(c) (x-c)3/3! - ... f(n)(c) (x-c)n/n! - Rn(x) (x-c)n+1/(x-c)n+1, from which the result easily follows.
LaGrange Polynomials: Given n+1 values of the function (x0,f(x0)) , (x1,f(x1)) , ... , (xn,f(xn)), find the polynomial of degree at most n which passes through all these points.
Derivation:
Lagrange error bound Theorem: Let x0,x1, , ... , xn be distinct numbers in the interval [a,b] and let feCn+1[a,b]. If P(x) is the Lagrange Interpolating Polynomial, then for each x in [a,b], there exists a number z in (a,b) such that
Pf: Easily, if x = xk, for one of the given x values, then f(x) = P(x) and the remainder is zero.Lagrange Uniqueness Theorem: Any two polynomials of the same degree n which agree at n+1 points are equal.
So, suppose x is a fixed value different that all of the given data values {xk}. Considerg(t) = f(t) - P(t) - [f(x) - P(x)] (t-x0) (t-x1) ... (t-xn) / [(x-x0) (x-x1) ... (x-xn)] Certainly g has n+1 continuous derivatives.
Now, for t = xk, g(xk) = 0.
Moreover, g(x) = 0.
Thus, g(t) has n+2 zeros in the interval [a,b].
So, by the generalized Rolle's Theorem, there exists z in (a,b) such that
g(n+1)(z) = 0, or
0 = f(n+1)(z) - P(n+1)(z) - [f(x) - P(x)] D(n+1)[ (t-x0) (t-x1) ... (t-xn) ] / [(x-x0) (x-x1) ... (x-xn)].
Note, P(t) is a polynomial of degree n so its (n+1)st derivative will be zero.
Further, the term (t-x0) (t-x1) ... (t-xn) is a polynomial of degree n+1 so its (n+1)st derivative will be a constant. Indeed, the leading term in the product is tn+1 whose (n+1)st derivative is (n+1)!
Therefore, the last equation becomes
0 = f(n+1)(z) - [f(x) - P(x)] (n+1)! / [(x-x0) (x-x1) ... (x-xn)].
Solving for f(x) yields the desired result.
Pf: Suppose f(x), g(x) are of degree n and agree at n+1 points.Ex: Construct a parabola passing through (1,4), (-1,0) and (2,9). Then p(x)= ax2 + bx + c and by plugging in the points,
Then, r(x)=f(x)-g(x) is of degree at most n with n+1 roots gives r(x)=0.
which is a 3x3 system of equations to solve. If the polynomial p(x) were of higher degree, then hard to solve.4 = a + b + c
0 = a - b + c
9 = 4a + 2b + c
But if we write p(x)=c + b(x-1) + a(x-1)(x+1), then plugging in the points yields (solving as we go along)
which is very easy to solve successively. This second form is called Newton's form.4 = c
0 = c - 2b, or b=2
9 = c + b + 3a, or a=1,
Newton's Divided Differences: Successively build up the polynomial by finding the coefficients as above.
(x0,f0) gives p0(x) = f0, passes through the one point.Continuing in this manner shows the coefficients bi are given by the divided difference table, page 63, etc.
(x1,f1) gives p1(x) = p0(x) + (x-x0)b1, passes through the first two points if b1=(f1-f0)/(x1-x0).
(x2,f2) gives p2(x) = p1(x) + (x-x0)(x-x1)b2, passes through the first three points if b2=?.
f[xj,...,xk] = (f[xj+1,...,xk] - f[xj,...,xk-1]) / (xk - xj), for j<k.If x0 < x1 < ... < xn, this is called Newton's Forward Divided Difference Polynomial.
If Dx
is constant, the Divided Difference Formulas can be written in a closed
form involving the binomial coefficents.
Program Subroutine To Determine the Newton's Divided Differences:
Homework: Go to some busy local store and collect some data regarding the number of customers that enter the store during a given amount of time. Carefully count the cummulative number that enter the store within 2, 5, 7 and 10 minutes (or other similar, non-uniform time steps but no more than five points). Using this data:
Linear Splines: Piece linear segments Lk(x) = ak + bk(x-xk-1) together to interpolate y-values only at the ends:
Hence, we have 4n unknowns (the vectors of coefficients a, b, c and d) and 4n-2 equations. By adding two additional equations, we can uniquely solve for the unknown vectors.
End Conditions:
ó
õ |
1
-1 |
(1-x2)n dx = |