Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
An Applet-Based Presentation of the Chebyshev Equioscillation Theorem Robert Mayans Fairleigh Dickinson University January 5, 2007. Statement of the Theorem • Let f be a continuous function on [a,b]. • Let pn* be a polynomial of degree ≤ n that best approximates f, using the supremum norm on the interval [a,b]. • Let dn* = || f – pn* || = inf { || f – p || : deg(p) ≤ n } Statement of the Theorem • There exists a polynomial pn* of best approximation to f, and it is unique. • It alternately overestimates and underestimates the function f by exactly dn*, at least n+2 times. • It is the unique polynomial to do so. An Example • Function: y = f(x) = ex, on [-1,1] • Best linear approximation: y = p1(x) = 1.1752x+1.2643 • Error: || f - p1 || = 0.2788 An Example Linear Approximation to exp(x) 3 2.5 2 1.5 1 0.5 0 -1.5 -1 -0.5 f(x)=exp(x) 0 0.5 p1(x)=1.2643+.1752*x 1 1.5 An Example Error plot, exp(x) - p1(x) -1.5 -1 -0.5 0.4 0.3 0.2 0.1 0 -0.1 0 -0.2 -0.3 -0.4 0.5 E(x)=f(x)-p1(x) E(-1) = 0.2788 E(0.1614) = -0.2788 E(1) = 0.2788 1 1.5 Another Example • Function: y = f(x) = sin2(x), on [-π/2,π/2] • Best quadratic approximation: y = p2(x) = 0.4053x2+0.1528 • Error: || f – p2 || = 0.1528 Another Example Quadratic Approximation to sin^2(x) 1.4 1.2 1 0.8 0.6 0.4 0.2 0 -2 -1.5 -1 -0.5 f(x) = sin^2(x) 0 0.5 1 1.5 p2(x) = 0.4053x^2+0.1528 2 Another Example Error with 5-point alternating set 0.2 0.15 0.1 0.05 0 -2 -1.5 -1 -0.5 -0.05 0 0.5 1 -0.1 -0.15 -0.2 E(x) = f(x)-p2(x) Alternating set: -π/2, -1.0566, 0, 1.0566, π/2 || f – p2 || = 0.1528 1.5 2 A Difficult Theorem? “The proof is quite technical, amounting to a complicated and manipulatory proof by contradiction.” -- Kendall D. Atkinson, An Introduction to Numerical Analysis Weierstrass Approximation • Let f be a continuous function on [a,b]. • Then there is a sequence of polynomials q1, q2, … that converge uniformly to f on [a,b]. • In other words, || f - qn || 0 as n ∞. Bernstein Polynomials • Suppose f is continuous on [0,1]. • Define the Bernstein polynomials for f to be the polynomials: n Bn ( f , x ) k 0 n k nk f k / n x 1 x k • The Bernstein polynomials Bn(f,x) converge uniformly to f. Bernstein Polynomials • An applet to display the Bernstein polynomial approximation to sketched functions. • We use of de Casteljau’s algorithm to calculate high-degree Bernstein polynomials in a numerically stable way. Existence of the Polynomial • Sketch of a proof that there exists a polynomial of best approximation. • Define the height of a polynomial by ht ( p) a02 a12 an2 if p( x) a0 an x n • Mapping from polynomials of degree n: p → || f - p || is continuous. Existence of the Polynomial • As ht(p) tends to infinity, then || f – p || tends to infinity. • By compactness, minimum of || f – p || assumed in some closed ball { p : ht(p) ≤ M } • This minimum is the polynomial of best approximation. Alternating Sets • Let f be a continuous function on [a,b]. Let p(x) be a polynomial approximation to f on [a,b]. • An alternating set for f,p is a sequence of n points a x0 xn1 b such that f(xi) - p(xi) alternate sign for i=0,1,… , n-1 and and for each i, | f(xi)-p(xi) | = || f - p ||. An Example Linear Approximation to exp(x) 3 2.5 2 1.5 1 0.5 0 -1.5 -1 -0.5 f(x)=exp(x) 0 0.5 p1(x)=1.2643+.1752*x 1 1.5 Alternating Sets • Let f be a continuous function on [a,b]. Let p(x) be a polynomial of best approximation to f on [a,b]. • We claim that f,p has an alternating set of length 2. • This alternating set has the two points that maximize and minimize f(x) – p(x) • If they are not equal and of opposite sign, we could add a constant to p and make a better approximation. Variable Alternating Set Definition: A variable alternating set for f, p on [a,b] is like an alternating set x0, …, xn-1, in that f(xi) - p(xi) alternate in sign, except that the distances di = | f(xi) - p(xi) | need not be the same. Example: Variable Alternating Set A Variable Alternating Set 1 0.5 0 -1.5 -1 -0.5 0 0.5 1 -0.5 -1 p(x) f(x) Variable Alternating Set: -1.1, -0.4, 0.3, 1.2 1.5 Variable Alternating Set • If x0,…, xn-1 is a variable alternating set for f, p with distances d0, …, dn-1, and g is a continuous function close to f, then x0,…,xn-1 is a variable alternating set for g, p. • “Close” means that || f – g || < min di . • Proof is obvious. Variable Alternating Set A Variable Alternating Set 1 0.5 0 -1.5 -1 -0.5 0 0.5 1 -0.5 -1 p(x) f(x) g(x) Variable Alternating Set: -1.1, -0.4, 0.3, 1.2 1.5 Variable Alternating Set Theorem: (de la Vallee Poussin) • Let f be continuous on [a,b] and let q be a polynomial approximation of degree n to f. • Let d*n = || f – p*n ||, where p*n is a polynomial of best approximation. • If f,q has a variable alternating set of length n+2 with distances d0, …, dn+1, then d*n ≥ min di Variable Alternating Set Proof: • If not, f and q are close, so x0, … xn+1 is a variable alternating set for q, p*n • Thus q - p*n has at least n+2 changes in sign, hence at least n+1 zeroes, hence q = p*n, which is impossible. Variable Alternating Set Corollary: • Let p be a polynomial approximation to f of degree n. • If f,p has an alternating set of length n+2, then p is a polynomial of best approximation. Sectioned Alternating Sets A sectioned alternating set is an alternating set x0,...,xn-1 together with nontrivial closed intervals I0,...,In-1, called sections, with the following properties: • The intervals partition [a,b]. • For every i, xi is in Ii . • If xi is an upper point, then Ii contains no lower points. If xi is an lower point, then Ii contains no upper points. Sectioned Alternating Sets • An example on [-1,1]: f(x) = cos( πex), p(x)=0 An Example Upper and Lower Sections 1.5 1 0.5 0 -1.5 -1 -0.5 0 0.5 1 -0.5 -1 -1.5 Function: y = f(x) = cos( πex) on [-1,1] Alternating set: (0, ln 2) Sections: [-1,0.3], [0.3, 1] 1.5 Sectioned Alternating Sets Theorem: Any alternating set can be extended into a (possibly larger) alternating set with sections. Applet: Improving the Approximation • Suppose f, p has a sectioned alternating set of length ≤ n+1. • Then there is a polynomial q of degree n such that || f – (p+q) || < || f - p || • Applet: Proof of the Theorem • Let f be a continuous function on [a,b]. Let p(x) be a polynomial of best approximation to f on [a,b]. • If f, p has a alternating set of length n+2 or longer, then p is a polynomial of best approximation. • On the other hand, if p is a polynomial of best approximation, then it must have an alternating set of length 2. Proof of the Theorem • We can extend that alternating set to one of length n+2 or longer. Otherwise we can change p by a polynomial of degree n and get a better approximation. • Finally, if p, q are both polynomials of best approximation, then so is (p+q)/2. We can show that p-q has n+2 changes in sign, hence n+1 zeros, hence p=q. • We conclude that the polynomial of best approximation is unique, and the theorem is proved. Finding the Best Approximation • Cannot solve in complete generality • Use the Remez algorithm to find polynomials. • Applet: The Remez (Remes) Algorithm • Start with an approximation p to f on [a,b] and a variable alternating set x0, …, xn+1 of length n+2. • Start Loop: Solve the system of equations: c0 c1 xi1 c 2 xi2 c n xin (1) i E This is a linear system of n+2 equations (i=0, …, n+1) in n+2 unknowns (c0, …, cn, E). • Using the new polynomial p, find a new variable alternating set, by moving each point xi to a local max/min, and including the point with the largest error. Loop back. Hypertext for Mathematics • This proof with applets is part of a larger hypertext in mathematics. • Also published in the Journal of Online Mathematics and its Applications • Link to the Mathematics Hypertext Project Open Architecture, Math on the Web • • • • • • • Java applets JavaScript functionality MathML Scalable Vector Graphics (SVG) TEX family Mathematical fonts Unicode Sad State of Tools • Java applets cannot display mathematical text • No practical conversion to HTML • Deep incompatibilities between TEX and MathML • Poor or nonexistent capabilities for formula search and formula syntax-check • Wide variety of setups for the browser. Sad State of Tools • Tool development by practitioners will be crucial to make this architecture work.