N igerian Journal of M atematics and Applications V olume 23, (24), 3 c N ig. J. M at. Appl. ttp : //www.kwsman.com CONSTRUCTION OF POLYNOMIAL BASIS AND ITS APPLICATION TO ORDINARY DIFFERENTIAL EQUATIONS Aliu, T. and 2 Bamigbola O. M. Abstract Te study identifies te versatility of basis functions in epansionary metod by constructing basis functions of finite order, wic satisfy some smootness and differentiability conditions. Effort was intensified towards solving empirical problems via te finite element metod.. Introduction Te inappropriateness, teoretically of te usage of C elements in solving problems of matematical pysics, was first identified by Zienkiewicz []. Suc elements were observed not differentiable at certain inter-element boundary points in te domain over wic te problems are defined. It was owever discovered by Bamigbola [3] tat accurate results can be obtained wit C elements using te identified basis functions. We note tat a basis function is an element of a particular basis for a function space. In fact, every continuous function in a function space can be represented as a linear combination of a basis function. It elps in giving matematical description of a curve or any data distributed over space, time and any oter type of continuum. Received December 22, 24. Corresponding autor. 2 Matematics Subject Classification. 49N & A. Key words and prases. Mobile pones, Consumer preference Department of Statistics and Matematical Sciences, Kwara State University, Malete 2 Department of Matematics, University of Ilorin, Ilorin; e-mail: aliu.taju@kwasu.edu.ng
2 Aliu, T. and Bamigbola O. M. 2. Metodology and Results BASIS FUNCTION Te set φ n () of some given functions usually piecewise polynomials defined over a given domain D is called basis functions wen used for an epansion of te form () p() = N a i φ i () i= were a i, i =,,..., N are parameters of te approimation metod. It is pertinent to note tat te coice of te set of basis functions is essential to te epansion metod for various reasons; among wic is te facilitation of computational ease and accuracy of te resulting solution in [2], [3] and [4] polynomial basis functions up to cubic power were constructed wit te zeros of te cebysev polynomials of te first kind and applied using te finite element metod to solve two points boundary value problems. In [7] te zeroes of te legendre polynomial was employed to obtain same. It was in [8 ] tat a comparative study of te computational efficiency of te above mentioned construction wit some oter polynomial basis functions were considered wit a view to identifying te optimal coice among tem wic could be used as a better approimating tool in te epansion metod. Te result of te eperiment is being generalized in tis present work. We reviewed te derivation of basis function of te nt Order and use MATLAB to obtain te inverse of stiffness matri at eac step of te construction. Wit te use of Garlarkin formulation in [3 ] we obtain solution to problems capped in differential equations. DERIVATION OF BASIS FUNCTIONS We denote by Cr n (α) te space of polynomial of finite order defined over a closed interval wic are n-times continuously differentiable in te open interval δ. We note tat n and r are integral values in wic n, r We select mes points i in te real interval [a,b] as i = + i i =, 2, 3,..., m were = (b a) m Te appropriate form of a function p() in te sub interval i, i+ in line wit [2 ] is (2) p() = (n+)(r+) k= a i ( ) k, [a, b]
CONSTRUCTION OF POLYNOMIAL BASIS AND ITS APPLICATION... 3 Te m t derivatives of p() is given as ( ) ( m) n+,r+ (3) p m (k )! ( ) k m () = ((k m)!) a i, [, ] k= Te process of deriving te set of basis functions involves te interpolation of te epression in (3) at te nodal points k, (k =, 2, 3,..., r ) and solving for te parameters a i resulting tere from. Adopting te usual notation p m k = pm ( k ), and interpolating (5) at te nodes k we ave te matri equation (4) p = Aa DERIVATION OF GENERALIZED POLYNOMIAL BASIS FUNC- TIONS Consider a linear polynomial function (5) p() = a + a 2, C : [, ] Interpolating (5) at te nodal points and, we ave P = P () = a P 2 = P () = a + a 2 Wic implies (6) Ten Tus, te basis functions are: ( ) ( p = p 2 A = A = ( ) ( a a 2 ) ) ( (7) φ i = ( / ) ( ) ) i =, 2 φ =, Φ 2 = Consider a quadratic polynomial function (8) p() = a + a 2 + a 2 3 C 2 : [,, ] Interpolating at te nodal points(, 2, ) we obtain P = P () = a
4 Aliu, T. and Bamigbola O. M. P 2 = P ( 2 )) = a + 2 a 2 + 4 a 3 P 3 = P () = a + a 2 + a 3 P P 2 = /2 /4 a a 2 P 3 a 3 A = /2 /4 A = 3 4 2 4 2 Te basis functions are: (9) φ i = ( ( )2) 3 4, i =, 2, 3 2 4 2 i.e φ = 3 + 2( )2 φ 2 = 4 4( )2 φ 3 = + 2( )2 For a cubic polynomial function () P () = a + a 2 ( ) + a 3( )2 + a 4 ( )3 C 2 : [, 5, 2 3, ] P = P () = a () P 2 = P ( 3 ) = a + 2 3 a 2 + 9 a 3 + 27 a 4 P 3 = P ( 3 ) = a + 2 3 a 2 + 4 9 a 3 + 8 27 a 4 P 4 = P () = a + a 2 + a 3 + a 4 P i = A a i i =, 2, 3, 4 A = /3 /9 /27 2/3 4/9 8/27 A = /2 9 9/2 9 45/2 8 9/2 9/2 27/2 27/2 9/2 (2) φ i = ( ( )2 ( )3) A, i =, 2, 3, 4
CONSTRUCTION OF POLYNOMIAL BASIS AND ITS APPLICATION... 5 φ = 2 + 9( )2 9 2 ( )3 φ 2 = 9 45 2 ( )2 + 27 2 ( )3 φ 3 = 9 2 + 8( )2 27 2 ( )3 φ 4 = 9 2 ( )2 + 9 2 ( )3 Consider a polynomial of degree four wit five nodal points C 4 : [, 4, 2, 3 4, ] (3) p i () = a + a 2 + a 3( )2 + a 4 ( )3 + a 5 ( )4, i =, 2, 3, 4, 5 P = P () = a p 2 = P ( 4 ) = a + a 2 4 + a 3( 4 )2 + a 4 ( 4 ) 3 + a 5 ( 4 )4 p 3 = P ( 2 ) = a + a 2 2 + a 3( 2 )2 + a 4 ( 2 )3 + a 5 ( 2 )4 p 4 = P ( 3 4 ) = a 3 3 + a 4 4 + a 3( 3 4 )2 + a 4 ( 3 4 )3 + a 5 ( 3 4 )4 p 5 = P () = a + a 2 + a 3 + a 4 + a 5 P i = A a i, i = ()5 /4 /6 /64 /256 A = /2 /4 /8 /6 3/4 9/6 27/64 8/256 25/3 6 2 6/3 A = 7/3 28/3 76 2/3 22/3 8/3 96 28 224/3 6 32/3 28/3 64 28/3 32/3 Te basis functions are: (4) φ i () = ( ( )2 ( )3 ( )4) A, i = ()5 Proceeding te same way, using MATLAB to evaluate te inverse of A (i.e A ) at eac step, we were able to obtain te basis functions for Ci (i = ()) wose results could be seen as follows. It deeds be noted tat for i > matri A becomes invertible. Tus, recording no basis function. To obtain a basic functions in C : [, ], we consider a polynomial of degree 3. i.e. (n + )(r + ) were (5) P i = a + a 2 + a 3( )2 + a 4 ( )3 By differentiating equation (5) and interpolating at te nodal points [,], we ave P = a
6 Aliu, T. and Bamigbola O. M. P 2 = a 2 P 3 = a + a 2 + a 3 + a 4 p 4 = a 2 + 2 a 3 + 3 a 4 By generalization, P i = Aa i i =, 2, 3, 4 were A = / / 2/ 3/ Te basis functions are φ i = ( ( )2 ( )3) A i = ()4 φ = 3( )2 + 2( )3 φ 2 = [ 2( )2 + ( )3 ] φ 3 = 3( )2 2( )3 φ 4 = [ ( )2 + ( )3 To obtain basis function in C2 : [, 2, ], we consider polynomial of degree 5 (6) P = a + a 2 ( ) + a 3( )2 + a 4 ( )3 + a 5 ( )4 + a 6 ( )5 By differentiating equation (6) and interpolating at te nodal points C2 : [, 2, ], we ave: P = a P 2 = a 2 P 3 = a + 2 a 2 + 4 a 3 + 8 a 4 + 6 a 5 + 32 a 6 P 4 = a 2 + a 3 + 3 4 a 4 + 2 a 5 + 5 6 a 6 P 5 = a + a 2 + a 3 + a 4 + a 5 + a 6 P 6 = a 2 + 2 a 3 + 3 a 4 + 4 a 5 + 5 a 6 P i = Aa i i =, 2, 3, 4, 5, 6 /2 /4 /8 /6 /32 A = 3 4 2 2 3 4 5 6 Te basis functions are: φ i = ( ( )2 ( )3 ( )4 ( )5 ( )6) A i = ()6 i.e φ = 24( )5 68( )4 + 66( )3 23( )2 + φ 2 = 4( )5 2( )4 + 3( )3 6( )2 + ( ) φ 3 = 6( )4 32( )3 + 6( )2 φ 4 = 6( )5 4( )4 + 32( )3 8( )2 5
CONSTRUCTION OF POLYNOMIAL BASIS AND ITS APPLICATION... 7 φ 5 = 24( )5 + 52( )4 34( )3 + 7( )2 φ 6 = 4( )5 8( )4 + 5( )3 ( )2 Te process continue to degree 6. But for te purpose of tis presentation, we decided to present only te process wit degrees and 2 wile oter basis functions wit iger degrees can be found in te main tesis. Construction of basis functions wit order 2 For basis functions in C 2 : [, ] Consider a polynomial equation of degree 5: (7) P () = a + a 2 ( ) + a 3( )2 + a 4 ( )3 + a 5 ( )4 + a 6 ( )5 By differentiating equation (7)twice and interpolating at nodal points [,], we obtain: P = a P 2 = a 2 P 3 = ( )2 a 3 P 4 = a + a 2 + a 3 + a 4 + a 5 + a 6 P 5 = a 2 + 2 a 3 + 3 a 4 + 4 a 5 + 5 a 6 P 6 = ( )2 2a 2 + ( )2 6a 4 + ( )2 2a 5 + ( )2 2a 6 P i = Aa i i =, 2, 3, 4, 5, 6 A = 2( )2 3 4 5 2( )2 ( )2 2( )2 2( )2 Te basis functions are: φ i = ( ( )2 ( )3 ( )4 ( )5 ( )6) A i = ()6 i.e φ = 6( )5 + 5( )4 ( )3 + φ 2 = 3( )5 + 8( )4 6( )3 + ( ) φ 3 = 2 2 ( )5 + 3 2 2 ( )4 + 3 2 2 ( )3 + 2 2 ( ) φ 4 = 6( )5 5( )4 + ( )3 φ 5 = 3( )5 + 7( )4 4( )3 φ 6 = 2 2 ( )5 2 ( )4 + 2 2 ( )3 Equally, te basis functions of iger degrees can be found in te main tesis of tis researc work.
8 Aliu, T. and Bamigbola O. M. Table : BASIS FUNCTIONS OF SELECTED ORDERS(Cr k ) Order (k) Degree (r) y=/ φ = y φ 2 = y 2 φ = 3y + 2y 2 2 φ 2 = 4y 4y 2 2 φ 3 = y + 2y 2 3 φ = 3y + 2y 2 3 φ 2 = (/2)y + 9y 2 (9/2)y 3 3 φ 3 = (9/2)y + 8y 2 (22/2)y 3 3 φ 4 = y (9/2)y 2 + (9/2)y 3 φ = 3y 2 + 2y 3 φ 2 = [y 2y 2 + y 3 ] φ 3 = 3y 2 2y 3 φ 4 = [ y 2 + y 3 ] 2 φ = 24y 5 68y 4 + 66y 3 23y 2 + 2 φ 2 = [4y 5 2y 4 + 3y 3 6y 2 + y] 2 φ 3 = 6y 4 32y 3 + 6y 2 2 φ 4 = [6y 5 4y 4 + 32y 3 8y 2 ] 2 φ 5 = 24y 5 + 52y 4 34y 3 + 7y 2 2 φ 6 = [4y 5 8y 4 + 5y 3 y 2 ] 2 φ = 6y 5 + 5 4 y63 + 2 φ 2 = [ 3y 5 + 8y 4 6y 3 + y] 2 φ 3 = 2 /2[ y 5 + 3y 4 3y 3 + y 2 ] 2 φ 4 = 6y 5 5y 4 + y63 2 φ 5 = [ 3y 5 + 7y 4 4y 3 ] 2 φ 6 = 2 /2[y 5 y 4 + y 3 ] 3. Numerical Eamples Illustration. We consider te solution to a growt equation bellow using te constructed basis functions via Galerkin Weigted Residual approac (8) d 2 u() d 2 u() =, < < 2 wit u() = and u(2) = ep(2) by employing Galerkin Weigted Residual Metod (, φ i ) = 2 ( d2 u() u())φ d 2 i d =, i =, 2, 3,..., 2 ( d2 u() φ d 2 i u()φ i )d =
CONSTRUCTION OF POLYNOMIAL BASIS AND ITS APPLICATION... 9 du φ i d 2 2 ( du dφ i d d + uφ i)d = since φ i does not include te boundary du φ i d 2 = 2 ( du d dφ i d + uφ i)d = using te relation φ i = e= φe N e N i we ave e= ( dφe N dφm e d A e NM = ( dφe N d d + φ e N φe M ) N i Mj u j d = + φ e N φe M )d dφm e d since A ij = e= Ae NM e N i e M j wit φ = ( and φ 2 = /3 + / /6 / A e NM = /6 / /3 + / ) wit te domain of te problem divided into four distinct elements wit 5 nodes, we ave ( =.5 suc tat ) 2.667.967 A e NM =.967 2.667 Te global finite element equation is AU = B were. 4.3333.967 A =.967 4.3333.967.967 4.3333...967 B = 4.625 7.389 (Note tat te boundary conditions ave been imposed) by solving te resulting equation we ave u. u 2 u 3 u 4 =.6348 2.696 4.468 7.389 u 5 For 8 equal elements [ =.25] te global finite element equation wit te boundary conditions imposed reads
Aliu, T. and Bamigbola O. M.. 8.666 3.9583 3.9583 8.666 3.9583 3.9583 8.666 3.9583 3.9583 8.666 3.9583 3.9583 8.666 3.9583 3.9583 8.666 3.9583 3.9583 8.666.. 3.9583 = 29.2483 7.389 wic gives u u 2 u 3 u 4 u 5 u 6 u 7 u 8 u 9 u u 2 u 3 u 4 u 5 u 6 u 7 u 8 u 9..2822.6453 2.24 = 2.729 3.4847 4.4766 5.752 7.389 wit te quadratic cases in( C2 ), te results obtained for two quadratic elements reads u u 2 u 3 u 4 u 5. =.6486 2.798 4.48 7.389 wile te results obtained for four quadratic elements reads
CONSTRUCTION OF POLYNOMIAL BASIS AND ITS APPLICATION... u u 2 u 3 u 4 u 5 u 6 u 7 u 8 u 9..2842.648787 2.76 = 2.78389 3.49336 4.4882 5.75449 7.389 Te MATLAB code bellow was used to obtain te solution to te problem above using te basis function in C function = Gauss(A, b) b = [.;.32738; 4.767857;.98655; ; ; ; ; ; ; ; ; ; ; 35.23729;.7246586; 7.389;.7634]; A = [;.33482.98655.84449;.986559.785742 4.767857.98655;.84449.669642.98655.84449; 4.767857.9856559.785742 4.767857.98655;.98655.84449.669642.98655.84449; 4.767857.986559.785742 4.767857.98655;.98655.84449.669642.98655.84449; 4.767857.986559.785742 4.767857.98655;.98655.84449.669642.98655.84449; 4.767857.986559.785742 4.767857.98655;.98655.84449.669642.98655.84449; 4.767857.986559.785742 4.767857.98655;.98655.84449.669642.98655.84449; 4.767857.986559.785742.98655;.98655.84449.669642.84449; ;.98655.84449.33482]; [n, n] = size(a); [n, k] = size(b); = zero(n, k); fori = : n m = A(i + : n, i)/a(i, i); A(i + : n, :) = A(i + : n, :) + M A(i, :); b(i + : n, :) = b(i + : n, :) + M b(i, :); end; (n, :) = b(n, :)/A(n, n); fori = n : : (i, :) = (b(i, :) A(i, i + : n) (i + : n, :))/A(i, i);
2 Aliu, T. and Bamigbola O. M. end Table 2: Summary of te results Order of Continuity C C C 2 C 2 C C Nodal point 4 Elements 8 Elements 4 Elements 8 Elements 4 Elements U() 4 Elements du d Eact......3429. /4.2822.284.2722.843.284 /2.6348.6453.6486.6488.6378.649.6487 3/4 2.24 2.7 2.84 2.3 2.7 2.696 2.729 2.798 2.784 2.72 2.7262 2.783 5/4 3.4847 3.493 3.486 3.4974 3.493 3/2 4.468 4.4766 4.48 4.488 4.479 4.4879 4.487 7/4 5.752 5.7545 5.7533 5.762 5.7546 2 7.389 7.389 7.389 7.389 7.389 7.3934 7.389 4. Conclusion In tis work, finite order basis functions φ i ()[i =, 2, (r + )(n + )] wic are not only continuous but ave in addition, continuous derivatives ave been derived, as an invaluable tool for use in te epansion metods. Computational advantages of te generalized basis are illustrated by te numerical results obtained troug it for a test problem, demonstrating te versatility of te new approimating tool. Equally, we also observed tat te iger te degree of te basis function te more accurate te results. It is indeed an ongoing researc; efforts sall be geared towards presenting results on non-omogeneous and nonlinear differential equation problems. References [] Bamigbola, O. M. and Ibiejugba, M. A. and Onumanyi, P. (988), Higer order cebysev basis functions for two-point boundary value problems, Intl. J. Numer. Metod in Engr.,26, 33-327 [2] Bamigbola, O. M. and Ibiejugba, M. A. (992), A Galerkin weited residual finite element metod for linear differential equations, Jour. of Nig. Mat. Society., 2(3), 49-56 [3] Bamigbola, O. M. (995), A comparison of te computational efficiency of sone quadratic polynomial basis functions in te finite element metod, ABACUS., 25, 23-42 [4] Zienkiewicz, O. C. (976), Finite elements te background story in te Matematics of Finite Elements and Applications, Academic Press, London., 25, 23-42 [5] Ibiejugba, M. A. and Onumanyi, P. and Bamigbola, O.M. (987), A Cebysev Finite element metod for solving differential equations, Nig. Jour. Pure Appl.Sc, 2, 7-85 [6] Le Ti Hoai An and Vaz, A.I.F. and Vicente, L. N. (22), Optimizing D.C. programming and its use in direct searc for global derivatives.free optimization, TOP., 2, 9-24 [7] Bamigbola, O. M. (984), Construction of some new polynomial basis function in C space, University of Ilorin. [8] Devies, L. M. (976), Epansion metods in modern numerical metods for Ordinary differential equations, Calendon Press, Oford [9] Devies, L. M.(98), Te Finite Element; A first approac, Calendon Press, Oford. [] Ibiejugba, M.A. (983), Te Ritz Penalty metod for solving te control of a diffusion equations, Opt. teory and appl., 3, 43-449.
CONSTRUCTION OF POLYNOMIAL BASIS AND ITS APPLICATION... 3 [] Aliu, T. (995), A Legendre Finite element metod for differential equations, University of Ilorin, 43-449. [2] Mitcel, A. R. and Wait, R. (977), Te finite element metod for partial differential equations, Jon Wiley, Cicestert, 43-449 [3] Robert, M. C. and Stepen, M. W. (2), Bernstein Bases are Optimal, but, sometimes Lagrange bases are better, Comp. Appl. Mat., 29(), [4] Doa, E. H. and Brawy, A. H. and Saker, M. A. (2), On te Derivatives of Bernstein Polynomials: Application of Solution of Hig Even-Order Differential Equations, BVP, Comp. Appl. Mat., Article ID 829543, 6 pp [5] Brian, D and Han and Daniel, T. V. (27), Essential MATLAB for Engineers and Scientist, Elsevier.