225 American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) ISSN (Print) 2313-4410, ISSN (Online) 2313-4402 Β© Global Society of Scientific Research and Researchers http://asrjetsjournal.org/ Solution of Second Order Linear and Nonlinear Two Point Boundary Value Problems Using Legendre Operational Matrix of Differentiation Abdurkadir Edeo* Bule Hora University, College of Natural and Computational Sciences, Department of Mathematics, Bule Hora 144, Ethiopia Email: edeoabdurkadir@gmail.com Abstract In this paper, an approach using Tau method based on Legendre operational matrix of differentiation [2&5] has been addressed to find the solutions of second order linear and nonlinear two point boundary value problems of ordinary differential equations. In the implementation of this approach, the given second order two point boundary problems is converted into a system of algebraic equations, whose solutions are the Legendre coefficients. The validity and efficiency of the method has also been illustrated with numerical examples supported by graphs. Keywords: Boundary Value Problems (BVPs); Legendre Operational Matrix of Differentiation; Linear and nonlinear ordinary differential equations. 1. Introduction According to [1], second order two point boundary value problems of ordinary differential equations are equations of the form 𝑦𝑦′′ = 𝑓𝑓(π‘₯π‘₯,𝑦𝑦,𝑦𝑦′) , π‘Žπ‘Ž ≀ π‘₯π‘₯ ≀ 𝑏𝑏, With the boundary conditions on the solution prescribed by 𝑦𝑦(π‘Žπ‘Ž) = 𝛼𝛼 , 𝑦𝑦(𝑏𝑏) = 𝛽𝛽, for some constants 𝛼𝛼 and 𝛽𝛽. ------------------------------------------------------------------------ * Corresponding author. http://asrjetsjournal.org/ American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2019) Volume 51, No 1, pp 225-234 226 Second order differential equations with various types of boundary conditions are among many of linear and nonlinear problems occurring in science and engineering which can be solved either analytically or numerically [3]. Second order two point Boundary value problems are encountered in many engineering fields including optimal control, beam deflections, heat flow, and various dynamical systems [4]. In the literature of numerical analysis for solving a two point second order boundary value problem (BVP) of differential equations, many authors have attempted to obtain higher accuracy rapidly by using a numerous methods. Among various numerical techniques, finite difference method has been widely used but it takes more computational costs to get high accuracy [3]. In [4] the author has applied a cubic B-spline method to find the solutions of both linear and nonlinear second order two point BVPs of ordinary differential equations. The authors in [6] have used an extended cubic B-spline method for solving linear two point BVPs. In [7] the authors found the solution of two point boundary value problems using quartic B-spline method. But these B-spline methods require dividing the interval [π‘Žπ‘Ž, 𝑏𝑏] into 𝑛𝑛 subintervals and the construction of cubic or extended cubic B-splines in each subinterval. In addition with these methods we need to solve 𝑛𝑛 + 1 systems of linear or nonlinear equations to arrive at better accuracy. Therefore, like the finite difference method these methods are also computational too cost. In [8] the authors have developed Galerkin method to approximate the solution of second order Neumann and Cauchy linear boundary value problems. The authors in [9] derived a new difference scheme for solving the linear and nonlinear second order two-point boundary value problem by using the quartic spline interpolation and Taylor expansion. Finding the solution of ordinary differential equations numerically is not only concerned with getting better accuracy. It is also concerned with saving computational speed and effort. This paper is therefore aimed at finding the solutions of general second order linear and nonlinear two point boundary value problems of ordinary differential equations of the form: 𝑦𝑦′′(π‘₯π‘₯) + 𝑝𝑝(π‘₯π‘₯)𝑦𝑦′(π‘₯π‘₯) + 𝑓𝑓(π‘₯π‘₯,𝑦𝑦) = 𝑔𝑔(π‘₯π‘₯) , 0 ≀ π‘₯π‘₯ ≀ 1 (1.1) Subject to the boundary conditions: 𝑦𝑦(0) = 𝛼𝛼 , 𝑦𝑦(1) = 𝛽𝛽 (1.2) by using Legendre operational matrix of differentiation. This study is a contribution towards finding the solutions of second order linear and nonlinear two point boundary value problems of ordinary differential equations, by using Tau method based on Legendre operational matrix of differentiation. Even though many authors have attempted to obtain higher accuracy rapidly by using a numerous methods like finite difference method and spline methods such as cubic B-spline method, an extended cubic B-spline method and quartic B-spline method, each of these methods are computational too cost and slow when compared to the present method. Thus, the purpose of this study was to find the solutions of second order linear and nonlinear two point boundary value problems of ordinary differential equations, by using Tau method based on Legendre operational matrix of differentiation. The advantage of this method over the other methods is therefore American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2019) Volume 51, No 1, pp 225-234 227 β€’ It is computational less cost, β€’ It needs less computational time and effort and β€’ It has better accuracy. The remainder of this paper has been organized in the following order and procedures. β€’ In section 2 Legendre polynomial and its operational matrix of differentiation has been discussed. β€’ In section 3 the application of this method has been discussed in brief. β€’ In section 4 this method has been used to solve some numerical examples supported by graphs. β€’ The paper has been concluded and recommended in section 5. 2. Legendre Polynomials and its Operational Matrix of Differentiation Legendre Polynomials are defined on the interval [βˆ’1,1] and can be determined with the aids of the following recurrence formulae [5]. 𝐿𝐿0(𝑧𝑧) = 1 , 𝐿𝐿1(𝑧𝑧) = 𝑧𝑧 πΏπΏπ‘Ÿπ‘Ÿ+1(𝑧𝑧) = 2π‘Ÿπ‘Ÿ+1 π‘Ÿπ‘Ÿ+1 (𝑧𝑧)πΏπΏπ‘Ÿπ‘Ÿ(𝑧𝑧) βˆ’ π‘Ÿπ‘Ÿ π‘Ÿπ‘Ÿ+1 πΏπΏπ‘Ÿπ‘Ÿβˆ’1(𝑧𝑧) ; π‘Ÿπ‘Ÿ = 1,2,3, . . . ( 2.1) In order to use this polynomials on the interval [0, 1], the so-called shifted Legendre Polynomials is defined by introducing 𝑧𝑧 = 2π‘₯π‘₯ βˆ’ 1. Let the shifted Legendre polynomial πΏπΏπ‘Ÿπ‘Ÿ(2π‘₯π‘₯ βˆ’ 1) be denoted by π‘ƒπ‘ƒπ‘Ÿπ‘Ÿ(π‘₯π‘₯). Then π‘ƒπ‘ƒπ‘Ÿπ‘Ÿ(π‘₯π‘₯) can be obtained as follows: 𝑃𝑃0(π‘₯π‘₯) = 1 , 𝑃𝑃1(π‘₯π‘₯) = 2π‘₯π‘₯ βˆ’ 1 π‘ƒπ‘ƒπ‘Ÿπ‘Ÿ+1(π‘₯π‘₯) = 2π‘Ÿπ‘Ÿ+1 π‘Ÿπ‘Ÿ+1 (2π‘₯π‘₯ βˆ’ 1)π‘ƒπ‘ƒπ‘Ÿπ‘Ÿ(π‘₯π‘₯) βˆ’ π‘Ÿπ‘Ÿ π‘Ÿπ‘Ÿ+1 π‘ƒπ‘ƒπ‘Ÿπ‘Ÿβˆ’1(π‘₯π‘₯) ; π‘Ÿπ‘Ÿ = 1,2,3, . . . (2.2) The analytical form of the shifted Legendre polynomial π‘ƒπ‘ƒπ‘Ÿπ‘Ÿ(π‘₯π‘₯) of degree r is given by; π‘ƒπ‘ƒπ‘Ÿπ‘Ÿ(π‘₯π‘₯) = βˆ‘ (βˆ’1)π‘Ÿπ‘Ÿ+π‘˜π‘˜π‘Ÿπ‘Ÿ π‘˜π‘˜=0 (π‘Ÿπ‘Ÿ+π‘˜π‘˜)! (π‘Ÿπ‘Ÿβˆ’π‘˜π‘˜)! π‘₯π‘₯π‘˜π‘˜ (π‘˜π‘˜!)2 (2.3) NB: π‘ƒπ‘ƒπ‘Ÿπ‘Ÿ(0) = (βˆ’1)π‘Ÿπ‘Ÿ and π‘ƒπ‘ƒπ‘Ÿπ‘Ÿ(1) = 1 The orthogonality condition for these shifted Legendre polynomials is: ∫ π‘ƒπ‘ƒπ‘Ÿπ‘Ÿ(π‘₯π‘₯)𝑃𝑃𝑠𝑠(π‘₯π‘₯)1 0 𝑑𝑑π‘₯π‘₯ = οΏ½ 1 2π‘Ÿπ‘Ÿ+1 π‘“π‘“π‘“π‘“π‘Ÿπ‘Ÿ π‘Ÿπ‘Ÿ = 𝑠𝑠 0 π‘“π‘“π‘“π‘“π‘Ÿπ‘Ÿ π‘Ÿπ‘Ÿ β‰  𝑠𝑠 (2.4) Any function 𝑦𝑦(π‘₯π‘₯) ∈ 𝐿𝐿2[0,1] can be approximated in terms of π‘ƒπ‘ƒπ‘Ÿπ‘Ÿ(π‘₯π‘₯) by: 𝑦𝑦�(π‘₯π‘₯) = βˆ‘ π‘π‘π‘Ÿπ‘Ÿπ‘ƒπ‘ƒπ‘Ÿπ‘Ÿ(π‘₯π‘₯)∞ π‘Ÿπ‘Ÿ=0 (2.5) American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2019) Volume 51, No 1, pp 225-234 228 Where the coefficients π‘π‘π‘Ÿπ‘Ÿ are given by π‘π‘π‘Ÿπ‘Ÿ = (2π‘Ÿπ‘Ÿ + 1)∫ 𝑦𝑦(π‘₯π‘₯)1 0 π‘ƒπ‘ƒπ‘Ÿπ‘Ÿ(π‘₯π‘₯)𝑑𝑑π‘₯π‘₯ ; π‘Ÿπ‘Ÿ = 1,2,3, . . . (2.6) By considering only the first π‘šπ‘š + 1 terms of the series (2.5) we get; π‘¦π‘¦π‘šπ‘š(π‘₯π‘₯) = βˆ‘ π‘π‘π‘Ÿπ‘Ÿπ‘ƒπ‘ƒπ‘Ÿπ‘Ÿ(π‘₯π‘₯)π‘šπ‘š π‘Ÿπ‘Ÿ=0 = πΆπΆπ‘‡π‘‡πœ‘πœ‘(π‘₯π‘₯) (2.7) Where 𝐢𝐢𝑇𝑇 = [𝑐𝑐0, 𝑐𝑐1, . . . , π‘π‘π‘šπ‘š] is the shifted Legendre coefficient and πœ‘πœ‘(π‘₯π‘₯) = [𝑝𝑝0(π‘₯π‘₯), 𝑝𝑝1(π‘₯π‘₯), … , π‘π‘π‘šπ‘š(π‘₯π‘₯)]𝑇𝑇 is the shifted Legendre vector. The derivative of the vector πœ‘πœ‘(π‘₯π‘₯) can be expressed as: 𝑑𝑑𝑑𝑑(π‘₯π‘₯) 𝑑𝑑π‘₯π‘₯ = 𝐷𝐷(1)πœ‘πœ‘(π‘₯π‘₯) (2.8) Where 𝐷𝐷(1) is (π‘šπ‘š + 1) Γ— (π‘šπ‘š + 1) operational matrix of derivative which is given by 𝐷𝐷(1) = �𝑑𝑑𝑖𝑖𝑖𝑖�=οΏ½ 2(2𝑗𝑗 + 1) π‘“π‘“π‘“π‘“π‘Ÿπ‘Ÿ 𝑗𝑗 = 𝑖𝑖 βˆ’ π‘˜π‘˜ 0 π‘“π‘“π‘œπ‘œβ„Žπ‘’π‘’π‘Ÿπ‘Ÿπ‘’π‘’π‘–π‘–π‘ π‘ π‘’π‘’ ; οΏ½ π‘˜π‘˜ = 1,3, … ,π‘šπ‘š 𝑖𝑖𝑓𝑓 π‘šπ‘š 𝑖𝑖𝑠𝑠 𝑓𝑓𝑑𝑑𝑑𝑑 π‘˜π‘˜ = 1,3, … ,π‘šπ‘šβˆ’ 1 𝑖𝑖𝑓𝑓 π‘šπ‘š 𝑖𝑖𝑠𝑠 𝑒𝑒𝑒𝑒𝑒𝑒𝑛𝑛 For example for π‘šπ‘š even we have; 𝐷𝐷(1) = 2 ⎝ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ βŽ› 0 0 0 0 ... 0 0 0 1 0 0 0 ... 0 0 0 0 3 0 0 ... 0 0 0 1 0 5 0 ... 0 0 0 . . . . ... . . . 1 0 5 0 ... 0 0 0 3 0 7 ... 0 0 Ο„ Ο‰ ⎠ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎞ Where 𝜏𝜏 = 2π‘šπ‘š βˆ’ 3,πœ”πœ” = 2π‘šπ‘š βˆ’ 1 (2.9) From equation (2.8) it can be generalized for any 𝑛𝑛 ∈ 𝑁𝑁 as: 𝑑𝑑𝑛𝑛𝑑𝑑(π‘₯π‘₯) 𝑑𝑑π‘₯π‘₯𝑛𝑛 = (𝐷𝐷(1))π‘›π‘›πœ‘πœ‘(π‘₯π‘₯) = 𝐷𝐷(𝑛𝑛)πœ‘πœ‘(π‘₯π‘₯) ,𝑛𝑛 = 1, 2, 3, … (2.10) Where, (𝐷𝐷(1))𝑛𝑛 denotes matrix powers. 3. Methods and Materials Consider the general second order two point boundary value problem of ordinary differential equation American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2019) Volume 51, No 1, pp 225-234 229 𝑦𝑦′′(π‘₯π‘₯) + 𝑝𝑝(π‘₯π‘₯)𝑦𝑦′(π‘₯π‘₯) + 𝑓𝑓(π‘₯π‘₯,𝑦𝑦) = 𝑔𝑔(π‘₯π‘₯) , 0 ≀ π‘₯π‘₯ ≀ 1 Subject to the boundary conditions: 𝑦𝑦(0) = 𝛼𝛼 ,𝑦𝑦(1) = 𝛽𝛽 As in [2], let us approximate 𝑦𝑦(π‘₯π‘₯), 𝑝𝑝(π‘₯π‘₯), 𝑓𝑓(π‘₯π‘₯,𝑦𝑦) and 𝑔𝑔(π‘₯π‘₯) by the shifted Legendre polynomials as 𝑦𝑦(π‘₯π‘₯) = βˆ‘ π‘π‘π‘Ÿπ‘Ÿπ‘ƒπ‘ƒπ‘Ÿπ‘Ÿ(π‘₯π‘₯)π‘šπ‘š π‘Ÿπ‘Ÿ=0 = πΆπΆπ‘‡π‘‡πœ‘πœ‘(π‘₯π‘₯), (3.1) 𝑝𝑝(π‘₯π‘₯) = βˆ‘ π‘π‘π‘Ÿπ‘Ÿπ‘ƒπ‘ƒπ‘Ÿπ‘Ÿ(π‘₯π‘₯)π‘šπ‘š π‘Ÿπ‘Ÿ=0 = π‘ƒπ‘ƒπ‘‡π‘‡πœ‘πœ‘(π‘₯π‘₯) , (3.2) 𝑓𝑓(π‘₯π‘₯,𝑦𝑦) = 𝑓𝑓(π‘₯π‘₯,πΆπΆπ‘‡π‘‡πœ‘πœ‘(π‘₯π‘₯)), (3.3) 𝑔𝑔(π‘₯π‘₯) = βˆ‘ π‘”π‘”π‘Ÿπ‘Ÿπ‘ƒπ‘ƒπ‘Ÿπ‘Ÿ(π‘₯π‘₯)π‘šπ‘š π‘Ÿπ‘Ÿ=0 = πΊπΊπ‘‡π‘‡πœ‘πœ‘(π‘₯π‘₯) (3.4) Where the unknowns are 𝐢𝐢 = [𝑐𝑐0, 𝑐𝑐1, . . . , π‘π‘π‘šπ‘š]𝑇𝑇 Using Legendre operational matrix of differentiation, equation (1.1) can be written as 𝐢𝐢𝑇𝑇𝐷𝐷2πœ‘πœ‘(π‘₯π‘₯) + 𝑃𝑃𝑇𝑇𝐷𝐷1πœ‘πœ‘(π‘₯π‘₯) + 𝑓𝑓(π‘₯π‘₯,πΆπΆπ‘‡π‘‡πœ‘πœ‘(π‘₯π‘₯)) β‰ˆ πΊπΊπ‘‡π‘‡πœ‘πœ‘(π‘₯π‘₯) (3.5) The residual π‘…π‘…π‘šπ‘š(π‘₯π‘₯) for equation (3.5) can be written as π‘…π‘…π‘šπ‘š(π‘₯π‘₯) = 𝐢𝐢𝑇𝑇𝐷𝐷2πœ‘πœ‘(π‘₯π‘₯) + 𝑃𝑃𝑇𝑇𝐷𝐷1πœ‘πœ‘(π‘₯π‘₯) + 𝑓𝑓�π‘₯π‘₯,πΆπΆπ‘‡π‘‡πœ‘πœ‘(π‘₯π‘₯)οΏ½ βˆ’ πΊπΊπ‘‡π‘‡πœ‘πœ‘(π‘₯π‘₯) (3.6) Applying typical Tau method, which is used in the sense of particular form of the Petrov-Galerkin method as cited in [2], [5], equation (3.5) can be transformed into π‘šπ‘š βˆ’ 1 linear or nonlinear equations by applying βŒ©π‘…π‘…π‘šπ‘š(π‘₯π‘₯),π‘ƒπ‘ƒπ‘Ÿπ‘Ÿ(π‘₯π‘₯)βŒͺ = ∫ π‘…π‘…π‘šπ‘š(π‘₯π‘₯)π‘ƒπ‘ƒπ‘Ÿπ‘Ÿ(π‘₯π‘₯)1 0 𝑑𝑑π‘₯π‘₯ = 0; π‘Ÿπ‘Ÿ = 0,1,2, . . . ,π‘šπ‘š βˆ’ 2 (3.7) The boundary conditions are given by 𝑦𝑦(0) = πΆπΆπ‘‡π‘‡πœ‘πœ‘(0) = 𝑑𝑑0 , 𝑦𝑦(1) = πΆπΆπ‘‡π‘‡πœ‘πœ‘(1) = 𝑑𝑑1 (3.8) Equations (3.7) and (3.8) generate π‘šπ‘š + 1 linear or nonlinear systems of algebraic equations. After solving these equations we obtain the unknowns in vector 𝐢𝐢 and use them to find 𝑦𝑦�(π‘₯π‘₯). 4. Numerical Examples Example 1: Consider the second order boundary value problem 𝑦𝑦′′ + 𝑦𝑦′ = π‘₯π‘₯ (4.1) American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2019) Volume 51, No 1, pp 225-234 230 With boundary conditions 𝑦𝑦(0) = 0 , 𝑦𝑦(1) = 1 (4.2) The exact solution is 𝑦𝑦(π‘₯π‘₯) = π‘₯π‘₯ Substituting equations (4.2) in equation (2.7) we get 𝑐𝑐0 βˆ’ 𝑐𝑐1 + 𝑐𝑐2 = 0 𝑐𝑐0 + 𝑐𝑐1 + 𝑐𝑐2 = 1 (4.3) For π‘šπ‘š = 2 from equation (3.7) we get 𝑐𝑐1 + 13𝑐𝑐2 = 1 2 (4.4) Solving a 3 Γ— 3 system of algebraic equations (4.3) and (4.4) to gives 𝑐𝑐0 = 1 2 , 𝑐𝑐1 = 1 2 and 𝑐𝑐2 = 0 Thus the approximate solution is now becomes 𝑦𝑦�(π‘₯π‘₯) = π‘₯π‘₯ which is the exact solution. Figure 1: Graphical illustration of example 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 x y Comparison with different models Exact solution approximate solution with current method approximate solution with FDM error with current method error with FDM American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2019) Volume 51, No 1, pp 225-234 231 Example 2: Consider the second order boundary value problem 𝑦𝑦′′ + 𝑦𝑦′ + πœ‹πœ‹2𝑦𝑦 = βˆ’πœ‹πœ‹sin (πœ‹πœ‹π‘₯π‘₯) , (4.5) With boundary conditions 𝑦𝑦(0) = 1 , 𝑦𝑦(1) = βˆ’1 (4.6) The exact solution is 𝑦𝑦(π‘₯π‘₯) = cos (πœ‹πœ‹π‘₯π‘₯) Substituting equations (4.6) in equation (2.7) we get 𝑐𝑐0 βˆ’ 𝑐𝑐1 + 𝑐𝑐2 = 1 𝑐𝑐0 + 𝑐𝑐1 + 𝑐𝑐2 = βˆ’1 (4.7) For π‘šπ‘š = 2 from equation (3.7) we get πœ‹πœ‹2𝑐𝑐0 + 2𝑐𝑐1 + 12𝑐𝑐2 = βˆ’2 (4.8) Solving a 3 Γ— 3 system of algebraic equations (4.7) and (4.8) to gives 𝑐𝑐0 = 0 , 𝑐𝑐1 = βˆ’1 and 𝑐𝑐2 = 0 Thus the approximate solution is now becomes 𝑦𝑦�(π‘₯π‘₯) = βˆ’2π‘₯π‘₯ + 1 Figure 2: Graphical illustration of example 2 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 x y Comparison with different models Exact solution approximate solution with current method approximate solution with FDM error with current method error with FDM American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2019) Volume 51, No 1, pp 225-234 232 Example 3: Consider the boundary value problem [4] 𝑦𝑦′′ + 𝑦𝑦2 = π‘₯π‘₯4 + 2 , (4.9) With boundary conditions 𝑦𝑦(0) = 0 ,𝑦𝑦(1) = 1 (4.10) The exact solution is 𝑦𝑦(π‘₯π‘₯) = x2 Substituting equations (4.10) in equation (2.7) we get 𝑐𝑐0 βˆ’ 𝑐𝑐1 + 𝑐𝑐2 = 0 𝑐𝑐0 + 𝑐𝑐1 + 𝑐𝑐2 = 1 (4.11) For π‘šπ‘š = 2 from equation (3.7) we get 𝑐𝑐02 + 1 3 𝑐𝑐12 + 1 5 𝑐𝑐22 + 12𝑐𝑐2 = 11 5 (4.12) Solving a 3 Γ— 3 system of algebraic equations (4.11) and (4.12) gives 𝑐𝑐0 = 1 3 , 𝑐𝑐1 = 1 2 and 𝑐𝑐2 = 1 6 Hence the approximate solution is now becomes 𝑦𝑦�(π‘₯π‘₯) = x2 which is the exact solution. Figure 3: Graphical illustration of example 3 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 x y Comparison with current model Exact solution approximate solution with current method error with current method American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2019) Volume 51, No 1, pp 225-234 233 Example 4: Consider the boundary value problem 𝑦𝑦′′ + ln π‘₯π‘₯𝑦𝑦′ + 𝑦𝑦2 = 2 + 2π‘₯π‘₯ ln π‘₯π‘₯ + π‘₯π‘₯4, (4.13) With boundary conditions 𝑦𝑦(0) = 0 , 𝑦𝑦(1) = 1 (4.14) The exact solution is 𝑦𝑦(π‘₯π‘₯) = x2 Substituting equations (4.14) in equation (2.7) we get 𝑐𝑐0 βˆ’ 𝑐𝑐1 + 𝑐𝑐2 = 0 𝑐𝑐0 + 𝑐𝑐1 + 𝑐𝑐2 = 1 (4.15) For π‘šπ‘š = 2 from equation (3.7) we get 𝑐𝑐02 + 1 3 𝑐𝑐12 + 1 5 𝑐𝑐22 βˆ’ 2𝑐𝑐1 + 15𝑐𝑐2 = 17 10 (4.16) Solving a 3 Γ— 3 system of algebraic equations (4.15) and (4.16) gives 𝑐𝑐0 = 1 3 , 𝑐𝑐1 = 1 2 and 𝑐𝑐2 = 1 6 Hence the approximate solution is now becomes 𝑦𝑦�(π‘₯π‘₯) = x2 which is the exact solution. Figure 4: Graphical illustration of example 4 5. Conclusion and Recommendations For problems in examples 1,3 & 4 where the exact solution are polynomials, the method produces the exact solution itself by just taking π‘šπ‘š = 2, and using only first few shifted Legendre polynomials. This makes the method more accurate than others. For problem in example 2, where the exact solution is not polynomial a 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 x y Comparison with current model Exact solution approximate solution with current method error with current method American Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2019) Volume 51, No 1, pp 225-234 234 better approximation to the exact solution is found when compared to the finite difference method. The other advantage of this method over the other methods like spline methods and finite difference method is that it needs less computational time and effort. In the feature, the method can be extended to find the solutions of second order linear and nonlinear two point boundary value problems of partial differential equations. Acknowledgements The author would like to express his sincere gratitude to the anonymous referees for their exciting comments which helped him in improving this manuscript significantly. He is also thankful to the previous authors since their efforts have been used as references in the study. References [1] J. Douglas Faires & Richard L.Burden.β€œNumerical Methods.” Brooks Cole, Third Edition, June 18, 2002. [2] Chahn Yong Jung, Zeqing Liu, Arif Rafiq, Faisal Ali,& Shin Min Kang. β€œSolution of Second Order Linear and Nonlinear Ordinary Differential Equations Using Legendre Operational Matrix of Differentiation.” International Journal of Pure and Applied Mathematics. Volume 93 No. 2 2014. [3] Md. Shafiqul Islam, Afroza Shirin.β€œNumerical Solutions of a Class of Second Order Boundary Value Problems on Using Bernoulli Polynomials.” Applied Mathematics, 2, pp.1059-1067,2011. [4] Yogesh Gupta.β€œA Numerical Algorithm for Solution of Boundary Value Problems with Applications.” International Journal of Computer Applications. Volume 40, No.8, February 2012. [5] Abbas Saadatmandi, Mehdi Dehghan. β€œA New Operational Matrix for Solving Fractional-Order Differential Equations.” Computers and Mathematics with Applications 59, pp. 1326-1336, 2010. [6] Nur Nadiah Abd Hamid, Ahmad Abd. Majid & Ahmad Izani Md. Ismail. β€œExtended Cubic B-Spline Method for Linear Two-Point Boundary Value Problems.” Sains Malaysiana 40(11), pp.1285–1290, 2011. [7] J. Rashidinia and Sh. Sharif. β€œB-Spline Method for Two-Point Boundary Value Problems.” International Journal of Mathematical Modelling & Computations. Vol. 05, No. 02, pp. 111- 125, Spring 2015. [8] M. M. Rahman, M.A. Hossen, M. Nurul Islam and Md. Shajib Ali. β€œNumerical Solutions of Second Order Boundary Value Problems by Galerkin Method with Hermite Polynomials.” Annals of Pure and Applied Mathematics. Vol. 1, No. 2, pp.138-148, 2012. [9] Li-Bin Liu, Huan-Wen Liu, Yanping Chen. β€œPolynomial spline approach for solving second-order boundary-value problems with Neumann conditions.” Applied Mathematics and Computation 217, pp.6872–6882, 2011.