1

Applications of Orthogonal Polynomials Maitree Podisuk Witchaya Rattanametawee and Decha Samana Department of Mathematics and Computer Science King Mongkut’s Institute of Technology Chaokhuntaharn Ladkrabang Ladkrabang Bangkok 10520 THAILAND

Abstract: Orthogonal polynomials appear frequently in applied mathematics. In this paper, we will introduce two sequences of orthogonal polynomials on the interval [0,1]. The orthogonal polynomials of each type up to degree seven will be illustrated. We will use these fourteen orthogonal polynomials to obtain fourteen Gaussian quadrature formulas and fourteen formulas of Runge-Kutta type for solving the initial value problem of ordinary differential equation. Some examples will be given.

Key-Words: Orthogonal-Polynomial Quadrature Runge-Kutta Initial-value-problem

1. Introduction The two sequences of orthogonal The orthogonal polynomial of polynomials are as follows. degree n on the interval [a,b] with respect First Sequence w(x) 1 to the weight function is in the form Let w(x)  a  0 and b 1. p (x)  a  a x  a x 2  ...  a x n 1 x n 0 1 2 n The seven orthogonal polynomials are with the property that b as follow; w(x)q (x)p (x)dx  0 p1 (x)  x  0.4426950409  m n a 2 p 2 (x)  x  0.9542080584x  0.1437706959 for all polynomials q m (x) of degree m  n 1.  (x  0.1875223329)(x  0.7666857255) 3 2 The sequence of polynomials p3 (x)  x 1.45586023x  0.55586023x

p0 (x),p1 (x),p2 (x),...,pn (x),... is said to  0.0426433717  (x  0.1201075693) be the sequence of orthogonal polynomials (x  0.47555636)(x  0.8781963001) on the interval [a,b] with respect to the 4 3 2 p 4 (x)  x 1.9564125459x 1.220333104x weight function w(x) if all polynomials in  0.259561813x  0.0121063415 the sequence are orthogonal polynomials  (x  0.0639745619)(x  0.3125345809) [a,b] on the interval with respect to the (x  0.6538160142)(x  0.9260873889) weight function w(x) . Two classical p (x)  x 5  2.4566590551x 4  21355403359x 3 sequences of orthogonal polynomials on 5 the interval [1,1] are the Legendre  0.7776092666x 2  0.106664494x  0.0033490978 orthogonal polynomials with the weight  (x  0.0437685388)(x  0.2189388636) function w(x) 1 and the Tschebyshev (x  484477712)(x  0.7588883922) orthogonal polynomials with two types of (x  9505855484) 1 6 5 4 w(x)  p6 (x)  x  2.9566155936x  3.3006299909x weight functions 2 and 1 x 1.7217722270x 3  0.4183919162x 2 2 w(x)  1 x .  0.04028976641x  0.0009100924  (x  0.0317937746)(x  0.1612506469) 2. Formulation (x  0.3678556979)(x  0.6072541695) 2

(x  0.8237650184)(x  0.9646962864)  (x  0.0268513306)(x  0.13525091) 7 6 p7 (x)  x  3.4505175086x (x  0.3073502987)(x  0.5112719338)  4.6977099607x 5  3.1967034225x 4 (x  0.7116468084)(x  0.8752079132)

3 2 (x 0.9755014545). 1.1338163328x  0.1977908682x   0.0140682856x  0.0002378395 3. Applications  (x  0.0239181439)(x  0.1225788814) 3.1 Gaussian Quadrature (x  0.285455718)(x  0.4869781073) The n-point Gaussian quadrature (x  0.6926762671)(x  0.8654888719) formula for finding the definite integral (x  0.9734215189). on the interval [a,b] is of the form Second Sequence b n w(x)f (x)dx  A f (x ) Let w(x)  1 x a  0 and b 1. The   k k a k1 seven orthogonal polynomials are as where the points x 's are the roots of follow; k the orthogonal polynomial, pn (x) , of q1 (x)  x  5/ 9 2 degree n on the interval [a,b] with q 2 (x)  x 1.0461538462x  0.1923076923 respect to the weight function w(x)  (x  0.2379422616)(x  0.8082115846) and A 's can be obtained from the q (x)  x 3 1.5442176871x 2 k 3 following formulas  0.6462585034x  0.0585034014 b 1 w(x)p (x)  (x  0.1246629457)(x  0.5240590673) A  n dx . k p (x )  x  x (x  0.8954956741) n k a k The above formula has no error when q (x)  x 4  2.0436137058x 3 1.3530633416x 2 4 f (x) is polynomial of degree m  2n 1.  0.31390001394x  0.0168372644  (x  0.0755251964)(x  0.3479782555) We will use the orthogonal polynomials in section 2 to find the (x  0.6854382012)(x  0.9346720527) Gaussian qudrature formulas. q (x)  x 5  2.5433478572x 4 1 5 For w(x)  , a  0 and b 1,  2.310808495x 3  0.89198572618x 2 1 x we have;  0.1326545105x  0.0046981132 n A  (x  0.0503722277)(x  0.2431410918) n 1 0.6931471806 (x  0.5153615917)(x  0.7790588782) (x  0.9554141644) 2 0.3877545308 6 5 q 6 (x)  x  3.0432049788x 0.3053926497  3.5189761239x 4 1.9180200925x 3 2 3 0.2319457241  0.49308357123x  0.0511858546545x 0.3026426227  0.0012852315 0.1585588337  (x  0.0359032117)(x  0.1779330612) (x  0.3936011651)(x  0.6310140364) 4 0.1518192973 (x  0.8370816759)(x  0.9676718227) 0.2428050790 7 6 0.2027497073 q 7 (x)  x  3.5430806493x  0.0957730970 4.9772551647x 5  3.516979401x 4 1.3064011368x 3  0.24152023596x 2 5 0.1063770448 0.1899308127  0.01852185  0.0003467331 0.1923481582 3

0.1406443733 0.2533903427 0.0638467916 0.3144010405 0.3202306328 6 0.0783982853 0.2541998448 0.1497747410 0.1232237026 0.1694242950 3.2 Runge-Kutta Formulas 0.1477770260 We use the zeros of the above 0.1022402124 orthogonal polynomials to be the points

0.0455326209  k 's of the formula of the Runge-Kutta method. We obtain 14 formulas and use 7 0.0595720288 them to find the numerical solution of the 0.1194339275 initial value problem of ordinary 0.1457598224 differential equations. The fourteen 0.1411057007 formulas are as follow; 0.1153590887 y  y  hA f (x  h , y  h ) 0.0776782011 m1 m 1 m 1 m 1 A  1.0 and  is the root of p (x) . 0.0342384114 1 1 1 For w(x)  1 x , a  0 and b 1, y m1  y m  h(A1K1  A 2 K 2 ) A  0.4604671700 A  0.5395328300 we have; 1 2 n A n K1  f (x m  1h, y m  1hf (x m , y m ))

1 1.5 K 2  f (x m   2 h, y m   2hK1 )

 k 's are roots of p 2 (x) . 2 0.6645702798 y m1  y m  h(A1K1  A 2 K 2  A3K 3 ) 0.8354297202 A1  0.2556291382 A 2  0.4465662470

3 0.3388144440 A3  0.2978046148 0.6696725928 K1  f (x m  1h, y m  1hf (x m , y m )) 0.4915129632 K 2  f (x m   2 h, y m   2hK1 ) K  f (x   h, y   hK ) 4 0.2015128287 3 m 3 m 3 2 0.4476973456  k 's are roots of p3 (x) . 0.5331714606 y  y  h(A K  A K  A K  A K ) 0.3176183650 m1 m 1 1 2 2 3 3 4 4 A  0.1615318704 A  0.3186900624 1 2 5 0.1328921374 A3  0.3353107130 A 4  0.1844673542 0.3067464033 K1  f (x m  1h, y m  1hf (x m , y m )) 0.4282332940 K 2  f (x m   2 h, y m   2hK1 ) 0.4115700284 K  f (x   h, y   hK ) 0.2205581369 3 m 3 m 3 2 K 4  f (x m   4 h, y m   4hK 3 ) 6 0.0940450312  k 's are roots of p 4 (x) . 0.2200386900 5 0.3284251085 y m1  y m  h A k K k 0.3753700260 k1

0.3205651549 A1  0.1110330126 A 2  0.2315140491 0.1615559894 A3  0.2855365536 A 4  0.247377756 0.2205581369 A5  0.1245386290

K  f (x   h, y   hf (x , y )) 7 0.0700013581 1 m 1 m 1 m m 0.1645530785 4

K 2  f (x m   2 h, y m   2hK1 ) A1  0.3015861030 A 2  0.4388992159

K 3  f (x m   3h, y m   3hK 2 ) A3  0.2595146811

K 4  f (x m   4 h, y m   4hK 3 ) K1  f (x m  1h, y m  1hf (x m , y m ))

K 5  f (x m   5h, y m   5hK 4 ) K 2  f (x m   2 h, y m   2hK1 ) K  f (x   h, y   hK )  k 's are roots of p5 (x) . 3 m 3 m 3 2 6  k 's are roots of q 3 (x) . y m1  y m  h A k K k k1 y m1  y m  h(A1K1  A 2 K 2  A3K 3  A 4 K 4 )

A1  0.0808899340 A 2  0.1739292491 A1  0.1873944613 A 2  0.3320570442

A3  0.2317413884 A 4  0.2375284589 A3  0.3163971576 A 4  0.1641513368

A5  0.1864574834 A 6  0.0894534851 K1  f (x m  1h, y m  1hf (x m , y m ))

K1  f (x m  1h, y m  1hf (x m , y m )) K 2  f (x m   2 h, y m   2hK1 )

K 2  f (x m   2 h, y m   2hK1 ) K 3  f (x m   3h, y m   3hK 2 )

K 3  f (x m   3h, y m   3hK 2 ) K 4  f (x m   4 h, y m   4hK 3 )

K 4  f (x m   4 h, y m   4hK 3 )  k 's are roots of q 4 (x) . 5 K 5  f (x m   5h, y m   5hK 4 ) y m1  y m  h A k K k K 6  f (x m   6h, y m   6 hK 5 ) k1 A  0.1265225411 A  0.2467424693  k 's are roots of p6 (x) . 1 2 7 A3  0.2826044220 A 4  0.2313348103 y  y  h A K m1 m  k k A  0.1127957572 k1 5 K  f (x   h, y   hf (x , y )) A1  0.0609968815 A 2  0.1340740035 1 m 1 m 1 m m K  f (x   h, y   hK ) A3  0.1873677992 A 4  0.2098210853 2 m 2 m 2 1 K  f (x   h, y   hK ) A5  0.1952655594 A 6  0.1449078184 3 m 3 m 3 2 K  f (x   h, y   hK ) A 7  0.0675668183 4 m 4 m 4 3 K  f (x   h, y   hK ) K1  f (x m  1h, y m  1hf (x m , y m )) 5 m 5 m 5 4 are roots of q (x) . K 2  f (x m   2 h, y m   2hK1 )  k 's 5 6 K 3  f (x m   3h, y m   3hK 2 ) y m1  y m  h A k K k K 4  f (x m   4 h, y m   4hK 3 ) k1 A  0.0907866950 A  0.1867964637 K 5  f (x m   5h, y m   5hK 4 ) 1 2 A3  0.2356771561 A  0.2301432712 K 6  f (x m   6h, y m   6 hK 5 ) 4 A5  0.1744898822 A 6  0.0821065311 K 7  f (x m   7 h, y m   7 hK 6 ) K1  f (x m  1h, y m  1hf (x m , y m ))  k 's are roots of p7 (x) . K 2  f (x m   2 h, y m   2hK1 ) y m1  y m  hA1f (x m  h1 , y m  h1 ) K 3  f (x m   3h, y m   3hK 2 ) A1  1.0 and 1 is the root of q1 (x) . K 4  f (x m   4 h, y m   4hK 3 ) y m1  y m  h(A1K1  A 2 K 2 ) K  f (x   h, y   hK ) A1  0.5404667096 A 2  0.4595332904 5 m 5 m 5 4 K  f (x   h, y   hK ) K1  f (x m  1h, y m  1hf (x m , y m )) 6 m 6 m 6 5

K 2  f (x m   2 h, y m   2hK1 )  k 's are roots of q 6 (x) . 7  k 's are roots of q 2 (x) . y m1  y m  h A k K k y m1  y m  h(A1K1  A 2 K 2  A3K 3 ) k1 5

A1  0.0681709284 A 2  0.1449484991 0.5278464333 0.4715356667 0.9931627931 0.0068372069 A3  0.1938199840 A 4  0.2080371557 0.9999718879 0.0000281121 A5  0.1870893740 A 6  0.1355581162 0.9999999478 0.0000000522 A 7  0.0623759426 0.9999999999 0.0000000001 1.0 0.0 K1  f (x m  1h, y m  1hf (x m , y m )) 0.9999999999 0.0000000001 K  f (x   h, y   hK ) 2 m 2 m 2 1 0.8960816695 0.1039183305 K  f (x   h, y   hK ) 3 m 3 m 3 2 0.9994294671 0.0005705329 K 4  f (x m   4 h, y m   4hK 3 ) 1.0000036823 0.0000036823 0.9999999352 0.0000000648 K 5  f (x m   5h, y m   5hK 4 ) 0.9999999999 0.0000000001 K 6  f (x m   6h, y m   6 hK 5 ) 1.0 0.0 K 7  f (x m   7 h, y m   7 hK 6 ) 1.0 0.0.

 k 's are roots of q 7 (x) . Example 3 Find the numerical solution of 4 4. Examples  y (x)  2 , y(5)  5 where There are five examples, two for x  4x numerical integration and three for y(x)  5  ln 5  ln x  ln(x  4) . The numerical solutions of initial value results from fourteen formulas of the problem of ordinary differential Runge-Kutta type are as follow; equations. h  0.1, x  5.1 Example 1 Find the value of calculated value error 1 dx 5.0526349934 0.0228725591 I   2 5.0755078241 0.0000002716 0 (1 x) 1 x 5.0755075527 0.0000000002 where I  0.62322524014 . The results 5.0755075525 0.0 from fourteen formulas are; 5.0755075525 0.0 calculated value error 5.0755075525 0.0 0.6338167356 0.0105914955 5.0755075525 0.0 0.6234709211 0.0002456896 5.1124349335 0.0369273810 0.6231960539 0.0000291862 5.0755075523 0.0000000002 0.6232264363 0.0000019615 5.0755075525 0.0 0.6232252249 0.0000000152 5.0755075525 0.0 0.6232252388 0.0000000013 5.0755075525 0.0 0.6232252403 0.0000000001 5.0755075525 0.0 0.5418883115 0.0813369287 5.0755075525 0.0 0.6205956284 0.0026296118 h  0.1, x  6 0.6230874359 0.0001378043 5.3557239031 0.1551017207 0.6232194640 0.0000057762 5.5108266024 0.0000009786 0.6232251134 0.0000001267 5.5108256242 0.0000000004 0.6232252321 0.0000000080 5.5108256238 0.0 0.6232252399 0.0000000002. 5.5108256238 0.0 5.5108256238 0.0 Example 2 Find the value of 1 5.5108256237 0.0000000001 x 5.7619124345 0.2510868107 I   xe dx where I  1.0 . The results 0 5.5108256234 0.0000000004 from fourteen formulas are; 5.5108256244 0.0000000006 5.5108256237 0.0000000001 calculated value error 6

5.5108256238 0.0 0.1001001502 0.0000000001 5.5108256238 0.0 0.1001001502 0.0000000001 5.5108256243 0.0000000005 0.1001001352 0.0000000151 0.1001001501 0.0000000002 Example 4 Find the numerical solution 0.1000911792 0.0000089711 y 2 x 0.1001001501 0.0000000002 y(x)  , y(1)  0.5 where y(x)  . x 2 1 x 0.1001503375 0.0000501872 The results from fourteen formulas of the 0.1001001503 0.0 Runge-Kutta are as follow; 0.1001001502 0.0000000001 h  0.1, x  1.1 0.1000836890 0.0000164613 0.1001001503 0.0 calculated value error 0.1000919157 0.0000082346 0.5166018539 0.0072076699 0.1001001051 0.0000000452 0.5238256883 0.0000161645 h  0.1, x  1.0 0.5238455907 0.0000360669 0.1007006428 0.0003146117 0.5238057185 0.0000038053 0.5237998462 0.0000096776 0.1010152545 0.0 0.1010152543 0.0000000002 0.5237956515 0.0000138723 0.5238455907 0.0000360669 0.1010150978 0.0000001567 0.1010152523 0.0000000022 0.5355522853 0.0117437615 0.5238287209 0.0000191971 0.1009231747 0.0000920798 0.1010152529 0.0000000016 0.5238455866 0.0000360628 0.5238051859 0.0000043379 0.1015346072 0.0005193527 0.1010152545 0.0 0.5237994439 0.0000100799 0.5237953433 0.0000141805 0.1010152545 0.0 0.1008464678 0.0001687867 0.5238455907 0.0000360669 h  0.1, x  2.0 0.1010152549 0.0000000004 0.1009307260 0.0000845285 0.6066666342 0.0600000324 0.1010152529 0.0000000016 0.6667573106 0.0000906439 0.6668706297 0.0000039630 0.6666446610 0.0000220057 5. Conclusion The Gaussian quadrature formulas 0.6666117160 0.0000549507 0.6665882598 0.0000784069 work as good as they were expected. All the Runge-Kutta formulas type also work 0.6668706296 0.0002039629 0.7903955742 0.1237289075 well except the seven points formulas for solving the autonomous equation. We 0.6667751668 0.0001085001 0.6668706082 0.0002039415 recommend the two, three, four and five points formulas. However we strongly 0.6666416340 0.0000250327 0.6666904411 0.0000237744 recommend the two points formulas since they work sufficiently good. Example 5 Find the numerical solution of y(x)  y3 , y(0)  0.1. The results from 6. References [1] B. Carnahan, H.A. Luther and J.O. fourteen formulas of the Runge-Kutta type Wilkes, Applied Numerical Methods, are as follow; John Wiley & Sons, Inc., 1969 h  0.1, x  0.1 [2] S.D. Conte and C. de Boor, calculated value error Elementary Numerical Analysis, 0.1000694068 0.0000307435 McGraw-Hill. 7