The Journal of Applied Science Vol. 5 No. : -9 [6] วารสารว ทยาศาสตร ประย กต doi:.446/j.appsci.6.8. ISSN 53-785 Prined in Thailand Research Aricle On he approxiaion of paricular soluion of nonhoogeneous linear differenial equaion wih Legendre series Nichapha Paanarapeeler * and Klo Paanarapeeler Deparen of Maheaics, Faculy of Applied Science, King Mongku s Universiy of Technology Norh Bangkok, Bang Sue disric, Bangkok 8 Thailand Deparen of Maheaics, Faculy of Science, Silpakorn Universiy, Mueang disric, Nakhon Paho 73 Thailand *E-ail: nichapha.p@sci.kunb.ac.h Absrac In his sudy, we propose an approxiaion ehod for paricular soluions of he nonhoogeneous second-order differenial equaions by runcaed Legendre series. Pariculary, he govern proble is a linear differenial equaion wih consan coefficiens. The choice of series soluions depends upon he copleenary soluions and he approxiae nonhoogeneous ers. An upper bound for he approxiaion error is forulaed. Soe exaples are presened o deonsrae he validiy of he proposed ehod. Keywords: nonhoogeneous differenial equaions, paricular soluions, Legendre polynoials, series, error bound Inroducion Many probles in naural science such as physics, engineering and aheaical odeling are governed by differenial equaions (Jung e al., 4). Solving such equaions will lead o undersanding he behaviors of he syses. Alhough soluions are known o be exis, here is an only few probles ha can be solved for analyic soluion. Several aeps are devoed o nuerical ehod or approxiaion echniques o obain he high accuracy of approxiaions (Jung e al., 4). Taylor series and orhogonal funcions such as Chebyshev and Legendre polynoials are powerful ools for funcions approxiaions in ers of polynoials (Gulsu e al., 6; Wang and Xiang, ; Paanarapeeler and Varnasavang, 3). As a by-produc hey can be used for approxiaing he soluion of ordinary differenial equaions. Sezer and Gulsu () proposed a nuerical ehod based on he hybrid Legendre and Taylor polynoials for solving he high-order linear differenial equaions. Olagunju and Olanineju () forulaed a rial soluion for nonhoogeneous differenial equaions Legendre polynoials are used as basis funcions. Recenly, Jung e al. (4) proposed he ehod o soluions of second-order differenial equaions by using Tau ehod based on Legendre operaional arix. In his paper, we presen a ehod for approxiaing he paricular soluions of nonhoogenous linear second-order differenial equaions. Raher han approxiaing as a whole we focus on in par, approxiaing paricular soluion by which he copleenary soluion is prior known. In doing so, we ransfer he original proble ino an approxiae one - -
The Journal of Applied Science Vol. 5 No. : -9 [6] วารสารว ทยาศาสตร ประย กต doi:.446/j.appsci.6.8. by approxiaing he nonhoogeneous er wih a runcaed Legendre series expansion and hence assue a paricular soluion of he approxiaed proble in ers of finie Legendre series. Since he nonhoogeneous er and he paricular soluion are approxiaed as polynoials, we consider he cases in which hey can be dependen on he corresponding copleenary soluion. We hypohesize ha he accuracy of approxiaion depends on he highes degree of polynoial used in he series; he ore nuber of ers are used, he ore decreasing in error agniude. To verify his we invesigae he upper bound for he error beween he exac soluion and he esiaion. Mehod of Finding Approxiae Soluion Based on Legendre Series Consider a nonhoogeneous linear second-order differenial equaion wih he iniial condiions L[ y] = ay () + by () + cy() = f () () y() = α, y () = β () a, b, c are consans and f() is a coninuously differeniable funcion up o order n. The general soluion for () is given by y = yc + yp y c is he copleenary soluion obained fro he associaed hoogeneous differenial equaion while y p is a paricular soluion. In order o find he approxiaion of y p, we firs approxiae he nonhoogeneous er f() as he runcaed Legendre series as P =, P =, P = + P P + [( ) ] + n f() = a P (3) = ; =,, n are he Legendre polynoials and he coefficiens are denoed by a + = f () P () d. Noing for generaliy ha even f( x ) is defined on τ x τ, we can ransfor ino by using he relaion x ( ) We hen obain an approxiaed proble for equaion () as = τ τ + τ+ τ (Ascher, 8). - -
The Journal of Applied Science Vol. 5 No. : -9 [6] วารสารว ทยาศาสตร ประย กต doi:.446/j.appsci.6.8. wih he iniial condiions L[ yˆ] ayˆ () byˆ () cyˆ() a P = + + = (4) n = yˆ() = γ, yˆ () = η. (5) For his proble we suppose is soluion in he for yˆ = yˆ + yˆ. I should be noed ha he for of copleenary soluions of equaions () and (4) are siilar. In order o solve for paricular soluion we assue ha c p n+ l p = i i + (6) i= yˆ b P ( AP BP ) he unknown paraeers l, A and B depend on he for of copleenary soluion. The reason behind his is ha he linearly independence of wo soluions us be preserved (Rice and Do, ). To illusrae his clearly, we classify l, A and B as follows. Case I. If here is no any er of polynoials appearing in hoogeneous soluion, hen l = A= B= (7) Case II. If here is a polynoial consising of only consan er appearing in hoogeneous soluion, hen n ( ) ( )! l =, B=, A= b (8) (!) = n n = for n =,, 4,... and n n+ = for n =,3,5,.... Case III. If here is a polynoial of degree one appearing in hoogeneous soluion, hen - 3 -
The Journal of Applied Science Vol. 5 No. : -9 [6] วารสารว ทยาศาสตร ประย กต doi:.446/j.appsci.6.8. n+ n ( ) ( )! ( ) (+ )! l =, A= b, B= b (9) + + = (!) =!( + )! n+ n+ = for n =,, 4,... and n+ n+ = for n =,3,5,.... In order o deerine he coefficiens b i, we subsiue (6) ino (4), so ha n+ l n+ l n+ l n a b P + b b P BP + c b P AP BP = a P. () i i i i i i i= i= i= = The derivaives of Legendre polynoials can be wrien in he for of Legendre polynoials as n, () P = (n 4 ) P ; n ( P = ; n ) n n n = n n () P = (n 4 ) (n 4 4k 3) P. n n k = k= Eploying () and (), we observe ha equaion () becoes he algebraic equaion of Legendre polynoials. Finally, he values of b i are accoplished by equaing he corresponding coefficiens of P i and solving he syse of algebraic equaions. Upper Bound for Approxiaion Error In his secion, we invesigae an upper bound for he error beween he exac soluion and he approxiaed soluion obained fro he ehod enioned above. Le z = y yˆ denoes he error of approxiaed soluion, his quaniy is hen saisfied he differenial equaion L[ z] = az () + bz () + cz() = E() (3) - 4 -
The Journal of Applied Science Vol. 5 No. : -9 [6] วารสารว ทยาศาสตร ประย กต doi:.446/j.appsci.6.8. n E() = f() a P = a P = = n+. (4) We noe ha E () is an error for approxiaing nonhoogeneous er. In order o deerine he bounds for soluion of (3), we follow he heory developed in previous work (Brauer, 963). To be proceed, we firs rewrie (3) in he for of syse of firs-order equaions by leing () v = dz d. The resuling syse is given by u = z and () / du = v d dv E() cu bv =. d a (5) The above equaions can be wrien in arix noaion by denoing () = ( u v) T funcion. Equaion (6) hen becoes X as a vecor d X = f (, X ) = A X + e (6) d A = c b, = E () a a a e. (7) Nex, we will deerine a scalar funcion ha is bounded above he righ hand side of (7). Since f(, X) A X + e (8). is a vecor nor, and - 5 -
The Journal of Applied Science Vol. 5 No. : -9 [6] วารสารว ทยาศาสตร ประย กต doi:.446/j.appsci.6.8. E () = a P () a a a e (9) = n+ = n+ a because P () [], i follows ha f(, X) A X + a. () a = n+ Define a funcion ω() r = Ar+ a a () = n+ and noing ha r r () > is a posiive funcion. Fro (), i is rue ha f(, X) ω( X ) () Solving for r () of an equaion r = ω() r (3) wih r () = X () and () r ω is given in (), we have e e r ( ) = a + e r() a A A A A. (4) = n+ Fro he heory of upper bound for soluions of ordinary differenial equaions (Brauer, 96), we can conclude ha X () r () (5) - 6 -
The Journal of Applied Science Vol. 5 No. : -9 [6] วารสารว ทยาศาสตร ประย กต doi:.446/j.appsci.6.8. for all. By eans of vecor nor, we arrive a he ain resul y yˆ r () (6) The expression of r () can be deerined explicily following (4). The difficuly arises however when aeping o calculae he suaion. To faciliae he calculaion a soe properies of runcaed Legendre series expansion is inroduced (Wang and Xiang, ). ( n ) ( n ) Since, and if are coninuous on [ ] f, f, f,, f f T = V < n ξ T = ξ () d (7) for soe n, we apply he error bounds of runcaed Legendre series expansion derived by Wang and Xiang () o ge ha Vn π a n 3 n 3 ( n) = n+ = +. (8) Thus, y() yˆ () ERB() (9) e e V π ERB e r A A n A ( ) = () a A + = n+ 3 n 3 ( n) (3) wih n, is he upper bound for approxiaion error as desired. - 7 -
The Journal of Applied Science Vol. 5 No. : -9 [6] วารสารว ทยาศาสตร ประย กต doi:.446/j.appsci.6.8. Exaples Here, we provide soe exaples o illusrae our ehod presened in he previous secion. Exaple In his exaple, we find he general soluion of he nonhoogeneous linear second order differenial equaion y y = sin. (3) The copleenary soluion of (3) is c + ce. Eploying he proposed ehod, we rewrie he nonhoogeneous er in he for of Legendre series expansions as 3 sin = ap + ap+ a P + ap (3) 3 3 a, a 3π π = =, a =, a = (Paanarapeeler and Varnasavang, 3). 8 8 Fro (3), he proble (3) is rewrien as yˆ yˆ = ap + ap+ a P + ap. (33) 3 3 Fro case II, we have l =, B= since he copleenary soluion has a consan er. Therefore, 4 yˆ p = b i P i AP (34) i= ( ) ( )! A= b. (35) = (!) b = 9π, b = 4π, b = π, b = π. Afer subsiuing (34) and (35) in (33), we have 3 4 4 56 8 56 The expression of he paricular soluion (34) afer rearranging ers in increasing powers of is Therefore, we finally obain he approxiae soluion as 7π 33π 5π 3 5π 4 yˆ p =. (36) 4 3 6 64-8 -
The Journal of Applied Science Vol. 5 No. : -9 [6] วารสารว ทยาศาสตร ประย กต doi:.446/j.appsci.6.8. 7π 33π 5π 3 5π 4 yˆ = c+ ce. (37) 4 3 6 64 We noe ha he ehod of undeerined coefficiens is no applicable o linear equaion (3) wih such nonhogeneous er. In addiion, we could no find is paricular soluion by eploying he ehod of variaion of paraeers analyically as well. Therefore, he above procedure can be used as alernaive way o approxiae he soluion. We furher illusrae he resuls of an upper bound for he error beween he exac soluion and he approxiaed soluion by he given following exaples. Exaple Consider he nonhoogeneous linear second order differenial equaion y () = e (38) wih he iniial condiions y() =, y () =. (39) We sar wih he approxiaion e ap ap ap = + + (4) a =.75, a =.36, a =.3578 are he coefficiens of Legendre polynoials obained fro he orhogonal relaion proble a + = e P() d. Hence, we now solve he yˆ () = ap + ap+ ap (4) wih he iniial condiions yˆ() =, y ˆ () =. (4) Equaions (4) has a copleenary soluion y = c + c (43) ˆc - 9 -
The Journal of Applied Science Vol. 5 No. : -9 [6] วารสารว ทยาศาสตร ประย กต doi:.446/j.appsci.6.8. c, c are arbirary consans. Since here is he polynoials wih degree one appeared in (43), we assue he paricular soluion for (4) as 4 p = i i + (44) i= yˆ b P ( AP BP ) ( ) ( )! 3 A= b = b b + b = 4 (!) 8 ( ) ( + )! 3 B= b = b b. + + 3 =!( + )! (45) Subsiuing (44) in (4) and eploying (), we ge (3b + b) P + 5bP + 35bP = ap + ap+ ap. (46) 4 3 4 Coparing he coefficiens of Pi ; i =,,, we obain b = a a, b3 = a, b4 = a. (47) 3 5 35 Afer rearranging, we find he paricular soluion (44) in he for a a a a yˆ p = + + 4 6 8 3 4. (48) Therefore, he general soluion of equaion (4) is a a a a yˆ c c = + + + + 4 6 8 3 4. (49) - -
The Journal of Applied Science Vol. 5 No. : -9 [6] วารสารว ทยาศาสตร ประย กต doi:.446/j.appsci.6.8. Under he condiions (4), he approxiae soluion for he original equaion (38) is 3 4 yˆ.498.839.447. = + + + + (5) While, he exac soluion of (4) is y = + + e. (5) Nex, we find he upper bound for he absolue error beween (5) and (5) by using (3). For he proble (38), a =, b= c=. Therefore, 5 nuerically under he olerance of order, we find ha A = and A =. Calculaing = 3 V π ( ) = 8.6 V e d 3.9775. Here, () = = r =. Therefore, he upper bound is ERB( ) = 8.6 e ( e ) y ( ) y ˆ( ) 8.6 e( e ). We hen conclude ha Table shows he accuracy of approxiaions including wih errors and error bounds. The plos of he exac soluion, he approxiae one, and yˆ( ) ± ERB() are shown in Figure. In his exaple we eliinae he effec of iniial condiion by choosing he sae values as he original proble. However, he agniude of errors is quie large. This ay be caused by he nuber of ers used in approxiaion is low. We observe ha order in agniude of errors does no agree wih he order of agniude of errors in funcion approxiaion (see Table ). This resul iplies ha he accuracy of approxiae nonhoogeneous er does no necessarily guaranee he accuracy of approxiae soluions. - -
The Journal of Applied Science Vol. 5 No. : -9 [6] วารสารว ทยาศาสตร ประย กต doi:.446/j.appsci.6.8. Figure. Plos of yyy, ˆˆ, ERB, and ŷ ERB of Exaple. Table. The coparisons beween he exac soluion and he approxiaion for Exaple. y ŷ y yˆ ERB..44.5.999.83.4.898.496.399 4.457.6 3.4.848.5973 6.767.8 4.55 3.3.7943.83 4.783 3.767.996 4.346 - -
The Journal of Applied Science Vol. 5 No. : -9 [6] วารสารว ทยาศาสตร ประย กต doi:.446/j.appsci.6.8. Table. The errors beween he nonhoogeneous er and he runcaed Legendre series expansion for Exaple. e a P e a P..9963.37..4.385.7.4.498.536.38.6.8.857.96.8.55.7.9.783.6366.87 Exaple 3 Consider he following differenial equaion y 5y + 6y = sin (5) wih he iniial condiions Here, we se y() =, y () =. (53) 5 sin = ap (54) = a = a = a =, a =.935, a =.63, a =.. Therefore, we have he 4 3 5 approxiae proble as yˆ 5yˆ + 6yˆ = ap+ ap+ ap+ ap+ ap+ ap (55) 3 3 4 4 5 5 wih he iniial condiion - 3 -
The Journal of Applied Science Vol. 5 No. : -9 [6] วารสารว ทยาศาสตร ประย กต doi:.446/j.appsci.6.8. yˆ() =, y ˆ () =. (56) A copleenary soluion for (55) is given by yˆ = ce + ce (57) c 3 c, c are arbirary consans. Since here has no any polynoial er in (57), we assue he paricular soluion for (55) as 5 yˆ p bp i i i= = (58) To find b i, we subsiue (58) and use (), () o (55) and hen equae he coefficiens of P ; i =,,...,5, o ge a linear syse of equaions. Afer soe calculaions, we have i a5 a4 + 45b5 a3+ 35b4 63b5 b5 =, b4 =, b3 =, 6 6 6 a + 5b3 35b4 + 5b5 a+ 5b 5b3+ 5b4 4b5 b =, b =, 6 6 a + 5b 3b + 5b3 b4 + 5 b5 b =. 6 (59) The soluion of iniial value proble (55) (56) is 3 3 3 5 yˆ = ce + ce + b b + b4 + b b3+ b5 8 8 3 5 5 35 35 63 + b b + b b + b + b 4 4 8 8 3 4 5 4 3 5 4 5 (6) - 4 -
The Journal of Applied Science Vol. 5 No. : -9 [6] วารสารว ทยาศาสตร ประย กต doi:.446/j.appsci.6.8. 3 3 9 5 5 c = 3b + b+ b b3 b4 + b5 + 8 8 3 3 5 3 c = b b b + b3 + b4 b5. 4 8 (6) To see how accurae he approxiaion is, we find he exac soluion of (5) (53). I is given by 3 7 = + sin + cos. (6) 5 3 y e e The upper bound for he absolue error for his exaple can be obained in siilar way. We firs deerine A = 6 5 and A = 6 and V 4 cos d.439. = = By calculaing nuerically under he olerance of order 5, we find ha V 4 =.7. = 6 3 5 7 ( 5) π We noe ha r () =. Therefore, he upper bound is Thus,.7 6 6 ERB( ) = e ( e ). 6.7 6 6 y () y ˆ() e ( e ). 6 We presen he accuracy of approxiaions including wih errors and error bounds in Table 3. The plos of he exac and he approxiae soluions, and yˆ( ) ± ERB() are shown in Figure. Here, we choose siilar iniial condiions for boh probles. As opposed o previous exaple, he nuber of ers used in approxiaion is larger. This resuls in he sall errors presened in approxiae nonhoogeneous er (see Table 4). Also, he errors of approxiae soluion are low coparing wih he previous exaple. - 5 -
The Journal of Applied Science Vol. 5 No. : -9 [6] วารสารว ทยาศาสตร ประย กต doi:.446/j.appsci.6.8. Figure. Plos of yyy, ˆˆ, ERB, and ŷ ERB of Exaple 3. Table 3. The coparisons beween he exac soluion and he approxiaion for Exaple 3. y ŷ y yˆ ERB..9984.99839..9988.4.6684.6664..57674.6 -.694397 -.694475.78.84745.8-3.89966-3.899875.4.36785 -.9867453 -.986795.498 6.53476-6 -
The Journal of Applied Science Vol. 5 No. : -9 [6] วารสารว ทยาศาสตร ประย กต doi:.446/j.appsci.6.8. Table 4. The errors beween he nonhoogeneous er and he runcaed Legendre series expansion for Exaple 3. sin 5 a P sin a P 5..986693.986475.8.4.389483.389396.77.6.564645.564674.5.8.77356.77365.44.8447.845.9 Conclusion In suary, we proposed an approxiaion echnique for solving he linear secondorder differenial equaion wih nonhoogeneous er. The ehod presened here is differen fro previous works since i ais o approxiae only he paricular soluion. I is believed ha approxiaion in par ay confine poenially he propagaion of errors. The presen ehod akes an advanage fro approxiaing funcion wih Legendre series by assuing series soluion wih he sae degree as of approxiae nonhoogeneous er. Since we are approxiaing he paricular soluion we iprove he ehod by classifying he fors of series according o is copleenary soluion. This is possible in general when solving he equaion wih he radiional echnique. To insure ha he approxiaing resuls should no be divergen fro he exac soluion we derived he bound of approxiaion errors. The expression of error bound shows he dependency of iniial condiions and he degree of consruced series. We observe ha however he derived error bound is exponenially increased wih (he independen variable). This effec doinaes all oher dependen facors if is large. We argue ha he reason behind his is ha he ehod used for derivaion is based upon he iniial value proble (see Brauer (963)). Thus, under he derived error bound, he approxiaion is locally (sall inerval of ) raher han globally. Iporanly, we see ha he error bound indicaes how he precise approxiaion depends on he nuber of ers in consruced series. In he provided exaples, he error bounds are exponenially increased wih. However, by increasing he nuber of ers of series we can expec he reducion in agniude of errors (see Figure 3). I is observed ha if V n in (7) is nonincreasing wih n, he dependence on nuber of ers is only presen by he series - 7 -
The Journal of Applied Science Vol. 5 No. : -9 [6] วารสารว ทยาศาสตร ประย กต doi:.446/j.appsci.6.8. π = + 3 3 ( ) n n n (63) which is decreased wih n. The proposed ehod can be exended o he higher order of nonhoogeneous differenial equaions wih consan coefficiens and could be he firs sep of error analysis for he ore coplex proble. As enioned, solving for analyic soluion of differenial equaions is difficul even for linear nonhoogeneous proble. The ehod presen here is as alernaive, especially when he nonhoogeneous er is given in coplex for. Neverheless, here are soe gaps ha can be considered for he possible fuure work such as he derivaion of error bounds for boundary value probles, he use of nuerical inerpolaions for approxiae funcion based on boh Legendre and Chebyshev series. In addiion, based on his ehod he possible exension should be he approxiaion for he differenial equaions wih variable coefficiens. Figure 3. Plo of series (63) wih respec o n. References Andrews L.C., (99) Special Funcions of Maheaics for Engineers, nd ediion, McGraw-Hill, New York, U.S.A., 75 P. Ascher U., (8) Mehods and Conceps for ODEs, pp. 77 79, In: Ghaas O. (Ed), Nuerical Mehods for Evoluionary Differenial Equaions, Sociey for Indusrial and Applied Maheaics, Philadelphia, U.S.A. Brauer F., (963) Bounds for Soluions of Ordinary Differenial Equaions. Proc. Aer. Mah. Soc., 4: 36 43. - 8 -
The Journal of Applied Science Vol. 5 No. : -9 [6] วารสารว ทยาศาสตร ประย กต doi:.446/j.appsci.6.8. Gulsu M., Sezer M. and Tanay B., (6) A Marix Mehod for Solving High-Order Linear Difference Equaions wih Mixed Arguen Using Hybrid Legendre and Taylor Polynoials. J. Franklin Ins., 343: 647 659. Jung C.Y., Liu Z., Rafiq A., Ali F. and Kang S.M., (4) Soluion of Second Order Linear and Nonlinear Ordinary Differenial Equaions using Legendre Operaional Marix of Differeniaion. In. J. Pure Appl. Mah., 93(): 85 95. Olagunju A.S. and Olaniregun D.G., () Legendre-Coefficiens Coparison Mehods for he Nuerical Soluion of a Class of Ordinary Differenial Equaions. IOSR-JM., (): 4 9. Paanarapeeler N. and Varnasavang V., (3) Coparison Sudy of Series Approxiaion and Convergence beween Chebyshev and Legendre Series. Appl. Mah. Sci., 7(65): 35 337. Rice G.R. and Do D.D., () Applied Maheaics and Modeling for Cheical Engineers, nd ediion, John Wiley & Sons Inc., New Jersey, U.S.A., 4 P. Sezer M. and Gulsu M., () Solving High-Order Linear Differenial Equaions by a Legendre Marix Mehod Based on Hybrid Legendre and Taylor Polynoials. NUMER. METH. PART. D. E., 6(3): 647 66. Wang H. and Xiang S., () On he Convergence Raes of Legendre Approxiaion. Mah. Copu., 8(78): 86 877. - 9 -