# Numerical Solutions of Odd Order Linear and Nonlinear Initial Value Problems Using a Shifted Jacobi Spectral Approximations

Authors: A. H. Bhrawy; M. A. Alghamdi
Journal: Abstract and Applied Analysis
 (2012)

---

## Abstract

A shifted Jacobi Galerkin method is introduced to get a direct solution technique for solving the third- and fifth-order differential equations with constant coefficients subject to initial conditions. The key to the efficiency of these algorithms is to construct appropriate base functions, which lead to systems with specially structured matrices that can be efficiently inverted. A quadrature Galerkin method is introduced for the numerical solution of these problems with variable coefficients. A new shifted Jacobi collocation method based on basis functions satisfying the initial conditions is presented for solving nonlinear initial value problems. Through several numerical examples, we evaluate the accuracy and performance of the proposed algorithms. The algorithms are easy to implement and yield very accurate results.


---

## Body

## 1. Introduction

The spectral methods are preferable in numerical solutions of ordinary and partial differential equations due to their high-order accuracy whenever they work [1–3]. Standard spectral and collocation methods have been extensively investigated for solving second- and fourth-order differential equations. In a sequence of papers [4–11], the authors have constructed efficient spectral-Galerkin algorithms for second-, fourth-, and 2nth-order differential equations subject to various boundary conditions.The problem of approximating solutions of differential equations by Galerkin approximations involves the projection onto the span of some appropriate set of basis functions. The member of the basis may satisfy automatically the auxiliary conditions imposed on the problem, such as initial, boundary, or more general conditions. Alternatively, these conditions may be imposed as constraints on the expansions coefficients, as in the Lanczos tau-method [12–14].It is of fundamental importance to know that the choice of the basis functions is responsible for the superior approximation properties of spectral methods when compared with the finite difference and finite element methods. The choice of different basis functions lead to different spectral approximations; for instance, trigonometric polynomials for periodic problems, Chebyshev, Legendre, ultraspherical, and Jacobi polynomials for nonperiodic problems, Laguerre polynomials for problems on half line, and Hermite polynomials for problems on the whole line.The main aim of this paper is the design of appropriate shifted Jacobi basis (with parametersα and β) that are well suited for the approximations of the third- and fifth-order differential equations subject to initial conditions. In general, the use of Jacobi polynomials (Pn(α,β) with α, β∈(-1,∞) and n is the polynomial degree) has the advantage of obtaining the solutions of differential equations in terms of the Jacobi indexes α and β (see for instance, [15–19]).This paper is concerned with the systematic development of spectral basis functions for the efficient solution of some odd-order differential equations. Starting from Jacobi polynomialsPn(α,β)(x). Galerkin approximations to these problems are built. We derived some interesting results, such as useful relationships between the representation of a polynomial function in a given basis and those for its derivative in the same basis, or formulas to compute discrete operator coefficients in closed form. In this paper, we present a direct solvers based on the shifted Jacobi Galerkin (SJG) method for solving the third- and fifth-order differential equations, the basis functions are constructed to satisfy the given initial conditions, and each of these basis functions have been written as a compact combinations of shifted Jacobi polynomials.For the third- and fifth-order differential equations with variable coefficients, we introduce the pseudospectral shifted Jacobi Galerkin (P-SJG) method. This method is basically formulated in the shifted Jacobi Galerkin spectral form with general indexesα, β>-1, but the variable coefficients terms and the right hand side being treated by the shifted Jacobi collocation method with the same indexes α, β>-1 so that the schemes can be implemented at shifted Jacobi-Gauss points efficiently.The last aim of this paper is to propose a suitable way to approximate the nonlinear third- and fifth-order differential equations by convenient spectral collocation method-based on shifted Jacobi basis functions (the member of the basis may satisfy automatically the auxiliary initial conditions imposed on the problem) such that it can be implemented efficiently at shifted Jacobi-Gauss points on the interval(0,L). We propose a new spectral shifted Jacobi collocation (SJC) method to find the solution uN(x). The nonlinear ODE is collocated at the (N+1) points. For suitable collocation points, we use the (N+1) nodes of the shifted Jacobi-Gauss interpolation on (0,L). These equations generate (N+1) nonlinear algebraic equations which can be solved using Newton's iterative method. Finally, the accuracy of the proposed methods is demonstrated by test problems. Numerical results are presented in which the usual exponential convergence behaviour of spectral approximations is exhibited.The remainder of this paper is organized as follows. Sections2 and 3 are devoted to the theoretical derivation of the SJG and P-SJG methods for third-order differential equations with constant and variable coefficients subject to homogeneous and nonhomogeneous initial conditions. In Section 4, we apply the SJC method-based on basis functions for solving nonlinear third-order differential equations. Section 5 gives the corresponding results for those obtained in Sections 2, 3, and 4, but for the fifth-order differential equations. In Section 6, we present some numerical results exhibiting the accuracy and efficiency of our numerical algorithms.


## 2. SJG Method for Third-Order Differential Equations with Constant Coefficients

Letw(α,β)(x)=(1-x)α(1+x)β, then we define the weighted space Lw(α,β)2(-1,1) as usual, equipped with the following inner product and norm,
(2.1)(u,v)w(α,β)=∫-11∫‍u(x)v(x)w(α,β)(x)dx,∥v∥w(α,β)=(v,v)w(α,β)1/2.
The set of Jacobi polynomials forms a complete Lwα,β2(-1,1)-orthogonal system, and
(2.2)∥Pk(α,β)∥w(α,β)2=hk(α,β)=2α+β+1Γ(k+α+1)Γ(k+β+1)(2k+α+β+1)Γ(k+1)Γ(k+α+β+1).If we define the shifted Jacobi polynomial of degreek by PL,k(α,β)(x)=Pk(α,β)(2x/L-1), L>0, and in virtue of properties of Jacobi polynomials [14, 19], then it can be easily shown that
(2.3)PL,k(α,β)(0)=(-1)kΓ(k+β+1)Γ(β+1)k!,(2.4)DqPL,k(α,β)(0)=(-1)k-qΓ(k+β+1)(k+α+β+1)qLqΓ(k-q+1)Γ(q+β+1).Next, letwL(α,β)(x)=(L-x)αxβ, then we define the weighted space LwL(α,β)2(0,L) in the usual way, with the following inner product and norm,
(2.5)(u,v)wL(α,β)=∫0Lu(x)v(x)wL(α,β)(x)dx,∥v∥wL(α,β)=(v,v)wL(α,β)1/2.The set of shifted Jacobi polynomials forms a completeLwL(α,β)2(0,L)-orthogonal system. Moreover, and due to (2.2), we have
(2.6)∥PL,k(α,β)∥wL(α,β)2=(L2)α+β+1hk(α,β)=hL,k(α,β).Theqth derivative of shifted Jacobi polynomial can be written in terms of the shifted Jacobi polynomials themselves as
(2.7)DqPL,k(α,β)(x)=∑i=0k-q‍Cq(k,i,α,β)PL,i(α,β)(x),
where
(2.8)Cq(k,i,α,β)=(k+λ)q(k+λ+q)i(i+α+q+1)k-i-qΓ(i+λ)Lq(k-i-q)!Γ(2i+λ)×3F2(-k+i+q,k+i+λ+q,i+α+1;1i+α+q+1,2i+λ+1),
for the proof, see [20, 21] and for the general definition of a generalized hypergeometric series and special 3F2, (see [22, pages 41, 103-104], resp.).We are interested in using the SJG method to solve the third-order differential equation:(2.9)u′′′+γ1u′′+γ2u′+γ3u=f(x),inI=(0,L),
subject to
(2.10)u(0)=u′(0)=u′′(0)=0,
where γ1, γ2, and γ3 are constants, and f(x) is a given source function. Let us first introduce some basic notation that will be used in the upcoming sections. We set
(2.11)SN(0,L)=span{PL,0(α,β)(x),PL,1(α,β)(x),…,PL,N(α,β)(x)},WN={vN∈SN(0,L):u(0)=u′(0)=u′′(0)=0}.
Then the shifted Jacobi-Galerkin approximation to (2.9) is, to find uN∈WN such that
(2.12)(uN′′′,vN)wL(α,β)+γ1(uN′′,vN)wL(α,β)+γ2(uN′,vN)wL(α,β)+γ3(uN,vN)wL(α,β)=(f,vN)wL(α,β),∀vN∈WN,
where wL(α,β)(x)=(L-x)αxβ and (u,v)wL(α,β)=∫I‍uvwLα,βdx is the inner product in the weighted space LwL(α,β)2(I). The norm in LwL(α,β)2(I) will be denoted by ∥·∥wL(α,β).We choose compact combinations of shifted Jacobi polynomials as basis functions aiming to minimize the bandwidth and the condition number of the coefficient matrix corresponding to (2.9). We choose the basis functions of expansion ϕk(x) to be of the form:
(2.13)ϕk(x)=ξk[PL,k(α,β)(x)+ϵkPL,k+1(α,β)(x)+εkPL,k+2(α,β)(x)+ζkPL,k+3(α,β)(x)],
where ξk=k!Γ(α+1)/Γ(k+α+1), ϵk, εk, and ζk are the unique constants such that ϕk(x)∈WN, for all k=0,1,…,N-3. From the initial conditions; ϕk(0)=ϕk′(0)=ϕk′′(0)=0 and making use of (2.3) and (2.4), we have the following system:
(2.14)-ϵk(k+β+1)(k+1)+ϵk(k+β+1)2(k+1)2-ζk(k+β+1)3(k+1)3=-1,(2.15)ϵk(k+λ+1)(k+β+1)k-εk(k+λ+2)(k+β+1)2k(k+1)+ζk(k+λ+3)(k+β+1)3k(k+1)2=(k+λ),(2.16)-ϵk(k+λ+1)2(k+β+1)(k-1)+εk(k+λ+2)2(k+β+1)2k(k-1)-ζk(k+λ+3)2(k+β+1)3(k+1)k(k-1)=-(k+λ)2.
Hence ϵk, εk, and ζk can be uniquely determined to give
(2.17)ϵk=3(k+1)(2k+λ+2)(k+β+1)(2k+λ+4),εk=3(k+1)2(2k+λ+1)(k+β+1)2(2k+λ+5),ζk=(k+1)3(2k+λ+1)2(k+β+1)3(2k+λ+4)2.
It is clear that the basis functions ϕk(x)∈Wk+3, k=0,1,2,…,N-3, are linearly independent. Therefore, by dimension argument and for N≥3, we have
(2.18)WN=span{ϕk(x):k=0,1,2,…,N-3}.Now, it is clear that the variational formulation of (2.12) is equivalent to
(2.19)(uN′′′,ϕk(x))wL(α,β)+γ1(uN′′,ϕk(x))wL(α,β)+γ2(uN′,ϕk(x))wL(α,β)+γ3(uN,ϕk(x))wL(α,β)=(f,ϕk(x))wT(α,β),k=0,1,…,N-3.
Let us denote
(2.20)fk=(f,ϕk(x))wL(α,β),f=(f0,f1,…,fN-3)T,uN(x)=∑n=0N-3‍anϕn(x),a=(a0,a1,…,aN-3)T,A=(akj),B=(bkj),C=(ckj),D=(dkj),0≤k,j≤N-3.
Then, equation (2.19) is equivalent to the following matrix equation:
(2.21)(A+γ1B+γ2C+γ3D)a=f,
where the nonzero elements of the matrices A, B, C, and D are given explicitly in the following theorem.Theorem 2.1.
If one takesϕk(x) as defined in (2.13), and if we denote akj=(ϕj′′′(x),ϕk(x))wL(α,β), bkj=(ϕj′′(x),ϕk(x))wL(α,β), ckj=(ϕj′(x),ϕk(x))wL(α,β), and dkj=(ϕj(x),ϕk(x))wL(α,β). Then the nonzero elements akj,bkj,ckj, and dkj for 0≤k, j≤N-3 are given as follows:
(2.22)akk=Lα+β-2(2k+λ+1)3(2k+λ+1)2Γ(k+4)(Γ(α+1))2Γ(k+β+1)(k+β+1)3Γ(k+α+1)Γ(k+λ+3),akj=ξkξj[O3(j,k,α,β)hL,k(α,β)+O3(j,k+1,α,β)ϵkhL,k+1(α,β)+O3(j,k+2,α,β)εkhL,k+2(α,β)O.3++O3(j,k+3,α,β)ζkhL,k+3(α,β)],j=k+n,n≥1,bk+1,k=ξkξk+1ζkC2(k+3,k+1,α,β)hL,k+1(α,β),bkk=ξk2[(εkC2(k+2,k,α,β)+ζkC2(k+3,k,α,β))hL,k(α,β)1.1+ζkϵkC2(k+3,k+1,α,β)hL,k+1(α,β)],bkj=ξkξj[O2(j,k,α,β)hL,k(α,β)+O2(j,k+1,α,β)ϵkhL,k+1(α,β)+O2(j,k+2,α,β)εkhL,k+2(α,β)k1.α,+O2(j,k+3,α,β)ζkhL,k+3(α,β)],j=k+n,n≥1,ck+2,k=ξkξk+2ζkC1(k+3,k+2,α,β)hL,k+2(α,β),ck+1,k=ξkξk+1[(εkC1(k+2,k+1,α,β)+ζkC1(k+3,k+1,α,β))hL,k+1(α,β)k+1++ζkϵk+1C1(k+3,k+2,α,β)hL,k+2(α,β)],ckk=ξk2[(ϵkC1(k+1,k,α,β)+εkC1(k+2,k,α,β)+ζkC1(k+3,k,α,β))hL,k(α,β)k++ϵk(εkC1(k+2,k+1,α,β)+ζkC1(k+3,k+1,α,β))hL,k+1(α,β)k++ζkεkC1(k+3,k+2,α,β)hL,k+2(α,β)],ckj=ξkξj[O1(j,k,α,β)hL,k(α,β)+O1(j,k+1,α,β)ϵkhL,k+1(α,β)+O1(j,k+2,α,β)εkhL,k+2(α,β)j,k++O1(j,k+3,α,β)ζkhL,k+3(α,β)],j=k+n,n≥1,dkk=ξk2[hL,k(α,β)+ϵk2hL,k+1(α,β)+εk2hL,k+2(α,β)+ζk2hL,k+3(α,β)],dk+1,k=dk,k+1=ξkξk+1[ϵkhL,k+1(α,β)+ϵk+1εkhL,k+2(α,β)+εk+1ζkhL,k+3(α,β)],dk+2,k=dk,k+2=ξkξk+2[εkhL,k+2(α,β)+ϵk+2ζkhL,k+3(α,β)],dk+3,k=dk,k+3=ξkξk+3ζkhL,k+3(α,β),
where
(2.23)Oi(j,k,α,β)=Ci(j,k,α,β)+ϵjCi(j+1,k,α,β)+εjCi(j+2,k,α,β)+ζjCi(j+3,k,α,β).Proof.
The basis functionsϕk(x) are chosen such that ϕk(x)∈WN for k=0,1,…,N-3. On the other hand, it is clear that {ϕk(x)} are linearly independent and the dimension of WN is equal to (N-2). The nonzero elements (akj) for 0⩽k, j⩽N-3 can be obtained by direct computations using the properties of shifted Jacobi polynomials. It can be easily proved that the diagonal elements of the matrix A take the form:
(2.24)akk=ξk2ζkC3(k+3,k,α,β)hL,k(α,β).
It can be easily shown, that all other formulae can be obtained by direct computations using the properties of shifted Jacobi polynomials.All the formulae can be obtained by direct computations using the properties of shifted Jacobi polynomials. In particular, the special cases for shifted Chebyshev basis of the first and second kinds may be obtained directly by takingα=β=-1/2 and α=β=1/2, respectively, and for shifted Legendre basis by taking α=β=0. These are given as corollaries to the previous theorem as follows.Corollary 2.2.
Ifα=β=0, then the nonzero elements (akj), (bkj), (ckj),(dkj) for 0≤k, j≤N-3 are given as follows:
(2.25)akk=8(k+1)(2k+3)2L2(k+3),akj=8(2j+3)(2k+3)L2(j+3)(k+3)×[k4+8k3+(17-8j-2j2)k2+4(1-8j-2j2)k+(j4+8j3+17j2+16)],×1k4+8k3+(17-8j-2n,n≥1j2)k24(1-8j12-22j2)k+j=k+n,n≥1,bk+1,k=4(k+1)(2k+3)L(k+3),bkk=48(k+1)(k+2)(2k+3)L(k+3)(2k+5),bk,k+1=4(2k+3)(17k2+85k+104)L(k+3)(k+4),bkj=16(2j+3)(j-k)(j+k+4)(2k+3)L(j+3)(k+3),j=k+n,n≥2,ck+2,k=2(k+1)(2k+3)(k+3)(2k+5),ck+1,k=12(k+1)(2k+5)(k+3)(2k+7),ckk=8(2k+3)2(k+3)2,ck,k+1=4(2k+5)(13k2+65k+72)(k+3)(k+4)(2k+7),ck,k+2=2(2k+3)(31k2+186k+275)(k+3)(k+5)(2k+5),ckj=16(2j+3)(2k+3)(j+3)(k+3),j=k+n,n≥3,dkk=40L(k+1)(k+2)(2k+3)(k+3)(2k+1)(2k+5)(2k+7),dk,k+1=dk+1,k=15L(k+2)(k+4)(2k+7),dk,k+2=dk+2,k=12L(k+1)(2k+5)(2k+9),dk,k+3=dk+3,k=L(k+1)(2k+3)(k+3)(2k+5)(2k+7).Corollary 2.3.
Ifα=β=1/2, then the nonzero elements (akj),(bkj),(ckj), and (dkj) for 0≤k,j≤N-3 are given as follows:
(2.26)akk=8(k+2)2(2k+3)πL(k+4)(2k+7),akj=4(2j+3)(2j+5)(k+2)πL(j+1)(j+3)(j+4)(2k+7)×[k4+10k3+(29-2j(j+5))k2-10(j(j+5)-2)k+j(j+5)(j(j+5)-2)+12],+(29-2j(j+5))k2-10(j(j+5)-2)kj(jk2+5)(12j(j11+5)-2)j=k+n,n≥1,bk+1,k=2(k+2)(2k+3)π(k+4)(2k+7),bkk=12(k+2)(2k+3)π(k+4)(2k+7),bk,k+1=2(k+2)(k+3)(34k+115)π(k+4)(k+5)(2k+7),bkj=4(2j+3)(2j+5)(k+2)(2j2+10j-2k2-10k-3)π(j+1)(j+3)(j+4)(2k+7),j=k+n,n≥2,ck+2,k=L(k+2)(2k+3)π2(k+3)(k+4)(2k+7),ck+1,k=3L(2k+3)(2k2+13k+22)π2(k+3)(k+4)2(2k+7),ckk=L(64k4+700k3+2860k2+5187k+3564)π2(k+3)2(k+4)(2k+7)2,ck,k+1=L(52k4+560k3+2249k2+3985k+2640)π2(k+2)(k+3)(k+4)(k+5)(2k+7),ck,k+2=L(k+2)(62k3+679k2+2451k+2934)π2(k+3)2(k+5)(k+6)(2k+7),ckj=8L(2j+5)(2j+7)(k+2)π(j+2)(j+4)(j+5)(2k+7),j=k+n,n≥3,dkk=L2(20k6+300k5+1841k4+5910k3+10478k2+9765k+3861)π2(k+1)2(k+3)2(k+4)2(2k+7)2,dk,k+1=dk+1,k=3L2(20k4+240k3+1087k2+2202k+1716)π8(k+2)(k+3)(k+4)2(2k+7)(2k+9),dk,k+2=dk+2,k=3L2(2k+3)(k2+7k+13)π4(k+3)2(k+4)(k+5)(2k+7),dk,k+3=dk+3,k=L2(k+2)(2k+3)π8(k+3)(k+4)2(2k+7).Corollary 2.4.
Ifα=β=-1/2, then the nonzero elements (akj), (bkj), (ckj), and (dkj) for 0≤k, j≤N-3 are given as follows:
(2.27)akk=32(k+1)2(k+3)(2k+1)πL3(2k+5),akj=16(2j+1)(2j+3)(k+1)πL3(j+2)(2k+5)×[k4+6k3+(7-2j(3+j))k2-6(1+j(3+j))k+(2+3j+j2)2],k4+6k3+(7-2j(3+j))k26(+j(3+111j))k141+j:=k+n,n≥1,bk+1,k=8(k+1)(k+3)(2k+1)πL2(2k+5),bkk=24(k+1)(2k+1)(2k2+8k+7)πL2(k+2)(2k+5),bk,k+1=8(k+1)(34k3+225k2+482k+333)πL2(k+3)(2k+5),bkj=16(2j+1)(2j+3)(k+1)(2j2+6j-2k2-6k+3)πL2(j+2)(2k+5),j=k+n,n≥2,ck+2,k=2(k+1)(k+3)(2k+1)πL(k+2)(2k+5),ck+1,k=6(2k+1)(2k+3)πL(2k+5),ckk=2(k+1)(64k3+324k2+476k+189)πL(k+2)(2k+5)2,ck,k+1=2(k+1)(26k+45)πL(k+3),ck,k+2=2(k+1)(62k2+375k+556)πL(k+4)(2k+5),ckj=32(2j+1)(2j+3)(k+1)πL(j+2)(2k+5),j=k+n,n≥3,dkk=(40k4+240k3+526k2+498k+181)π(k+2)2(2k+5)2,dk,k+1=dk+1,k=3(20k4+160k3+451k2+524k+198)π2(k+2)(k+3)(2k+5)(2k+7),dk,k+2=dk+2,k=3(2k+1)(2k2+10k+11)π2(k+2)(k+4)(2k+5),dk,k+3=dk+3,k=(k+1)(2k+1)π2(k+2)(2k+5).
In the following, we can always modify the right-hand side to take care of the nonhomogeneous initial conditions. Let us consider for instance the one-dimensional third-order differential equation (2.9) subject to the nonhomogeneous initial conditions:
(2.28)u(0)=a+,u′(0)=a-,u′′(0)=a~+.
We proceed as follows.
Set(2.29)V(x)=u(x)+b0+b1x+b2x2,
where
(2.30)b0=-a+,b1=-a-,b2=-a~+2.
The transformation (2.29) turns the nonhomogeneous initial conditions (2.28) into the homogeneous initial conditions:
(2.31)V(0)=V′(0)=V′′(0)=0.
Hence, it suffices to solve the following modified one-dimensional third-order differential equation:
(2.32)V′′′+γ1V′′+γ2V′+γ3V=f*(x)inI=(0,L),
subject to the homogeneous initial conditions (2.31), where V(x) is given by (2.29), and
(2.33)f*(x)=f(x)+(γ3b0+γ2b1+2γ1b2)+(γ3b1+2γ2b2)x+γ3b2x2.


## 3. P-SJG Method for Third-Order Differential Equation with Variable Coefficients

In this section, we use the pseudospectral-shifted Jacobi Galerkin method to numerically solve the following third-order differential equation with variable coefficients:(3.1)u′′′+γ1(x)u′′+γ2(x)u′+γ3(x)u=f(x),x∈I,u(0)=u′(0)=u′′(0)=0.We denote byxN,j(α,β), 0⩽j⩽N, the nodes of the standard Jacobi-Gauss interpolation on the interval (-1,1). Their corresponding Christoffel numbers are ϖN,j(α,β), 0⩽j⩽N. The nodes of the shifted Jacobi-Gauss interpolation on the interval (0,L) are the zeros of PL,N+1(α,β)(x), which we denote by xL,N,j(α,β), 0⩽j⩽N. Clearly xL,N,j(α,β)=(L/2)(xN,j(α,β)+1), and their corresponding Christoffel numbers are ϖL,N,j(α,β)=(L/2)α+β+1ϖN,j(α,β), 0⩽j⩽N. Let SN(0,L) be the set of polynomials of degree at most N. Thanks to the property of the standard Jacobi-Gauss quadrature, it follows that for any ϕ∈S2N+1(0,L),
(3.2)∫0L(L-x)αxβϕ(x)dx=(L2)α+β+1∫-11(L2(x+1))(1-x)α(1+x)βϕ(L2(x+1))dx=(L2)α+β+1∑j=0N‍ϖN,j(α,β)ϕ(L2(xN,j(α,β)+1))=∑j=0N‍ϖL,N,j(α,β)ϕ(xL,N,j(α,β)).We define the discrete inner product and norm as follows:(3.3)(u,v)wL(α,β),N=∑j=0N‍u(xL,N,j(α,β))v(xL,N,j(α,β))ϖL,N,j(α,β),∥u∥wL(α,β),N=(u,u)wL(α,β),N,
where xL,N,j(α,β) and ϖL,N,j(α,β) are the nodes and the corresponding weights of the shifted Jacobi-Gauss-quadrature formula on the interval (0,L), respectively.Obviously, (see, e.g., formula (2.25) of [12])
(3.4)(u,v)wL(α,β),N=(u,v)wL(α,β),∀u,v∈S2N-1.
Thus, for any u∈SN(0,L), the norms ∥u∥wL(α,β),N and ∥u∥wL(α,β) coincide.Associating with this quadrature rule, we denote byINPL(α,β) the shifted Jacobi-Gauss interpolation,
(3.5)INPL(α,β)u(xL,N,j(α,β))=u(xL,N,j(α,β)),0≤k≤N.
The pseudospectral Galerkin method for (3.1) is to find uN∈WN such that
(3.6)(uN′′′,vN)wL(α,β)+(γ1(x)uN′′,vN)wL(α,β),N+(γ2(x)uN′,vN)wL(α,β),N+(γ3(x)uN,vN)wL(α,β),N=(f,vN)wL(α,β),N∀vN∈WN,
where (u,v)wL(α,β),N is the discrete inner product of u and v associated with the shifted Jacobi-Gauss quadrature.Hence, by setting(3.7)uN=∑k=0N-3‍a~kϕk,a-=(a~0,a~1,…,a~N-3)T,f~k=(f,ϕk)wL(α,β),N,f-=(f~0,f~1,…,f~N-3)T,b~ij=(γ1(x)ϕj′′,ϕi)wL(α,β),N,c~ij=(γ2(x)ϕj′,ϕi)wL(α,β),N,d~ij=(γ3(x)ϕj,ϕi)wL(α,β),N,B~=(b~kj),C~=(c~kj),D~=(d~kj),0≤k,j≤N-3.
Then, the linear system (3.6) becomes
(3.8)(A+B~+C~+D~)a-=f-,
where A is given in Theorem 2.1.


## 4. SJC Method for Nonlinear Third-Order Differential Equations

In this section, we are interested in solving numerically the nonlinear third-order differential equation:(4.1)u′′′(x)=F(x,u(x),u′(x),u′′(x)),
with initial conditions
(4.2)u(0)=u′(0)=u′′(0)=0.
It is well known that one can convert (4.1) into third-order system of first-order initial-value problems. Methods to solve systems of first-order differential equations are simply generalizations of the methods for a single first-order equation, for example, the classical Runge-Kutta of order four. Another alternative spectral method is to use the shifted Jacobi collocation method to solve (4.1)
(4.3)uN(x)=∑j=0N‍bjϕk(x).
then, making use of formula (2.7) enables one to express explicitly the derivatives u(i)(x), (i=0,1,2) in terms of the expansion coefficients bj. The criterion of spectral shifted Jacobi collocation method for solving approximately (4.1) is to find uN(x)∈SN(0,L) such that
(4.4)uN′′′(xL,N,k(α,β))=F(xL,N,k(α,β),uN(xL,N,k(α,β)),uN′(xL,N,k(α,β)),uN′′(xL,N,k(α,β))),k=0,1,…,N.
is satisfied exactly at the collocation points xL,N,k(α,β), k=0,1,…,N. In other words, we have to collocate (4.4) at the (N+1) shifted Jacobi roots xL,N,k(α,β), which immediately yields
(4.5)∑j=0N‍bjϕk′′′(x)=F(x,∑j=0N‍bjϕk(x),∑j=0N‍bjϕk′(x),∑j=0N‍bjϕk′′(x)).
This constitutes a system of (N+1) nonlinear algebraic equations in the unknown expansion coefficients bj(j=0,1,…,N), which can be solved by using any standard iteration technique, like Newton's iteration method.


## 5. Fifth-Order Differential Equations

In this section, we consider the fifth-order differential equation of the form:(5.1)u(v)+γ1u(iv)+γ2u′′′+γ3u′′+γ4u′+γ5u=f(x),x∈I,u(0)=u′(0)=u′′(0)=u′′′(0)=u(iv)(0)=0.
We define
(5.2)VN={vN∈SN(0,L):u(0)=u′(0)=u′′(0)=u′′′(0)=u(iv)(0)=0}.
The results for fifth-order differential equations will be given without proofs.


### 5.1. SJG Method for Constant Coefficients

Forγ1, γ2, γ3, γ4, and γ5 are constants, we consider the following shifted Jacobi-Galerkin procedure for (5.1): Find uN∈VN such that
(5.3)(uN(v),vN)wL(α,β)+γ1(uN(iv),vN)wL(α,β)+γ2(uN′′′,vN)wL(α,β)+γ3(uN′′,vN)wL(α,β)+γ4(uN′,vN)wL(α,β)+γ5(uN,vN)wL(α,β)=(f,vN)wL(α,β),N,∀vN∈VN.
Now, we choose the basis functions Φk(x) to be of the form:
(5.4)Φk(x)=ξk[PL,k(α,β)(x)+ϵ^kPL,k+1(α,β)(x)+ε^kPL,k+2(α,β)(x)+ζ^kPL,k+3(α,β)(x)α1,+μ^kPL,k+4(α,β)(x)+υ^kPL,k+5(α,β)(x)],k=0,1,…,N-5,
It is not difficult to show that the basis functions Φk(x)∈Vk+5 are given by
(5.5)Φk(x)=ξk[PL,k(α,β)(x)+5(k+1)(2k+λ+2)(k+β+1)(2k+λ+6)PL,k+1(α,β)(x)(k)+10(k+1)2(2k+λ+1)(2k+λ+4)(k+β+1)2(2k+λ+6)2PL,k+2(α,β)(x)(k)+10(k+1)3(2k+λ+1)2(k+β+1)3(2k+λ+7)2PL,k+3(α,β)(x)(k)+5(k+1)4(2k+λ+1)3(k+β+1)4(2k+λ+6)2(2k+λ+9)PL,k+4(α,β)(x)(k)+(k+1)5(2k+λ+1)4(k+β+1)5(2k+λ+6)5PL,k+5(α,β)(x)].
Therefore, for N≥5, we have
(5.6)VN=span{Φ0,Φ1,…,ΦN-5}.It is clear that (5.3) is equivalent to
(5.7)(uN(v),Φk(x))wL(α,β)+γ1(uN(iv),Φk(x))wL(α,β)+γ2(uN′′′,Φk(x))wL(α,β)+γ3(uN′′,Φk(x))wL(α,β)+γ4(uN′,Φk(x))wL(α,β)+γ5(uN,Φk(x))wL(α,β)=(f,Φk(x))wL(α,β),N,k=0,1,…,N-5.Let us denote(5.8)fk=(f,Φk(x))wL(α,β),N,f=(f0,f1,…,fN-5)T,uN(x)=∑n=0N-5‍vnΦn(x),v=(v0,v1,…,vN-5)T.rij=(Φj(v),Φi)wL(α,β),qij=(Φj(iv),Φi)wL(α,β),yij=(Φj′′′,Φi)wL(α,β),sij=(Φj′′,Φi)wL(α,β),tij=(Φj′,Φi)wL(α,β),uij=(Φj,Φi)wL(α,β),
then equation (5.7) is equivalent to the following matrix equation:
(5.9)(R+γ1Q+γ2Y+γ3S+γ4T+γ5U)v=f,
where the nonzero elements of the matrices R, Q, Y, S, T, and U are given explicitly in the following theorem.Theorem 5.1.
If one takesΦk(x) as defined in (5.4), and if one denotes pkj=(Φj(v)(x),Φk(x))wL(α,β), qkj=(Φj(iv)(x),Φk(x))wL(α,β), ykj=(Φj′′′(x),Φk(x))wL(α,β),skj=(Φj′′(x),Φk(x))wL(α,β), tkj=(Φj′(x),Φk(x))wL(α,β), and ukj=(Φj(x),Φk(x))wL(α,β). Then the nonzero elements (rkj),(qkj),(ykj),(skj),(tkj), and (ukj) for 0≤k,j≤N-5 are given as follows:
(5.10)rkk=Lα+β-4(2k+λ+1)5(2k+λ+1)4Γ(k+6)(Γ(α+1))2Γ(k+β+1)(k+β+1)5Γ(k+α+1)Γ(k+λ+5),rkj=ξkξj[O5(j,k,α,β)hL,k(α,β)+O5(j,k+1,α,β)ϵ^khL,k+1(α,β)+O5(j,k+2,α,β)ε^khL,k+2(α,β)j,+k+O5(j,k+3,α,β)ζ^khL,k+3(α,β)+O5(j,k+4,α,β)μ^khL,k+4(α,β)j,+k+O5(j,k+5,α,β)υ^khL,k+5(α,β)],j=k+n,n≥1,qkj=ξkξj[O4(j,k,α,β)hL,k(α,β)+O4(j,k+1,α,β)ϵ^khL,k+1(α,β)+O4(j,k+2,α,β)ε^khL,k+2(α,β)j,+k+O4(j,k+3,α,β)ζ^khL,k+3(α,β)+O4(j,k+4,α,β)μ^khL,k+4(α,β)j,+k+O4(j,k+5,α,β)υ^khL,k+5(α,β)],j=k+n-1,n≥0,ykj=ξkξj[O3(j,k,α,β)hL,k(α,β)+O3(j,k+1,α,β)ϵ^khL,k+1(α,β)+O3(j,k+2,α,β)ε^khL,k+2(α,β)j,+k+O3(j,k+3,α,β)ζ^khL,k+3(α,β)+O3(j,k+4,α,β)μ^khL,k+4(α,β)j,+k+O3(j,k+5,α,β)υ^khL,k+5(α,β)],j=k+n-2,n≥0,skj=ξkξj[O2(j,k,α,β)hL,k(α,β)+O2(j,k+1,α,β)ϵ^khL,k+1(α,β)+O2(j,k+2,α,β)ε^khL,k+2(α,β)j,+k+O2(j,k+3,α,β)ζ^khL,k+3(α,β)+O2(j,k+4,α,β)μ^khL,k+4(α,β)j,+k+O2(j,k+5,α,β)υ^khL,k+5(α,β)],j=k+n-3,n≥0,tkj=ξkξj[O1(j,k,α,β)hL,k(α,β)+O1(j,k+1,α,β)ϵ^khL,k+1(α,β)+O1(j,k+2,α,β)ε^khL,k+2(α,β)j,+k+O1(j,k+3,α,β)ζ^khL,k+3(α,β)+O1(j,k+4,α,β)μ^khL,k+4(α,β)j,+k+O1(j,k+5,α,β)υ^khL,k+5(α,β)],j=k+n-4,n≥0,ukk=ξk2[hL,k(α,β)+ϵ^kϵ^khL,k+1(α,β)+ε^kε^khL,k+2(α,β)+ζ^kζ^khL,k+3(α,β)+μ^kμ^khL,k+4(α,β)+υ^kυ^khL,k+5(α,β)],uk+1,k=uk,k+1=ξkξk+1[ϵ^khL,k+1(α,β)+ϵ^k+1ε^khL,k+2(α,β)+ε^k+1ζ^khL,k+3(α,β)+ζ^k+1μ^khL,k+4(α,β)+μ^k+1υ^khL,k+5(α,β)],uk+2,k=uk,k+2=ξkξk+2[ε^khL,k+2(α,β)+ϵ^k+2ζ^khL,k+3(α,β)+ε^k+2μ^khL,k+4(α,β)+ζ^k+2υ^khL,k+5(α,β)],uk+3,k=uk,k+3=ξkξk+3[ζ^khL,k+3(α,β)+ϵ^k+3μ^khL,k+4(α,β)+ε^k+3υ^khL,k+5(α,β)],uk+4,k=uk,k+4=ξkξk+4[μ^khL,k+4(α,β)+ϵ^k+4υ^khL,k+5(α,β)],uk+5,k=uk,k+5=ξkξk+5υ^khL,k+5(α,β),
where
(5.11)Oi(j,k,α,β)=Ci(j,k,α,β)+ϵ^jCi(j+1,k,α,β)+ε^jCi(j+2,k,α,β)+ζ^jCi(j+3,k,α,β)+μ^jCi(j+4,k,α,β)+υ^jCi(j+5,k,α,β).Proof.
The proof of this theorem is not difficult, and it can be accomplished by following the same procedure used in proving Theorem2.1.
In the following, we can always modify the right-hand side to take care of the nonhomogeneous initial conditions. Let us consider for instance the one-dimensional fifth-order differential equation (5.1) subject to the nonhomogeneous initial conditions:
(5.12)u(0)=a+,u′(0)=a-,u′′(0)=a~+,u′′′(0)=a~-,u(iv)(0)=b+.
We proceed as follows.
Set(5.13)V(x)=u(x)+b0+b1x+b2x2+b3x3+b4x4,
where
(5.14)b0=-a+,b1=-a-,b2=-a~+2,b3=-a~-6,b4=-b+24.
The transformation (5.13) turns the nonhomogeneous initial conditions (5.12) into the homogeneous initial conditions:
(5.15)V(0)=V′(0)=V′′(0)=V′′′(0)=V(iv)(0)=0.
Hence, it suffices to solve the following modified one-dimensional fifth-order equation:(5.16)V(v)+γ1V(iv)+γ2V′′′+γ3V′′+γ4V′+γ5V=f*(x)inI=(0,L),
subject to the homogeneous initial conditions (5.15), where V(x) is given by (5.13), and
(5.17)f*(x)=f(x)-(24γ1b4+6γ2b3+2γ3b2+γ4b1+γ5b0)-(24γ2b4+6γ3b3+2γ4b2+γ5b1)x-(12γ3b4+3γ4b3+γ5b2)x2-(4γ4b4+γ5b3)x3-γ5b4x4.


### 5.2. Fifth-Order Equations with Variable Coefficients

Let us consider the fifth-order differential equation (5.1) with γ1, γ2, γ3, γ4, and γ5 are variables. The pseudospectral Galerkin method for (5.1) is to find uN∈VN such that
(5.18)(uN(v),vN)wL(α,β)+(γ1(x)uN(iv),vN)wL(α,β),N+(γ2(x)uN′′′,vN)wL(α,β),N+(γ3(x)uN′′,vN)wL(α,β),N+(γ4(x)uN′,vN)wL(α,β),N+(γ5(x)uN,vN)wL(α,β),N=(f,vN)wL(α,β),N∀vN∈VN,
where (u,v)wL(α,β),N is the discrete inner product of u and v associated with the shifted Jacobi-Gauss quadrature (for details, see Section 3).


### 5.3. Nonlinear Fifth-Order Differential Equations

In this section, we are interested in solving numerically the nonlinear fifth-order differential equation:(5.19)u(v)(x)=F(x,u(x),u′(x),u′′(x),u′′′(x),u(iv)(x)),
with initial conditions:
(5.20)u(0)=u′(0)=u′′(0)=u′′′(0)=u(iv)(0)=0.
It is well known that one can convert (5.19) into fifth-order system of first-order initial-value problems. Methods to solve systems of first-order differential equations are simply generalizations of the methods for a single first-order equation, for example, the classical Runge-Kutta of order four. Another alternative spectral method is to use the shifted Jacobi collocation method to solve (5.19):
(5.21)uN(x)=∑j=0N‍bjΦk(x).
Then, making use of formula (2.7) enables one to express explicitly the derivatives u(i)(x), (i=0,1,2,3,4) in terms of the expansion coefficients bj. The criterion of spectral shifted Jacobi collocation method for solving approximately (5.19) is to find uN(x)∈SN(0,L) such that
(5.22)uN(v)(xL,N,k(α,β))=F(xL,N,k(α,β),uN(xL,N,k(α,β)),uN′(xL,N,k(α,β)),uN′′(xL,N,k(α,β)),uN′′′(xL,N,k(α,β)),uN(iv)(xL,N,k(α,β))),k=0,1,…,N,
is satisfied exactly at the collocation points xL,N,k(α,β), k=0,1,…,N. In other words, we have to collocate (5.22) at the (N+1) shifted Jacobi roots xL,N,k(α,β), which immediately yields
(5.23)∑j=0N‍bjΦk(v)(x)=F(x,∑j=0N‍bjΦk(x),∑j=0N‍bjΦk′(x),∑j=0N‍bjΦk′′(x),∑j=0N‍bjΦk′′′(x),∑j=0N‍bjΦk(iv)(x)).
This constitute a system of (N+1) nonlinear algebraic equations in the unknown expansion coefficients bj(j=0,1,…,N), which can be solved by using any standard iteration technique, like Newton's iteration method.


## 5.1. SJG Method for Constant Coefficients

Forγ1, γ2, γ3, γ4, and γ5 are constants, we consider the following shifted Jacobi-Galerkin procedure for (5.1): Find uN∈VN such that
(5.3)(uN(v),vN)wL(α,β)+γ1(uN(iv),vN)wL(α,β)+γ2(uN′′′,vN)wL(α,β)+γ3(uN′′,vN)wL(α,β)+γ4(uN′,vN)wL(α,β)+γ5(uN,vN)wL(α,β)=(f,vN)wL(α,β),N,∀vN∈VN.
Now, we choose the basis functions Φk(x) to be of the form:
(5.4)Φk(x)=ξk[PL,k(α,β)(x)+ϵ^kPL,k+1(α,β)(x)+ε^kPL,k+2(α,β)(x)+ζ^kPL,k+3(α,β)(x)α1,+μ^kPL,k+4(α,β)(x)+υ^kPL,k+5(α,β)(x)],k=0,1,…,N-5,
It is not difficult to show that the basis functions Φk(x)∈Vk+5 are given by
(5.5)Φk(x)=ξk[PL,k(α,β)(x)+5(k+1)(2k+λ+2)(k+β+1)(2k+λ+6)PL,k+1(α,β)(x)(k)+10(k+1)2(2k+λ+1)(2k+λ+4)(k+β+1)2(2k+λ+6)2PL,k+2(α,β)(x)(k)+10(k+1)3(2k+λ+1)2(k+β+1)3(2k+λ+7)2PL,k+3(α,β)(x)(k)+5(k+1)4(2k+λ+1)3(k+β+1)4(2k+λ+6)2(2k+λ+9)PL,k+4(α,β)(x)(k)+(k+1)5(2k+λ+1)4(k+β+1)5(2k+λ+6)5PL,k+5(α,β)(x)].
Therefore, for N≥5, we have
(5.6)VN=span{Φ0,Φ1,…,ΦN-5}.It is clear that (5.3) is equivalent to
(5.7)(uN(v),Φk(x))wL(α,β)+γ1(uN(iv),Φk(x))wL(α,β)+γ2(uN′′′,Φk(x))wL(α,β)+γ3(uN′′,Φk(x))wL(α,β)+γ4(uN′,Φk(x))wL(α,β)+γ5(uN,Φk(x))wL(α,β)=(f,Φk(x))wL(α,β),N,k=0,1,…,N-5.Let us denote(5.8)fk=(f,Φk(x))wL(α,β),N,f=(f0,f1,…,fN-5)T,uN(x)=∑n=0N-5‍vnΦn(x),v=(v0,v1,…,vN-5)T.rij=(Φj(v),Φi)wL(α,β),qij=(Φj(iv),Φi)wL(α,β),yij=(Φj′′′,Φi)wL(α,β),sij=(Φj′′,Φi)wL(α,β),tij=(Φj′,Φi)wL(α,β),uij=(Φj,Φi)wL(α,β),
then equation (5.7) is equivalent to the following matrix equation:
(5.9)(R+γ1Q+γ2Y+γ3S+γ4T+γ5U)v=f,
where the nonzero elements of the matrices R, Q, Y, S, T, and U are given explicitly in the following theorem.Theorem 5.1.
If one takesΦk(x) as defined in (5.4), and if one denotes pkj=(Φj(v)(x),Φk(x))wL(α,β), qkj=(Φj(iv)(x),Φk(x))wL(α,β), ykj=(Φj′′′(x),Φk(x))wL(α,β),skj=(Φj′′(x),Φk(x))wL(α,β), tkj=(Φj′(x),Φk(x))wL(α,β), and ukj=(Φj(x),Φk(x))wL(α,β). Then the nonzero elements (rkj),(qkj),(ykj),(skj),(tkj), and (ukj) for 0≤k,j≤N-5 are given as follows:
(5.10)rkk=Lα+β-4(2k+λ+1)5(2k+λ+1)4Γ(k+6)(Γ(α+1))2Γ(k+β+1)(k+β+1)5Γ(k+α+1)Γ(k+λ+5),rkj=ξkξj[O5(j,k,α,β)hL,k(α,β)+O5(j,k+1,α,β)ϵ^khL,k+1(α,β)+O5(j,k+2,α,β)ε^khL,k+2(α,β)j,+k+O5(j,k+3,α,β)ζ^khL,k+3(α,β)+O5(j,k+4,α,β)μ^khL,k+4(α,β)j,+k+O5(j,k+5,α,β)υ^khL,k+5(α,β)],j=k+n,n≥1,qkj=ξkξj[O4(j,k,α,β)hL,k(α,β)+O4(j,k+1,α,β)ϵ^khL,k+1(α,β)+O4(j,k+2,α,β)ε^khL,k+2(α,β)j,+k+O4(j,k+3,α,β)ζ^khL,k+3(α,β)+O4(j,k+4,α,β)μ^khL,k+4(α,β)j,+k+O4(j,k+5,α,β)υ^khL,k+5(α,β)],j=k+n-1,n≥0,ykj=ξkξj[O3(j,k,α,β)hL,k(α,β)+O3(j,k+1,α,β)ϵ^khL,k+1(α,β)+O3(j,k+2,α,β)ε^khL,k+2(α,β)j,+k+O3(j,k+3,α,β)ζ^khL,k+3(α,β)+O3(j,k+4,α,β)μ^khL,k+4(α,β)j,+k+O3(j,k+5,α,β)υ^khL,k+5(α,β)],j=k+n-2,n≥0,skj=ξkξj[O2(j,k,α,β)hL,k(α,β)+O2(j,k+1,α,β)ϵ^khL,k+1(α,β)+O2(j,k+2,α,β)ε^khL,k+2(α,β)j,+k+O2(j,k+3,α,β)ζ^khL,k+3(α,β)+O2(j,k+4,α,β)μ^khL,k+4(α,β)j,+k+O2(j,k+5,α,β)υ^khL,k+5(α,β)],j=k+n-3,n≥0,tkj=ξkξj[O1(j,k,α,β)hL,k(α,β)+O1(j,k+1,α,β)ϵ^khL,k+1(α,β)+O1(j,k+2,α,β)ε^khL,k+2(α,β)j,+k+O1(j,k+3,α,β)ζ^khL,k+3(α,β)+O1(j,k+4,α,β)μ^khL,k+4(α,β)j,+k+O1(j,k+5,α,β)υ^khL,k+5(α,β)],j=k+n-4,n≥0,ukk=ξk2[hL,k(α,β)+ϵ^kϵ^khL,k+1(α,β)+ε^kε^khL,k+2(α,β)+ζ^kζ^khL,k+3(α,β)+μ^kμ^khL,k+4(α,β)+υ^kυ^khL,k+5(α,β)],uk+1,k=uk,k+1=ξkξk+1[ϵ^khL,k+1(α,β)+ϵ^k+1ε^khL,k+2(α,β)+ε^k+1ζ^khL,k+3(α,β)+ζ^k+1μ^khL,k+4(α,β)+μ^k+1υ^khL,k+5(α,β)],uk+2,k=uk,k+2=ξkξk+2[ε^khL,k+2(α,β)+ϵ^k+2ζ^khL,k+3(α,β)+ε^k+2μ^khL,k+4(α,β)+ζ^k+2υ^khL,k+5(α,β)],uk+3,k=uk,k+3=ξkξk+3[ζ^khL,k+3(α,β)+ϵ^k+3μ^khL,k+4(α,β)+ε^k+3υ^khL,k+5(α,β)],uk+4,k=uk,k+4=ξkξk+4[μ^khL,k+4(α,β)+ϵ^k+4υ^khL,k+5(α,β)],uk+5,k=uk,k+5=ξkξk+5υ^khL,k+5(α,β),
where
(5.11)Oi(j,k,α,β)=Ci(j,k,α,β)+ϵ^jCi(j+1,k,α,β)+ε^jCi(j+2,k,α,β)+ζ^jCi(j+3,k,α,β)+μ^jCi(j+4,k,α,β)+υ^jCi(j+5,k,α,β).Proof.
The proof of this theorem is not difficult, and it can be accomplished by following the same procedure used in proving Theorem2.1.
In the following, we can always modify the right-hand side to take care of the nonhomogeneous initial conditions. Let us consider for instance the one-dimensional fifth-order differential equation (5.1) subject to the nonhomogeneous initial conditions:
(5.12)u(0)=a+,u′(0)=a-,u′′(0)=a~+,u′′′(0)=a~-,u(iv)(0)=b+.
We proceed as follows.
Set(5.13)V(x)=u(x)+b0+b1x+b2x2+b3x3+b4x4,
where
(5.14)b0=-a+,b1=-a-,b2=-a~+2,b3=-a~-6,b4=-b+24.
The transformation (5.13) turns the nonhomogeneous initial conditions (5.12) into the homogeneous initial conditions:
(5.15)V(0)=V′(0)=V′′(0)=V′′′(0)=V(iv)(0)=0.
Hence, it suffices to solve the following modified one-dimensional fifth-order equation:(5.16)V(v)+γ1V(iv)+γ2V′′′+γ3V′′+γ4V′+γ5V=f*(x)inI=(0,L),
subject to the homogeneous initial conditions (5.15), where V(x) is given by (5.13), and
(5.17)f*(x)=f(x)-(24γ1b4+6γ2b3+2γ3b2+γ4b1+γ5b0)-(24γ2b4+6γ3b3+2γ4b2+γ5b1)x-(12γ3b4+3γ4b3+γ5b2)x2-(4γ4b4+γ5b3)x3-γ5b4x4.


## 5.2. Fifth-Order Equations with Variable Coefficients

Let us consider the fifth-order differential equation (5.1) with γ1, γ2, γ3, γ4, and γ5 are variables. The pseudospectral Galerkin method for (5.1) is to find uN∈VN such that
(5.18)(uN(v),vN)wL(α,β)+(γ1(x)uN(iv),vN)wL(α,β),N+(γ2(x)uN′′′,vN)wL(α,β),N+(γ3(x)uN′′,vN)wL(α,β),N+(γ4(x)uN′,vN)wL(α,β),N+(γ5(x)uN,vN)wL(α,β),N=(f,vN)wL(α,β),N∀vN∈VN,
where (u,v)wL(α,β),N is the discrete inner product of u and v associated with the shifted Jacobi-Gauss quadrature (for details, see Section 3).


## 5.3. Nonlinear Fifth-Order Differential Equations

In this section, we are interested in solving numerically the nonlinear fifth-order differential equation:(5.19)u(v)(x)=F(x,u(x),u′(x),u′′(x),u′′′(x),u(iv)(x)),
with initial conditions:
(5.20)u(0)=u′(0)=u′′(0)=u′′′(0)=u(iv)(0)=0.
It is well known that one can convert (5.19) into fifth-order system of first-order initial-value problems. Methods to solve systems of first-order differential equations are simply generalizations of the methods for a single first-order equation, for example, the classical Runge-Kutta of order four. Another alternative spectral method is to use the shifted Jacobi collocation method to solve (5.19):
(5.21)uN(x)=∑j=0N‍bjΦk(x).
Then, making use of formula (2.7) enables one to express explicitly the derivatives u(i)(x), (i=0,1,2,3,4) in terms of the expansion coefficients bj. The criterion of spectral shifted Jacobi collocation method for solving approximately (5.19) is to find uN(x)∈SN(0,L) such that
(5.22)uN(v)(xL,N,k(α,β))=F(xL,N,k(α,β),uN(xL,N,k(α,β)),uN′(xL,N,k(α,β)),uN′′(xL,N,k(α,β)),uN′′′(xL,N,k(α,β)),uN(iv)(xL,N,k(α,β))),k=0,1,…,N,
is satisfied exactly at the collocation points xL,N,k(α,β), k=0,1,…,N. In other words, we have to collocate (5.22) at the (N+1) shifted Jacobi roots xL,N,k(α,β), which immediately yields
(5.23)∑j=0N‍bjΦk(v)(x)=F(x,∑j=0N‍bjΦk(x),∑j=0N‍bjΦk′(x),∑j=0N‍bjΦk′′(x),∑j=0N‍bjΦk′′′(x),∑j=0N‍bjΦk(iv)(x)).
This constitute a system of (N+1) nonlinear algebraic equations in the unknown expansion coefficients bj(j=0,1,…,N), which can be solved by using any standard iteration technique, like Newton's iteration method.


## 6. Numerical Results

To illustrate the effectiveness of the proposed methods in the present paper, several test examples are carried out in this section. Comparisons of the results obtained by the present methods with those obtained by other methods reveal that the present methods are very efficient and more robust.Example 6.1.
Consider the linear third-order problem (see [23]):
(6.1)u′′′(x)+2u′′(x)-u′(x)-2u(x)=f(x),x∈[0,3],
subject to the initial condition:
(6.2)u(0)=1,u′(0)=2,u′′(0)=0,
where f is selected such that exact solution is
(6.3)u(x)=136(6x-5)ex-49e-2x+14e-x+43ex.Table1 list the maximum pointwise error of u-uN using the SJG method with various choices of N. Numerical results of this problem show that the SJG method converges exponentially.Table 1
Maximum pointwise error using SJG method forN=8,16,24 for Example 6.1.
N
α
β
SJG
α
β
SJG
8
1.542
·
1
0
-
1
8.093
·
1
0
-
2
16
1
2
1
2
5.513
·
1
0
-
8
1
2
-
1
2
1.642
·
1
0
-
8
24
1.598
·
1
0
-
14
4.707
·
1
0
-
14
8
2.581
·
1
0
-
1
1.417
·
1
0
-
1
16
-
1
2
1
2
9.369
·
1
0
-
8
-
1
2
-
1
2
2.875
·
1
0
-
8
24
1.509
·
1
0
-
14
2.575
·
1
0
-
14Example 6.2.
Consider the linear third-order problem with variable coefficients:(6.4)u′′′-cos(4x)u′′-e3xu′+(sin(x)+x3)u=f(x),x∈[0,3],
subject to the initial condition:
(6.5)u(0)=1,u′(0)=2,u′′(0)=0,
where f is selected such that exact solution is
(6.6)u(x)=136(6x-5)ex-49e-2x+14e-x+43ex.Table2 list the Maximum pointwise error, using the P-SJG method with various choices of α, β, and N. Numerical results of third-order differential equation with variable coefficients show that the P-SJG method converges exponentially.Table 2
Maximum pointwise error using P-SJG method forN=8,16,24 for Example 6.2.
N
α
β
P-SJG
α
β
P-SJG
8
7.346
·
1
0
-
4
6.848
·
1
0
-
4
16
1
1
3.173
·
1
0
-
11
1
2
1
2
2.659
·
1
0
-
11
24
1.533
·
1
0
-
12
1.056
·
1
0
-
12
8
6.366
·
1
0
-
4
4.459
·
1
0
-
4
16
0
0
1.363
·
1
0
-
11
-
3
4
-
3
4
5.574
·
1
0
-
12
24
2.318
·
1
0
-
12
2.626
·
1
0
-
12Example 6.3.
Consider the linear fifth-order problem (see [24]):
(6.7)u(v)(x)-32u(x)=f(x),x∈[0,1],
subject to the initial condition:
(6.8)u(0)=1,u′(0)=3,u′′(0)=4,u′′′(0)=7,u(iv)(0)=16,
where f is selected such that exact solution is
(6.9)u(x)=e2x+sinx.Table3 list the maximum absolute error of u-uN using the SJG method with various choices of α, β, and N. It is seen that for the given initial conditions, the maximum absolute error in the He's variational iteration method [24] with eight iterations is 5.579·10-4 (see, Table 2 in [24]).Table 3
Maximum pointwise error using SJG method forN=8,16,24 for Example 6.3.
N
α
β
SJG
α
β
SJG
8
3.742
·
1
0
-
2
2.782
·
1
0
-
2
16
1
2
1
2
9.629
·
1
0
-
11
1
2
-
1
2
4.319
·
1
0
-
11
24
2.220
·
1
0
-
15
1.998
·
1
0
-
15
8
6.011
·
1
0
-
2
4.691
·
1
0
-
2
16
-
1
2
1
2
1.755
·
1
0
-
10
-
1
2
-
1
2
8.095
·
1
0
-
11
24
1.443
·
1
0
-
15
1.443
·
1
0
-
15Example 6.4.
Consider the linear fifth-order problem with variable coefficients:(6.10)u(v)-sin(3x)u(iv)-e2xu′′′-(cos(x)+x2)u′′-xsinxu′+x2u=f(x),x∈[0,2],
subject to the initial condition:
(6.11)u(0)=1,u′(0)=1,u′′(0)=0,u′′′(0)=4,u(iv)(0)=-4,
where f is selected such that exact solution is
(6.12)u(x)=x2sinx+excosx.Table4 list the Maximum pointwise error, using the P-SJG method with various choices of α, β, and N. Numerical results of fifth-order differential equation with variable coefficients show that the P-SJG method converges exponentially.Table 4
Maximum pointwise error using P-SJG method forN=8,16,24 for Example 6.4.
N
α
β
P-SJG
α
β
P-SJG
8
9.036
·
1
0
-
3
7.005
·
1
0
-
3
16
1
2
1
2
1.546
·
1
0
-
10
1
2
-
1
2
1.694
·
1
0
-
10
24
2.673
·
1
0
-
13
1.687
·
1
0
-
13
8
1.350
·
1
0
-
2
1.100
·
1
0
-
2
16
-
1
2
1
2
1.280
·
1
0
-
10
-
1
2
-
1
2
1.234
·
1
0
-
10
24
1.243
·
1
0
-
14
9.858
·
1
0
-
14Example 6.5.
We consider in this example the third order nonlinear problem:(6.13)u(3)(x)+2xu(2)(x)+u(x)2=(14-x2)cosx+sinx(4-8x2+x5sinx)x,x∈[0,1],
with initial conditions given at three different points,
(6.14)u(0)=u(1)(0)=u(2)(0)=0.
The exact solution of this problem is
(6.15)u(x)=x2sinx.In Table5, we list the absolute errors obtained by the shifted Jacobi collocation method, with different values of α, β and at N = 14.Table 5
Absolute error using SJC method forN=14 Example 6.5.
x
α
=
-
1
/
2,  β=1/2
α
=
0,  β=0
α
=
1
/
2,  β=-1/2
0.0
3.613
·
1
0
-
17
6.918
·
1
0
-
18
8.474
·
1
0
-
17
0.1
1.192
·
1
0
-
17
4.553
·
1
0
-
18
2.936
·
1
0
-
16
0.2
2.081
·
1
0
-
17
1.387
·
1
0
-
17
3.330
·
1
0
-
16
0.3
3.469
·
1
0
-
18
5.551
·
1
0
-
17
3.469
·
1
0
-
18
0.4
1.387
·
1
0
-
17
6.938
·
1
0
-
18
2.081
·
1
0
-
17
0.5
4.163
·
1
0
-
17
4.163
·
1
0
-
17
1.387
·
1
0
-
17
0.6
1.110
·
1
0
-
16
1.110
·
1
0
-
16
5.551
·
1
0
-
17
0.7
5.551
·
1
0
-
17
1.110
·
1
0
-
16
5.551
·
1
0
-
17
0.8
5.551
·
1
0
-
17
5.551
·
1
0
-
17
1.110
·
1
0
-
16
0.9
0
1.110
·
1
0
-
16
1.110
·
1
0
-
16
1.0
0
1.110
·
1
0
-
16
1.110
·
1
0
-
16Example 6.6.
We consider in this example the fifth order nonlinear problem:(6.16)u(5)(x)+u(x)u(4)(x)=f(x),x∈[0,1],
with initial conditions given at three different points,
(6.17)u(0)=u(1)(0)=u(2)(0)=u(3)(0)=u(4)(0)=0.
The exact solution of this problem is
(6.18)u(x)=x5cosx.In Table6, we list the absolute errors obtained by the shifted Jacobi collocation method, with different values of α, β and at N=18.Table 6
Absolute error using SJC method forN=18 Example 6.6.
x
α
=
-
1
/
2,  β=1/2
α
=
0,  β=0
α
=
1
/
2,  β=-1/2
0.0
0
1.991
·
1
0
-
18
6.938
·
1
0
-
18
0.1
1.665
·
1
0
-
16
3.037
·
1
0
-
17
2.638
·
1
0
-
16
0.2
4.996
·
1
0
-
16
4.353
·
1
0
-
17
3.538
·
1
0
-
16
0.3
1.665
·
1
0
-
16
1.908
·
1
0
-
17
3.764
·
1
0
-
16
0.4
1.665
·
1
0
-
16
6.418
·
1
0
-
17
3.122
·
1
0
-
17
0.5
2.775
·
1
0
-
17
5.204
·
1
0
-
17
6.938
·
1
0
-
18
0.6
0
8.326
·
1
0
-
17
5.204
·
1
0
-
17
0.7
1.110
·
1
0
-
16
1.110
·
1
0
-
16
7.632
·
1
0
-
17
0.8
1.665
·
1
0
-
16
1.110
·
1
0
-
16
4.163
·
1
0
-
17
0.9
2.775
·
1
0
-
16
1.110
·
1
0
-
16
1.387
·
1
0
-
16
1.0
5.551
·
1
0
-
16
1.110
·
1
0
-
16
2.220
·
1
0
-
16


## 7. Concluding Remarks

In this paper, we described a shifted Jacobi Galerkin method for third- and fifth-order ODEs with constant coefficients subject to homogeneous and nonhomogeneous initial conditions. The initial boundary conditions are satisfied exactly by expanding the unknown variable into a polynomial basis of functions which are built upon the shifted Jacobi polynomials. Because of the constant coefficients, the matrix elements of the discrete operators are provided explicitly, and this in turn greatly simplifies the steps and the computational effort for obtaining solutions. We have also presented some efficient direct solvers for the same equations with variable coefficients using P-SJG method.An efficient and accurate numerical scheme based on the SJC spectral method is proposed for solving these equations. The problem is reduced to the solution of nonlinear algebraic equations. Through several numerical examples, we evaluate the accuracy and performance of the proposed algorithms. The algorithms are easy to implement and yield very accurate results.



---

*Source: 364360-2012-09-12.xml*