A fast error evaluation algorithm for polynomial approximation

4
Volume Number 1 INFORMATION PROCESSING LETTERS February 1977 A FAST ERROR EVALUATION ALGORITHM FOR POLYNOMIAL APPROXIMATION * Francis CHIN Department of Computing Science, University of Alberta, Edmonton, Alberta, Canada T6G 2Hl Kenneth STEIGLITZ Department of Electrical Engineering and Computer Science, Princeton University, Princeton, NJ 08S40, U.S.A. Received 12 August 1976 . Arithmetic complexity, polynomial approximation, error evaluation, asymptotic algorithm. 1. Introduction Given a set of points S = {xc, x1, .. . . -- XN_~ ), the inner product of two functions g(x) and h(x) is denoted by (g, h) = E&j’ g(Xi) h(-Xi) where h(x) is the complex conjugate of h(x). Ifg and h are two real functions, (g, h) = ZE&’ g(Xi) h(.q:i), We sky g(x) is orthogonal to h(x) iff (g, h) = 0. A system of polynomials (pi) is said to be urthogunal if (pi.. pi>= 0 for all i # j and orthonormal if the system has the extra property that (pi, J+) = I for all i. it is well knowi~ [ 1] that a system of real orthogonal polynomials on a set of real points can be generated re- cursively by the /three-term recurrence formula PO(X) = 1 9 PlW = XPCI (-4 - ((x PoY~po,po)) p(-J(x) , Pj+ 1 (x) = xPj(x) - aj+ Ipi - PjPj- 1 (X) where cyi+ 1 = (XPje PjY(Pj9 Pj) 9 pi = (XPj,Pj-1)l(Pj-l,Pj-l) forj= I 2 , , ....N- 1. Letting q/(x) =pj(x)/kj where kj = (<pi,@) ‘I2 be a system of orthonormal polynomials, we can easily derive by induction the famous Christoffel-Darboux ide;tity [l] lb qj(X) qj(Y) = 9 4n+lW h(Y) - 4lfw 4ndY) j=O for x +y . n X-Y (0 The problem of finding the best n-degree (n < N) polynomial p(x) to fit a given function f’(x) is called YO!Y * This work was supported by NSF Grant GK-42048 and U.S. Army Rcscarch Office-Durham under Contract DAHCOQ-69-- COO1 2. 18

Transcript of A fast error evaluation algorithm for polynomial approximation

Page 1: A fast error evaluation algorithm for polynomial approximation

Volume Number 1 INFORMATION PROCESSING LETTERS February 1977

A FAST ERROR EVALUATION ALGORITHM FOR POLYNOMIAL APPROXIMATION *

Francis CHIN Department of Computing Science, University of Alberta, Edmonton, Alberta, Canada T6G 2Hl

Kenneth STEIGLITZ Department of Electrical Engineering and Computer Science, Princeton University, Princeton, NJ 08S40, U.S.A.

Received 12 August 1976 .

Arithmetic complexity, polynomial approximation, error evaluation, asymptotic algorithm.

1. Introduction

Given a set of points S = {xc, x1, . . . . -- XN_~ ), the inner product of two functions g(x) and h(x) is denoted by (g, h) = E&j’ g(Xi) h(-Xi) where h(x) is the complex conjugate of h(x). Ifg and h are two real functions, (g, h) = ZE&’ g(Xi) h(.q:i), We sky g(x) is orthogonal to h(x) iff (g, h) = 0. A system of polynomials (pi) is said to be urthogunal if (pi.. pi> = 0 for all i # j and orthonormal if the system has the extra property that (pi, J+) = I for all i. it is well knowi~ [ 1] that a system of real orthogonal polynomials on a set of real points can be generated re- cursively by the /three-term recurrence formula

PO(X) = 1 9

PlW = XPCI (-4 - ((x PoY~po,po)) p(-J(x) ,

Pj+ 1 (x) = xPj(x) - aj+ Ipi - PjPj- 1 (X)

where

cyi+ 1 = (XPje PjY(Pj9 Pj) 9

pi = (XPj,Pj-1)l(Pj-l,Pj-l)

forj= I 2 , , . . ..N- 1. Letting q/(x) =pj(x)/kj where kj = (<pi,@) ‘I2 be a system of orthonormal polynomials, we can easily derive by induction the famous Christoffel-Darboux ide;tity [l]

lb qj(X) qj(Y) = 9 4n+lW h(Y) - 4lfw 4ndY) j=O

for x +y .

n X-Y (0

The problem of finding the best n-degree (n < N) polynomial p(x) to fit a given function f’(x) is called YO!Y

* This work was supported by NSF Grant GK-42048 and U.S. Army Rcscarch Office-Durham under Contract DAHCOQ-69-- COO1 2.

18

Page 2: A fast error evaluation algorithm for polynomial approximation

Volunre 5, Number 1 INFORMATION PROCESSING LETTERS kbruary 1977

nonziaI Approximation. In this paper, we asstime that the approximation is taken in the least square sen;r, i.e. the

error of the approximation, E, is measuved by $!~’ v(-, 9 P(x,))~. Ii has been proved that P(X) can be written as a linear combination of the first (n + 1) orthono;;: I* pi I:‘.‘no~~ri jls, Zf,c C_qi(Xl where Ci = CA q$ and the error

of approximation E’ is given b:r

112 (Jfi-,$c Iql’) . (2)

Now let us consider the following problem: assume that we are given a system of orthonormal polynomials in the form of a matrix (qj(Xi)) for 0 < i G N - 1 and 0 <j G N - 1. What is the error of approximation E when f(x)

is approximated by an n-degree polynomial? Solution: From (2), the error.of approximation can be written a~

E= 5’ If( - 5 ,c,12)“2 , j-0 j=O

(3)

where N-l

Cj = (L qj) = C f (Xi) Qi(Xi) l (4 i=O

The first summation in (3) can be done in 0 (N) times. The evaluation of each Cj also takes 0 (N) times, and so the error E will tske 0 (PIN) time by the above approach.

Since f(x) can be interpolated exactly at N points by an (N - I)-degree polynomial, it can be shown readily N-1 that <A f) = X$&l IC’j12. Thus E can be rewritten as Zj=n+l lC$‘. So, if n > N/2, the time in evaluating E can bc

reduced by using this new formula. However, if n - 2 ‘N, the error still takes 0 (N2) time. In the next secti:?n, we

shall introduce an asymptotically faster preconditioned algorithm for the computation of-E which i!aktts

0 (Iv 1ogN) time when the sample points are equally spaced.

2. The algorithm

The botzneck of the above algorithm is the evaluation of the term Ci”_olCj12. By substituting Ci by (4), 1% i have

=E (“C* k(x,,,,ik qj(xil qj(xn,)]) + i_o [ xi i=o m=O j=O I

5 f( )f( ) 2 4j(Xi)4j(Xi))] * Xi (j_o

m+i

From (1 ), we have

Let [xi) be a set of equally spaced points, i.e. Xi = x0 + i6. Then by defining

f t(xi) _ f bi) qr?(Xi) 0 <iiN- 1

-0 N<ii2N- 1’

f’txi) -Axi) rln+l(Xi) 0 GifN- 1

-0 NGi<2N- 1’

19

Page 3: A fast error evaluation algorithm for polynomial approximation

Volume 6, Number 1 INFORMATION PROCESSING LETTERS February 1977

dxr, = 1 ii& 0

if0 and -N+ 1 <i<N- 1 !, i=O

&I) 0 <iiN- 1

g’(xr) = 0 i=N ,

hi-2N) N<i<2hf- 1

we cat) write n N-l

By the famous Parseval’s Theorem which states JV--1 N--l

c Zfbi = c &B/ i=O i=o

where A and B are the Discrete Fourier Transforms (DFT) of functions a and b respectively, and the Convolution Theorem, we have

where F’, F” and G’ are the Discrete Fourier Transforms off’,f” and g’ respectively. The above form (5) allows us to aveluate the error of approximation in 0 (N logLvj time, assuming E$el~~(Xi)12 for i = 0, 1, . . . . N - 1 are precomputed. The’algorithm for computing E is implicit in the above derivation and has the following steps

Step 1. The computation of < fi f> takes 0 (N) time. Step 2. The definition off’, f” andg’ takes 0 (IV) time. Step 3. The DFT off’, f’ and g’, i.e. F’, F” and G’ respectively, can be done by the FFT in 0 (N log N) time. Step 4. The calculation of

N-l n

C If( C lqj(Xi)12 i=O j=O

takes 0 (N) time. Note: The requirement that Z~e~~j(Xi)12’ i = 0, 1 , . .._ N - 1 are precomputed introduces no special re- striction to the algorithm since they can be calculated &t the same time as the set of orthogonal poly- nomials.

Step 5. Zfz~wn (Ff F,! - F; F;‘) Gi takes 0 (N) time. Step 6. The evaluation oi ZZq ,=olCj~2 by (5) takes constant time. Step 7. The cor’lputation of E by (2) also takes constant time.

Thus we can conclude that the problem of error evaluation for polynomial approximation can be done in 0 (N log N) time with p:ecomputation.

Page 4: A fast error evaluation algorithm for polynomial approximation

Volume 6, Number 1 INFORMATION PROCESSING LETTERS February 1977

3. Discussion

This 0 (N log PJ) error evaluation algorithm does not only work for the case wherl tile sample points are equally spaced on a real interval. It can also be applied to a set of points which are equally spaced on a unit circle [2]. This is useful in dealing with periodic or quasi-periodic functions. When we are dealing with points on a unit circle, the system of orthogonal polynomials can be generated by a two-term recurrence formula

Po(4 = 1 9

Pi+1 (a = w(z) + wT(d wlx re c~i = (zpi, I)l(pj, pi) 9

where p?(z) = &&z-~), the reciprocal polynomial. The identity which corresponds in some respects to the Christoffel-Darboux formula is given as

& *&) =4n*+I (aM+&) - ~n+lmn+lw

j=O i 1 -z?

for a # z. A similar 0 (N log N) error evaluation algorithm can work out when the points are equal spaced on the unit circle.

Newbery [3] and Hunter (41 have described analogous three-term recurrence formulas for generating ortho- gonal trigonometric polynomials (sine and/or cosine). But the same approach cannot be applied to the evaluation c;f the error of approximation for this system of polynomials. It is still an open problem whether the error of approxi- mation by the trigonmetric polynomials can be found in less than 0 (N2) time with precomputation.

References

[l] G. Szego, Orthogonal polynomials, Amer. Math. Sot. Colloquium Publications 23, New York City, rev. ed. (1959). . (21 F. Chin, K. Steiglitz, Discrete Szego polynomials and an 0 (fV log N) algorithm for error evaluation, Proceedings of the twelfth

annual Allerton conference on circuit and system theory (October 1974) 120-129. (31 A.C.R. Newbery, Trigonometric interpolation and curve-fitting, Math. Comput. 24 (1970) 869-876. [4] D.B. Hunter, Algorithm 320: Harmonic analysis for symmetrically distributed data, CACM 11 (1968) 114-l 15.

21