1. GaussJacobi quadrature and Legendre polynomials. p(t)w(t)dt, p {p(x 0 ),...p(x n )} p(t)w(t)dt = w k p(x k ),


 Marion Gregory
 5 months ago
 Views:
Transcription
1 1. GussJcobi qudrture nd Legendre polynomils Simpson s rule for evluting n integrl f(t)dt gives the correct nswer with error of bout O(n 4 ) (with constnt tht depends on f, in prticulr, it depends on the size of the fourth derivtive of f). However, we cn do much better thn Simpson s rule for evluting integrls. Suppose w is defined nd integrble on [,b] nd we wnt to evlute p(t)w(t)dt, for p P n (the polynomils of degree n). Think of w 1 or w(t) (t ) α s the min exmples. If we re given ny n+1 distinct points {x k } n 0 [,b] then p is determined by its vlues t these points, i.e., the mp p {p(x 0 ),...p(x n )} is n invertible mp P n R n. Thus there must be rel numbers w k so tht (1) p(t)w(t)dt w k p(x k ), holds for ll p P n. Wht re these weights more explicitly? Given the point set {x k } n 0 define the Lgrnge polynomils L k (x) 0 j n,j k x x j x k x j. This is equl to 1 t x k nd equl to 0 t the other x j s. We must hve p(x) p(x k )L k (x), for ny p P n, since both sides re degree n polynomils tht gree t n+1 points. Thus p(x)w(x)dx p(x k )L k (x)w(x)dx Thus (1) holds with w k L k(x)w(x)dx. We cn simplify this further by noting tht if p n (x) (x x 1 ) (x x n ) 1 p(x k )[ n (x x k ), k1 L k (x)w(x)dx].
2 2 then L k (x) 0 j n,j k x x j x k x j p n (x) (x x k )p n(x k ), since both sides re degree n polynomils tht re 1 t x k nd 0 t x j, j k (this derivtion uses l Hopitl s rule). Thus (2) w k p n (x) (x x k )p n(x k ) w(x)dx. When w(t) 1 is the constnt function, then these weights re integrls of polynomils nd cn be computed exctly. The discussion so fr ssumes tht we re given the points {x k }. If we re llowed to choose these points, then we hve n+1 dditionl degrees of freedom, so we might hope to correctly evlute integrls for even higher degree polynomils. In fct, we cn choose n+1 points {x k } n 0 so tht (1) holds for ll polynomils of degree 2n+1. The secret is to choose polynomil p of degree n+1 which is orthogonl to every polynomil q of lesser degree, i.e., so tht p,q w p(t)q(t)w(t)dt 0, for ll q P n. Now let {x k } be the zeros of p nd let {w k } be the weights which mke (1) true for polynomils of degree n. If f is polynomil of degree 2n+1, then long division of polynomils shows tht we cn write f +bp where,b re polynomils of degree n. Thus f(t)w(t)dt k (t)w(t)dt + w k (x k )+0 b(t)p(t)w(t)dt k w k f(x k ), where the lst line holds since f on the zeros of p. To see tht it is not possible to increse the degree of f to 2n+2, consider the function n (t x k) 2. It vnishes t the points {x k } so k w kf(x k ) 0, but f(t)w(t)dt > 0, t lest if w > 0 since f > 0 except t n+1 points.
3 1. GAUSSJACOBI QUADRATURE AND LEGENDRE POLYNOMIALS 3 Lemm 1. Given sequence of orthonorml polynomils {p k } n k1 w k k n k n 1 p n 1,p n 1 p n 1 (x k )p n(x k ), we hve where {x k } n 1 re the zeros of p n nd k n is the leding coefficient of p n (i.e., the coefficient of x n in p n ). To prove this we need two preliminry results. The first is: Lemm 2. Let K n (x,y) p k (x)p k (y). Suppose K(x,y) is polynomil of degree n in both x nd y. Then p(x),k(x,y) w(x) p(y), holds for every polynomil p of degree n iff K K n. Proof. If p is polynomil of degree n then it hs n expnsion in terms of the bsis p(x) m p m (x), so p(x),k n (x) w m p m (x), p k (x)p k (y) w m,k m p k (y) p m (x),p k (x) w k k p k (y) p(y), so the equlity holds when K K n. Conversely, some equlity holds for K nd ll p. Fix w nd choose p(x) K n (x,w). Then K n (x,w),k(x,y) w K n (y,w). But by our erlier clcultion k n hs the reproducing property so K(x,w),K n (x,y) w K(y,w). Since the two left hnd sides equl the sme integrl, we deduce K(y,w) K n (y,w) for ny y,w, which proves the lemm. The second preliminry result we need is:
4 4 Theorem 3 (ChristoffelDrboux). With nottion s bove, K n (x,y) k n p n+1 (x)p n (y) p n (x)p n+1 (y) k n+1 x y Proof. Let K(x,y) denote the right hnd side bove. The numertor is polynomil in x of degree n + 1 nd vnishes when x y, so K(x,y) is ctully polynomil in x of degree n. Similrly for y. Thus to show K K n we only hve to show it hs the reproducing property of the previous lemm. A bit of expnding nd using p n,p n+1 w 0 shows p(x)m,k(x,y) w k n (p n+1 (x)p n (y) p n (x)p n+1 (y)), p(x) p(y) k n+1 x y + k n p(y) p n+1 (x), p n(y) p n (x) w k n+1 x y + k n p(y) p n (x), p n+1(x) p n+1 (y) w k n+1 x y Note tht (p(x) p(y))/(x y) hs degree n 1 s polynomil in x nd hence is orthogonl to p n. Thus the first inner product is 0. Similrly for the second inner product. To compute the third inner product, write w k n p(y) p n+1(x) p n+1 (y) k n+1 x y k n [ yn+1 x n ] y x k n x n +... p n (x)+q(x,y), where q is polynomil of degree n 1 nd hence orthogonl to p n. Thus the third inner product equls p n,p n w k n+1 /k n, nd hence p(x)m,k(x,y) w p(y). By the previous lemm this implies K K n, s desired. Lemm 1. We lredy know from (2) tht w k 1 p n (x) w(x)dx p n(x k ) x x k
5 1. GAUSSJACOBI QUADRATURE AND LEGENDRE POLYNOMIALS 5 Since p n (x k ) 0, p n (x) x x k w(x)dx 1 pn (x)p n 1 (x k ) w(x)dx p n 1 (x k ) x x k 1 pn (x)p n 1 (x k ) p n 1 (x)p n (x k ) w(x)dx p n 1 (x k ) x x k 1 k n K n (x,x k )w(x)dx p n 1 (x k ) k n 1 k n k n 1 p n 1 (x k ). For more generl functions, the difference between our discrete estimte nd the ctul integrl cn be bounded s follows: E n (f) f(t)w(t)dt k w k f(x k ) f(2n) (ζ), (2n)!kn 2 where ζ is some point in (,b) nd k n is the coefficient of the power t n in p(t). For SchwrzChristoffel integrls, the most relevnt cse is when w is Jcobi weight w(t) (1 x) α (1+x) β, when this estimte is known to be (see []), E n (f) f (2n) (ζ) 22n+α+β+1 Γ(n+α+1)Γ(n+β +1)Γ(n+α+β +1)n!. Γ(2n+α+β +1)Γ(2n+α+β +2)(2n)! If α β 0 then w 1 nd p is Legendre polynomil. Then the error bound simplifies to E n (f) f (2n) 2 2n+1 (n!) 4 (ζ) (2n+1)((2n)!) 3. Consider simple cse like f(t) e t. Then ll the derivtives of f re bounded on [ 1, 1] nd using Stirling s formul we see tht n! n n e n 2πn, E n (e t ) O(n 2n ). On the other hnd, the nth order Tylor series for e t only pproximtes it to within 1/n! n n on [ 1,1]. Thus the numericl integrtion using n points should give bout twice s mny correct digits s termbyterm integrtion of the nth order power
6 6 series. Ofcourse, wecnjustdoublethenumberoftermsinthepowerseriestoobtin the sme ccurcy. Even for firly smll n, both error estimtes will be less thn mchine precision. So very efficient numericl integrtion is possible if we cn (1) find p n+1 P n+1 so tht p n+1 P n nd p n+1 w p n+1,p n+1 w 1, (2) find the zeros {x k } of p n+1 (3) find the weights {w k }. The first step is the min difficulty. Once we hve the polynomil p, we cn use Newton s method to find the roots of p n+1 nd the weights re given by w k k n+1 k n 1 p n+1 (x k )p n(x k ). Suppose {p k } n 0 re orthonorml polynomils of degree k nd the coefficient of x k in p k is c k. We cn find polynomil (orthogonl to P n, but not necessrily of unit norm) p n+1 by tking ny (n+1)st degree polynomil p nd subtrcting lwys its orthogonl projection onto ech of the 1dimensionl subspces corresponding to these vectors, i.e., p n+1 (x) p(x) p k (x) p,p k w. Since we get to choose p, we tke p xp n, so tht p n+1 (x) xp n (x) p k (x) xp n,p k w n 2 xp n (x) p n (x) xp n,p n w p n 1 (x) xp n,p n 1 w p k (x) p n,xp k w xp n (x) p n (x) xp n,p n w p n 1 (x) xp n,p n 1 w p n (x)(x xp n,p n w ) p n 1 (x) xp n,p n 1 w p n (x)(x n ) p n 1 (x)b n We hve used the fcts tht xf,g w f,xg w nd tht p n is perpendiculr to xp k if k < n 1. The polynomil constructed is not necessrily of unit norm, but we cn fix this by replcing p n+1 by p n+1 p n+1 w.
7 1. GAUSSJACOBI QUADRATURE AND LEGENDRE POLYNOMIALS 7 To implement the method we hve to be ble to compute the recursion coefficients n xp n,p n w b n xp n,p n 1 w c n p n+1 w p n (x n ) p n 1 b n w. Recll tht ech of these inner products is n integrl of the form f(t)w(t)dt. We lredy know p n (by induction) so we could find its roots nd use these to exctly evlute such integrls for polynomils of degree 2n 1. However, the inner products bove involve polynomils of degree up to 2n+1, nd using the roots of p n will definitely give wrong nswer for tp2 n(t)w(t)dt. Therefore these coefficients should be computed by other mens. Here we will only consider the cse of Jcobi weights with singulrity t one endpoint (or possibly neither endpoint), i.e., weights of the form w(x) (x ) α on the intervl [,b]. The most importnt cse is when α 0 nd w(x) 1 is constnt. We cn compute n integrl of the form ( k x k )(x ) α dx, using the following observtion. A polynomil p(x) n kx k hs Tylor expnsion round ny point, including the point. This Tylor expnsion, must lso be polynomil of degree n. Thus we cn write b k (x ) k p(x) Then ( k x k )(x ) α dx k x k. b k (x ) k (x ) α b k (x ) k+α dx b k (b ) k+α+1 k +α+1.
8 8 So now we hve to compute the {b k } from the { k }. Note tht k ( ) k k x k k (x +) k k [ (x ) j k j ], j so we get b (b 0,...,b n ) we just hve to pply the mtrix ( ) k M (m jk ) k j, j to the vector ( 0,..., n ). In the specil cse α 0, w(t) 1, the GussJcobi polynomils specilize to the Legendre polynomils. These re generted by the recursion j0 (3) p 0 1, p n+1 ((2n+1)xp n np n 1 )/(n+1). Here re the first ten Legendre polynomils for the intervl [,b] [ 1,1], generted by this recursion: P 1 (x) x, P 2 (x) P 3 (x) 3x 2 ( 1 )+ 3x x3 2 P 4 (x) x2 4 P 5 (x) 15x + 35x x3 + 63x5 ( P 6 (x) )+ 105x2 P 7 (x) 35x + 315x3 315x4 693x x x7 P 8 (x) x x4 3003x x P 9 (x) 315x x x5 6435x x )+ 3465x2 P 10 (x) ( x x x x10 256
9 1. GAUSSJACOBI QUADRATURE AND LEGENDRE POLYNOMIALS Tble 1. Approximting π cos(π t)dt using the roots of the nth 2 Legendre polynomil.
10 Tble 2. Approximting log(3) 1 1 dt using the roots of the nth 1 2+t Legendre polynomil. Mthemtic gives the first 50 digits of log 3 s
11 1. GAUSSJACOBI QUADRATURE AND LEGENDRE POLYNOMIALS Figure 1. Some exmple of Legendre polynomils. The roots of P n re the optiml n points to smple to compute n integrl of the form 1 f(t)dt in the sense tht they will give the correct nswer if f if 1 polynomil of degree t most 2n+1. Shown re n 10,20.