View
240
Download
4
Tags:
Embed Size (px)
Citation preview
An Applet-Based Presentation of the Chebyshev Equioscillation Theorem
Robert MayansFairleigh 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)
0
0.5
1
1.5
2
2.5
3
-1.5 -1 -0.5 0 0.5 1 1.5
f(x)=exp(x) p1(x)=1.2643+.1752*x
An Example
Error plot, exp(x) - p1(x)
-0.4
-0.3
-0.2
-0.1
0
0.1
0.2
0.3
0.4
-1.5 -1 -0.5 0 0.5 1 1.5
E(x)=f(x)-p1(x)
E(-1) = 0.2788
E(0.1614) = -0.2788
E(1) = 0.2788
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)
0
0.2
0.4
0.6
0.8
1
1.2
1.4
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
f(x) = sin^2(x) p2(x) = 0.4053x^2+0.1528
Another ExampleError with 5-point alternating set
-0.2
-0.15
-0.1
-0.05
0
0.05
0.1
0.15
0.2
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
E(x) = f(x)-p2(x)
Alternating set: -π/2, -1.0566, 0, 1.0566, π/2
|| f – p2 || = 0.1528
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:
• The Bernstein polynomials Bn(f,x) converge uniformly to f.
knkn
kn xx
k
nnkfxfB
1/),(
0
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
• Mapping from polynomials of degree n:
p → || f - p ||
is continuous.
nnn xaaxpaaapht 0
221
20 )( if )(
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
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 ||.
bxxa n 10
An Example
Linear Approximation to exp(x)
0
0.5
1
1.5
2
2.5
3
-1.5 -1 -0.5 0 0.5 1 1.5
f(x)=exp(x) p1(x)=1.2643+.1752*x
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
0.5
1
-1.5 -1 -0.5 0 0.5 1 1.5
p(x) f(x)
Variable Alternating Set: -1.1, -0.4, 0.3, 1.2
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 SetA Variable Alternating Set
-1
-0.5
0
0.5
1
-1.5 -1 -0.5 0 0.5 1 1.5
p(x) f(x) g(x)
Variable Alternating Set: -1.1, -0.4, 0.3, 1.2
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, calledsections, 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
0.5
1
1.5
-1.5 -1 -0.5 0 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]
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:
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.
Excxcxcc ininii )1(2
21
10
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.