Two Legendre-Dual-Petrov-Galerkin Algorithms for Solving the Integrated Forms of High Odd-Order Boundary Value Problems

Two numerical algorithms based on dual-Petrov-Galerkin method are developed for solving the integrated forms of high odd-order boundary value problems (BVPs) governed by homogeneous and nonhomogeneous boundary conditions. Two different choices of trial functions and test functions which satisfy the underlying boundary conditions of the differential equations and the dual boundary conditions are used for this purpose. These choices lead to linear systems with specially structured matrices that can be efficiently inverted, hence greatly reducing the cost. The various matrix systems resulting from these discretizations are carefully investigated, especially their complexities and their condition numbers. Numerical results are given to illustrate the efficiency of the proposed algorithms, and some comparisons with some other methods are made.


Introduction
The spectral methods aim to approximate functions (solutions of differential equations) by means of truncated series of orthogonal polynomials. The main feature of spectral methods is to take various orthogonal systems of infinitely differentiable global functions as trial functions. The choice of different trial functions leads to different spectral approximations; for instance, the choice of trigonometric polynomials is suitable for periodic problems, while the choice of Chebyshev, Legendre, ultraspherical and classical Jacobi polynomials is suitable for nonperiodic problems. (see [1][2][3][4][5][6][7]).
Because of being extremely accurate, spectral methods have been intensively studied and successfully applied to numerical simulations in many fields. They have gained new popularity in automatic computations for a wide class of physical problems in fluid and heat flow. Mainly, there are three types of spectral methods, namely, collocation, tau, and Galerkin. The choice of the type of the method depends essentially on the application. Collocation methods are appropriate for studying nonlinear problems or when the problem has complicated coefficients, while Galerkin methods have the advantage of a more convenient analysis and optimal error analysis estimates. The tau method is applicable in the case of complicated (even nonlinear) boundary conditions, where Galerkin approach would be impossible and the collocation is extremely tedious (see [2,5,8]).
For the spectral solutions of odd-order differential equations by direct collocation methods, we obtain condition number of ( 2 ), where is the number of retained modes and is the order of equation. This high condition number will lead to instabilities caused by rounding errors (see [9,10]).
High even-order boundary value problems have been investigated by a large number of authors because of both their mathematical importance and their potential for applications in hydrodynamic and hydromagnetic stability. Therefore, availability of fast and accurate algorithms to solve these equations will allow rapid solutions of many practical problems. Doha and Abd-Elhameed [11] and Doha et al. [12][13][14] have constructed efficient spectral-Galerkin algorithms 2 The Scientific World Journal using compact combinations of orthogonal polynomials for solving second and higher order equations.
Also, the study of odd-order equations is of interest; for example, the third-order equation is of fundamental mathematical interest since it lacks symmetry. Also, it is of physical interest since it contains a type of operator which appears in many commonly occurring partial differential equations such as the Korteweg-de Vries equation. Fifthorder boundary value problems arise in the mathematical modelling of viscoelastic flows (see [15,16]). Some studies are concerned with third-and fifth-order differential equations in finite intervals (see [17,18]). Doha and Abd-Elhameed [19] have constructed efficient spectral-Galerkin algorithms using compact combinations of ultraspherical polynomials for solving the differentiated forms of elliptic equations of (2 + 1)th-order. Recently, Bhrawy and Alghamdi [20], Doha et al. [21][22][23] have analyzed some algorithms for solving numerically the third-and fifth-order differential equations.
The main objective of this paper is to develop some efficient spectral algorithms based on Legendre-dual-Petrov-Galerkin method (LDPGM) for the solution of the integrated forms of high odd-order BVPs in one variable. We present two different choices of appropriate bases for the LDPGM applied to high odd-order BVPs with homogenous and nonhomogenous boundary conditions. All the matrix systems resulted from the application of LDPGM to the integrated forms of (2 + 1)th-order differential equations are band, and then they are cheaper to solve than the systems obtained from the differentiated forms (see Doha and Abd-Elhameed [19]). This motivates our interest for applying LDPGM to the integrated forms of (2 + 1)th-order differential equations.
The remainder of the article is organized as follows. In Section 2, some properties of Legendre polynomials and their shifted ones are given. The main results of this paper are presented in Section 3, in which two numerical algorithms for solving the integrated forms of (2 + 1)th-order elliptic linear differential equations subject to homogeneous boundary conditions using two choices of bases functions are presented and implemented. Also, the same equations but governed by nonhomogeneous boundary conditions are noted in Section 3. For the sake of demonstrating the efficiency and the applicability of our two presented algorithms and also for the sake of comparison between these two algorithms, some numerical results are presented in Section 4. Some concluding remarks are given in Section 5.

Some Properties of Legendre Polynomials
The Legendre polynomials { ( ), = 0, 1, 2, . . .} are a sequence of orthogonal polynomials on the interval (−1, 1); that is, The following special values of ( ) and ( ) = ( ( )/ ) are important in our subsequent work: The following two theorems and two lemmas are also needed hereafter.

Theorem 1.
If the times repeated integration of ( ) is denoted by then ( ) ( ) is given by , , and −1 ( ) is a polynomial of degree at most ( − 1).
Proof. By binomial theorem, we have then, by using relation (6), we get If we expand relation (11) and collect similar terms, then, after some rather algebraic manipulation, relation (8) is obtained. This completes the proof of Lemma 3.
All results of Legendre polynomials can be easily transformed to give the corresponding results for their shifted ones. The orthogonality relation of * ( ) on [ , ] is given by Now, based on relation (14) and with the aid of formula (4), we have the following theorem.

Theorem 5. If the times repeated integration of * ( ) is denoted by
where , , is defined as in (5) and −1 ( ) is a polynomial in of degree ( − 1) at most.

Solution of High Odd-Order BVPs
We are interested in using the LDPGM to solve the two-point high odd-order BVPs 4 The Scientific World Journal governed by the homogeneous boundary conditions where ( ) ( ) = ( ) denotes the th derivative of ( ) with respect to and { , = 0, 1, . . . , 2 } are known constant coefficients.
In this section, we consider two kinds of bases to numerically solve (20) governed by (21) but by considering its integrated form; namely, where and then the LDPGM for solving (20)- (21) or its equivalent integrated form (22) is to find ∈ such that ( ( ) , ( )) where ( , V) = ∫ ( )V( ) is the scalar inner product in the space 2 ( , ). Chebyshev, Legendre, In the following two subsections, we will apply the dual Petrov-Galerkin method to solve (22) based on choosing two kinds of bases functions. These two choices enable one to obtain two linear systems of specially structured matrices that can be efficiently inverted.
We choose the coefficients { , } and { , } such that , ( ) ∈ +2 +1 and , ( ) ∈ +2 +1 , respectively. The boundary conditions The determinant of the above system of linear equations is different from zero; hence, { , } can be uniquely determined to give odd.
The Scientific World Journal 5 Similarly, it can be easily shown that { , } are given by Second, if we replace in (26) by ((2 − − )/( − )), for ≤ ≤ , and if we define then it is obvious that the basis functions and their dual are given, respectively, by where , and , are as given in (28) and (29), respectively. Now it is clear that (25) is equivalent to If we take ≥ 2 +1 in (33), then the constants , 0 ≤ ≤ 2 , would disappear, and then we get = ( ( ) , , ( )) , 2 + 1 ≤ ≤ .
To prove relation (40), we have, for 0 ≤ ≤ 2 , Making use of Theorem 5 enables one to write where , , is defined as in (5) and 2 − is a polynomial in of degree (2 − ) at most. This, with the orthogonality relation (15), yields which completes the proof of Theorem 7.

The Second Choice of Basis Functions.
As a second choice of , ( ) and , ( ), we write which automatically fulfill the boundary conditions (21) and their dual conditions, respectively. The following lemma is of fundamental importance in what follows.

Lemma 8. For arbitrary constants V , one has
Moreover, Proof. The first part of this lemma can be directly proved with the aid of Lemma 4. To prove the second part, we integrate both sides of (50) times, 1 ≤ ≤ 2 + 1, and, after making use of formula (17), we obtain which may be written in the form Now, making use of relation (51) enables one to write , in the form and this completes the proof of Lemma 8.
Substitution of formulae (19), (50), and (52) into (62) yields The constants of integration , 0 ≤ ≤ 2 would disappear if we take ≥ 2 + 1, and therefore the application of the orthogonality relation (15) yields which is equivalent to The system of linear equation (65) in turn may be written in the following matrix form: and this completes the proof of Theorem 9.

Structure and Complexities of the Two Matrix Systems
(36) and (58). The structures of the coefficient matrices , 2 − +1, (0 ≤ ≤ 2 ), , , (1 ≤ ≤ 2 ) and hence the structures of the two combined matrices = + ∑ 2 =0 2 − +1, and = + ∑ 2 +1 =1 2 − +1 , , which appear in the two linear systems (36) and (58), will be discussed in this section. Also, the influence of such structures on the efficiency of the solution of these two matrix systems will be discussed.   With respect to the two matrices and , they are always nonsingular special upper band triangular of bandwidth (4 + 2), ∀ ≥ 1. Therefore, it is worth noting here that the case whichcorresponds to = 0, 0 ≤ ≤ 2 , leads to linear systems with special nonsingular upper triangular matrices. The results for such case are summarized in the following two important corollaries.
where and j are given by (59) and (60), respectively.
Each of the matrices , and , (1 ≤ ≤ 2 + 1) is a band matrix whose total number of nonzero diagonals upper the main diagonal is 4 + + 2, while the total number of nonzero diagonals lower the main diagonal is . Thus, the coefficient matrices = + ∑ 2 +1 =1 2 − +1 , and = + ∑ 2 +1 =1 2 − +1 , are band whose total number of nonzero diagonals upper the main diagonal does not exceed 6 + 3 and the total number of nonzero diagonals lower the main diagonal does not exceed 2 + 1. These special structures of and simplify greatly the solutions of the two linear systems (36) and (58). The two systems in such case can be factorized by -decomposition, and the number of operations necessary to construct this factorization is of order 12( − 2 − 1)(2 + 1) 2 (see Stewart [28]).
The Scientific World Journal 9 3.4. Condition Number. Whenever spectral methods are used for solving the (2 + 1)th-order equations, one should be concerned with round-off errors caused by potentially large condition numbers. However, the LDPGM presented in this paper leads to systems with small condition numbers. For LDPGM, the two linear systems which resulted from the integrated form of the equation ( (2 +1) ( ) = ( )) using the two choices of basis functions are given, respectively, by k = p and k = p * , where the matrices and , ≥ 1 are upper triangular matrices whose diagonal elements are given by (38) and (59), respectively. Thus, for all ≥ 1, we note that the condition number of the matrix behaves like ( ) for large values of , while the condition number of the matrix is independent of . This means that the matrix is well conditioned. Hence, the propagation of round-off errors should not be very significant. Table 1 illustrates the condition numbers for the two matrices and = +∑ 2 +1 =1 2 − +1 , in (36) for some values of the parameter and ( , ) = (−1, 1), while Table 2 illustrates the condition numbers for the two matrices and = + ∑ 2 +1 =1 2 − +1 , in (58) (1 ≤ ≤ 3) for the same values of and in the same interval.

Nonhomogeneous Boundary Conditions.
If we consider the differential equation one can easily show that the differential equation (70) with its nonhomogeneous boundary conditions (71) can be transformed-by using a suitable transformation-to a differential equation governed by homogeneous boundary conditions, but details will not be given here and the interested reader is referred to Doha and Abd-Elhameed [19].

Numerical Results
In this section, we give some numerical results obtained by using the two algorithms presented in the previous sections.
where ( ) is chosen such that the exact solution of (72) is ( ) = (1 − 2 )(1 + ) . Table 3 lists the maximum pointwise error given by | − | to the problem (72) of the given example using LDPGM with exact solution ( ) = (1 − ) . Table 4 lists the maximum pointwise error given by | − | using LDPGM with the two choices of basis functions and for various values of . In Table 5, we give a comparison between the best errors obtained by our two methods (LDPGM-1st choice and LDPGM-2nd choice), quartic spline method (QSM) in [25], and sextic spline method (SSM) in [26]. This table shows that our methods are more accurate if compared with quartic spline method and sextic spline method illustrated in [25,26], respectively. Example 3. Consider the linear ninth-order BVP (see Wazwaz [27]): with theoretical solution ( ) = (1 − ) .
In Table 6, we list the errors given by | − | for Example 3 for = 16 using LDPGM based on the two kinds   [27], the best errors obtained in [27] are listed in column 4 of Table 6. This table shows that our two algorithms are more accurate than the method presented by Wazwaz [27], for the problem considered.

Concluding Remarks
We have presented two numerical spectral algorithms for the solution of high odd-order differential equations based on Legendre-dual-Petrov-Galerkin method. The two presented algorithms are very reliable and efficient. The main advantage of our algorithms is that all the resulting systems are band and this of course simplifies the numerical computational efforts required to solve them. The presented numerical results exhibit the high accuracy and efficiency of the proposed algorithms.