https://www.embeddedrelated.com/showarticle/152.php
Chebyshev Approximation and How It Can Help You Save Money, Win Friends, and Influence People
CHEBYSHEV POLYNOMIALS
The key to using polynomials to evaluate functions, is not to think of polynomials of being composed of linear combinations of , etc., but as linear combinations of Chebyshev polynomials . As discussed in more detail in the Wikipedia page, these have the following special properties:
- they are minimax functions over the range , e.g. all their minima/maxima/extrema are at ± 1 (see diagram below)
- they are orthogonal over the range with weight
Figure: Chebyshev functions , courtesy of Wikipedia
Let's say we have a given function over the range . We can express where and , which is a transformation which maps the interval to . The problem then becomes a matter of figuring out the coefficients , which can be done using the Chebyshev nodes:
These are easier to understand graphically; they are merely the projections onto the x-axis of the midpoints of equal interval circular arcs of a semicircle:
You will note that the nodes are spaced equally near 0 and more compressed towards ± 1.
To approximate a function by a linear combination of the first N Chebyshev polynomials (k=0 to N-1), the coefficient is simply equal to times the average of the products evaluated at the N Chebyshev nodes, where for and for all other k.
Let's illustrate the process more clearly with an example.
Suppose over the range , with :
Let's use . The Chebyshev nodes for N=5 are . This corresponds to , and the function evaluated at those nodes are .
For we compute the average value of y = .
For we compute 2 × the average value of u × y =
For we compute 2 × the average value of
For we compute 2 × the average value of
For we compute 2 × the average value of
The conclusion here is that ; if you go and crunch through the algebra you will see that the result is the same as .
So what was the point here....? Well, if you already have the coefficients of a polynomial, there's no point in using Chebyshev polynomials. (If the input range is significantly different from , a linear transformation from x to u where will give you a polynomial in u that has better numerical stability, and Chebyshev polynomials are one way to do this transformation. More on this later) If you want to approximate the polynomial with a polynomial of lesser degree, Chebyshev polynomials will give you the best approximation.
For example let's use a quadratic function to approximate over the input range in question. All we need to do is truncate the Chebyshev coefficients: let's compute
Voila! We have a quadratic function that is close to the original cubic function, and the magnitude of the error is just the coefficient of the Chebyshev polynomial we removed = .
You will note that these two polynomials ( and ), expressed in their normal power series form, have no obvious relation to each other, whereas the Chebyshev coefficients are the same except in coefficient which we set to zero to get a quadratic function.
In my view, this is the primary utility of expressing a function in terms of its Chebyshev coefficients: The coefficient tells you the function's average value over the input range; tells you the function's "linearness", tells you the function's "quadraticness", tells you the function's "cubicness", etc.
Here's a more typical and less trivial example. Suppose we wish to approximate over the range .
A decomposition into Chebyshev coefficients up to degree 6 yields the following:
You will note that each coefficient is only a fraction of the magnitude of the previous coefficient. This is an indicator that the function in question (over the specified input range) lends itself well to polynomial approximation. If the Chebyshev coefficients don't decrease significantly by the 5th coefficient, I would classify that function as "nonpolynomial" over the range of interest.
The maximum error for the 6th-degree Chebyshev approximation for over is only about 2.2×10-6, which is approximately the value of the next Chebyshev coefficient.
If we truncate the series to a 4th-degree Chebyshev approximation, we get a maximum error that is about equal to :
No hay comentarios:
Publicar un comentario