1、PADE APPROXIMATION BY RATIONAL FUNCTION 129 We can apply this formula to get the polynomial approximation directly for a given function f (x), without having to resort to the Lagrange or Newton polynomial. Given a function, the degree of the approximate polynomial, and the left/right boundary points
2、 of the interval, the above MATLAB routine cheby() uses this formula to make the Chebyshev polynomial approximation. The following example illustrates that this formula gives the same approximate polynomial function as could be obtained by applying the Newton polynomial with the Chebyshev nodes. Exa
3、mple 3.1. Approximation by Chebyshev Polynomial. Consider the problem of finding the second-degree (N = 2) polynomial to approximate the function 2( ) 1 /(1 8 )f x x. We make the following program do_cheby.m, which uses the MATLAB routine cheby() for this job and uses Lagrange/Newton polynomial with
4、 the Chebyshev nodes to do the same job. Readers can run this program to check if the results are the same. 3.4 PADE APPROXIMATION BY RATIONAL FUNCTION Pade approximation tries to approximate a function f (x) around a point xo by a rational function 00, 00 0 2 00 1 20 0 2 012()()()( ) ( ) ( )1 ( ) (
5、 ) ( )MMNNMMNNQ x xp x xD x xq q x x q x x q x xd x x d x x x x d (3.4.1) where 0 0 ( 2 ) 0 ( ) 0( ) , ( ) , ( ) , , ( )MNf x f x f x f x are known. How do we find such a rational function? We write the Taylor series expansion of f (x) up to degree M + N at x = xo as 130 INTERPOLATION AND CURVE FITT
6、ING ( 2 ) 0 ( ) 00 0 0 0 0 2 00 0 2 00 1 2( ) ( )( ) ( ) ( ) ( ) ( ) ( ) ( )2 ( ) !( ) ( ) ( ) ( 3 . 4 . 2 )MNMNMNMNMNf x f xf x T x x f x f x x x x x x xMNa a x x a x x a x x Assuming 0x 0for simplicity, we get the coefficients of ( ) ( )NMD x a n d Q x such that ()( ) 0()MMNNQxTx Dx 0 1 1 0 11( )
7、( 1 ) ( ) 01M N N NM N N NNNa a x a x d x d x q q x q xd x d x 0 1 1 0 1( ) ( 1 ) ( )M N N NM N N Na a x a x d x d x q q x q x (3.4.3) by solving the following equations: 001 0 1 12 1 1 0 2 21 1 2 21 1 1 2 12 1 1 2 212000M M M M N N MM M M M N NM M M M N NM N M N M N M Naqa a d qa a d a d qa a d a d
8、 a d qa a d a d a da a d a d a da a d a d a d ( 3.4.4a)( 3.4.4b) Here, we must first solve Eq. (3.4.4b) for Nddd , 21 and then substitute dis into Eq. (3.4.4a) to obtain Mqqq , 10 The MATLAB routine padeap() implements this scheme to find the coefficient vectors of the numerator/denominator polynomi
9、al )(/)( xDxQ NM of the Pade approximation for a given function f (x). Note the following things: The derivatives ( 2 ) ( )0 0 0( ) , ( ) , , ( )MNf x f x f x up to order (M + N) are computed numerically by using the routine difapx(), that will be introduced in Section 5.3. In order to compute the v
10、alues of the Pade approximate function, we substitute 0xx for x in , ()MNpx which has been obtained with the assumption that 0x 0. PADE APPROXIMATION BY RATIONAL FUNCTION 131 Example 3.2. Pade Approximation for ()xf x e . Lets find the Pade approximation 3 , 2 3 2( ) ( ) / ( )p x Q x D x for ()xf x e around 0x 0. We make the MATLAB program do_pade.m, which uses the routine padeap() for this job and uses it again with no output argument to see the graphic results as