# New Algorithm  for the Numerical Solutions of Nonlinear Third-Order Differential Equations Using Jacobi-Gauss Collocation Method

Authors: A. H. Bhrawy; W. M. Abd-Elhameed
Journal: Mathematical Problems in Engineering
 (2011)

---

## Abstract

A new algorithm for solving the general nonlinear third-order differential
equation is developed by means of a shifted Jacobi-Gauss collocation spectral method. The shifted
Jacobi-Gauss points are used as collocation nodes. Numerical examples are included to demonstrate
the validity and applicability of the proposed algorithm, and some comparisons are made with the
existing results. The method is easy to implement and yields very accurate results.


---

## Body

## 1. Introduction

During the past three decades, there has been a remarkable growth of interest in problems associated with systems of linear, nonlinear, and algebraic ordinary differential equations with split initial or boundary conditions. Throughout engineering and applied science, we are confronted with nonlinear or algebraic initial (two-point boundary) value problems that cannot be solved by analytical methods. With this interest in finding solutions to particular nonlinear initial (two-point boundary) value problems, came an increasing need for techniques capable of rendering relevant profiles. Although considerable progress has been made in developing new and powerful procedures, notably in the fields of fluid and celestial mechanics and chemical and control engineering, much remain to be done.In an initial value problem, we have to approximately determine in some intervalt0≤t≤T that solution u(t) of a third-order differential equation
(1.1)∂t3u(t)=f(t,u(t),∂tu(t),∂t2u(t)),
which has prescribed initial values
(1.2)u(t0)=d0,∂tu(t0)=d1,∂t2u(t0)=d2,
at the initial point t=t0. The existence and uniqueness of such a problem u(t) in this interval will be assumed. In fact, the problem of existence and uniqueness of solutions for initial value problems has been carefully investigated, and a detailed analysis has been published. Most approximate methods in current use yield approximations u1,…,uk,… to the values u(t1),…,u(tk),… of the exact solution at a number of discrete points t1,…,tk,…. The choice of method from among the numerous approximate methods available and the whole arrangement of the calculation is governed decisively by the number of steps, that is, the number of points tk and the accuracy required. In initial value problems, conditions particularly unfavorable to accuracy are met; not only is a lengthy calculation involved, in which inaccuracies at the beginning of the calculation influence all subsequent results, but also inaccuracies in the individuals u1,u2,… cause additional increases in the error. The above-mentioned points motivate our interest in spectral methods.Spectral methods (see, e.g., [1–3]) are one of the principal methods of discretization for the numerical solutions of differential equations. The main advantage of these methods lies in their accuracy for a given number of unknowns. For smooth problems in simple geometries, they offer exponential rates of convergence/spectral accuracy. In contrast, finite-difference and finite-element methods yield only algebraic convergence rates. The three most widely used spectral versions are the Galerkin, collocation, and tau methods. Collocation method [1, 4, 5] has become increasingly popular for solving differential equations. Also, they are very useful in providing highly accurate solutions to nonlinear differential equations.The use of general Jacobi polynomials has the advantage of obtaining the solutions of differential equations in terms of the Jacobi parametersα and β (see, e.g., [6–10]). In the present paper, we intend to extend the application of Jacobi polynomials from Galerkin method for solving two-point linear problems (see, [8, 9, 11]) to collocation method to solve nonlinear initial value problems.In particular, the third-order differential equations arise in many important number of physical problems, such as the deflection of a curved beam having a constant or varying cross-section, three-layer beam, the motion of rocket, thin film flow, electromagnetic waves, or gravity-driven flows [12–14]. Therefore, third-order differential equations have attracted considerable attention over the last three decades, and so many theoretical and numerical studies dealing with such equations have appeared in the literature (see [15–18] and references therein).The most common approach for solving third-order ordinary differential equations (ODEs) is the reduction of the problem to a system of first-order differential equations and then solving the system by employing one of the methods available, which notably has been inspected in the literature, see [19–21]. However, as mentioned previously, some authors have remarked that this approach wastes a lot of computer time and human effort (see [22–24]).The approximate solutions to general third-order ODEs were given by P-stable linear multistep method [25] and class of hybrid collocation method [26]. Recently, Mehrkanoon in [22] proposed a direct three-point implicit block multistep method for direct solution of the general third-order initial value problem using variable step size, and this method was based on a pair of explicit and implicit of Adams-Bashforth- and Adams-Moulton-type formulae. Recently, Guo and Wang [27] and Guo et al. [28] proposed two new collocation methods for initial value problems of first order ODEs with spectral accuracy. However, so far, there is no work concerning the collocation methods keeping the spectral accuracy, for initial value problems of third-order ODEs, since it is not easy to design proper algorithms and analyze their numerical errors precisely.The fundamental goal of this paper is to develop a suitable way to obtain approximate solutions for the nonlinear third-order differential equations on the interval(0,T) using truncated Jacobi polynomials expansion uN(t)=∑j=0NajPj(α,β)(t), where N is the number of retained modes. The nonlinear ODE is collocated only at the (N-2) points that are the (N-2) nodes of the shifted Jacobi-Gauss interpolation on (0,T). These equations together with three initial conditions generate (N+1) nonlinear algebraic equations which can be solved using Newton's iterative method. Finally, the accuracy of the proposed algorithm is demonstrated by solving some test problems. Numerical results are presented to illustrate the usual well-known exponential convergence behaviour of spectral approximations.This paper is arranged as follows. In Section2, we give an overview of shifted Jacobi polynomials and their relevant properties needed hereafter, and, in Section 3, the way to construct the collocation technique using the shifted Jacobi polynomials for solving numerically the nonlinear third-order differential equations is described. In Section 4, the proposed algorithm is applied to some types of nonlinear third-order differential equations, and some comparisons are made with the existing analytic solutions that were reported in other published works in the literature. Also, a conclusion is given in Section 5.


## 2. Preliminaries

The classical Jacobi polynomials associated with the real parameters (α>-1,β>-1; see, [29]) are a sequence of polynomials Pn(α,β)(n=0,1,2,…), each respective of degree n, satisfying the orthogonality relation
(2.1)∫-11(1-t)α(1+t)βPm(α,β)(x)Pn(α,β)(t)dt={0,m≠n,hn(α,β),m=n,
where
(2.2)hn(α,β)=2λΓ(n+α+1)Γ(n+β+1)n!(2n+λ)Γ(n+λ),λ=α+β+1.
The following two relations will be of fundamental importance in what follows
(2.3)Pk(α,β)(-t)=(-1)kPk(α,β)(t),(2.4)DmPk(α,β)(t)=Γ(m+k+α+β+1)2mΓ(k+α+β+1)Pk-m(α+m,β+m)(t).
Let w(α,β)(t)=(1-t)α(1+t)β be the weight function of the Jacobi polynomials on [-1,1], then we define the weighted space Lw(α,β)2(-1,1) as usual, equipped with the following inner product and norm as
(2.5)(u,v)w(α,β)=∫-11u(t)v(t)w(α,β)(t)dt,‖v‖w(α,β)=(v,v)w(α,β)1/2.
It is well known that the set of Jacobi polynomials forms a complete Lwα,β2(-1,1)-orthogonal system, and
(2.6)‖Pk(α,β)‖w(α,β)2=hk(α,β),
where hk(α,β) is as defined in (2.2).LetT>0, then the shifted Jacobi polynomial of degree k is defined by PT,k(α,β)(t)=Pk(α,β)(2t/T-1), and by virtue of (2.3) and (2.4), we have
(2.7)PT,k(α,β)(0)=(-1)kΓ(k+β+1)k!Γ(β+1),DqPT,k(α,β)(0)=(-1)k-qΓ(k+β+1)(k+α+β+1)qTq(k-q)!Γ(q+β+1).
Next, let wT(α,β)(t)=(T-t)αtβ, then we define the weighted space LwT(α,β)2(0,T), with the following inner product and norm as
(2.8)(u,v)wT(α,β)=∫0Tu(t)v(t)wT(α,β)(t)dt,‖v‖wT(α,β)=(v,v)wT(α,β)1/2.It can be easily shown that the set of shifted Jacobi polynomials forms a completeLwT(α,β)2(0,T)-orthogonal system. Moreover, and due to (2.6), it is not difficult to see that
(2.9)‖PT,k(α,β)‖wT(α,β)2=(T2)α+β+1hk(α,β)=hT,k(α,β).
It is worth noting that for α=β, one recovers the shifted ultraspherical polynomials (symmetric shifted Jacobi polynomials) and for α=β=∓1/2,α=β=0, the shifted Chebyshev of the first and second kinds and shifted Legendre polynomials, respectively; for the nonsymmetric shifted Jacobi polynomials, the two important special cases α=-β=∓1/2 (shifted Chebyshev polynomials of the third and fourth kinds) are also recovered.We denote bytN,j(α,β),0≤j≤N, to 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,T) are the zeros of PT,N+1(α,β)(t) which we denote by tT,N,j(α,β),0≤j≤N. Clearly, tT,N,j(α,β)=(T/2)(tN,j(α,β)+1), and their corresponding Christoffel numbers are ϖT,N,j(α,β)=(T/2)α+β+1ϖN,j(α,β),0≤j≤N. Let SN(0,T) be the set of polynomials of degree at most N, thanks to the property of the standard Jacobi-Gauss quadrature, then it follows that for any ϕ∈S2N+1(0,T),(2.10)∫0T(T-t)αtβϕ(t)dt=(T2)α+β+1∫-11(1-t)α(1+t)βϕ(T2(t+1))dt=(T2)α+β+1∑j=0NϖN,j(α,β)ϕ(T2(tN,j(α,β)+1))=∑j=0NϖT,N,j(α,β)ϕ(tT,N,j(α,β)).


## 3. Jacobi-Gauss Collocation Method for Nonlinear Third-Order ODEs

The third-order nonlinear ODEs(3.1)F(t,u(t),∂tu(t),∂t2u(t),∂t3u(t))=0,
can often be solved for ∂t3u(t) term to determine that
(3.2)∂t3u(t)=f(u(t),∂tu(t),∂t2u(t)).
By the implicit function theorem, if
(3.3)∂F∂t3u(t)(t,u(t),∂tu(t),∂t2u(t),∂t3u(t))≠0,
then the solutions of (3.2) are the only solutions possible. However, at these points where
(3.4)∂F∂t3u(t)(t,u(t),∂tu(t),∂t2u(t),∂t3u(t))=0,
there exists the possibility of singular solutions.If the∂t3u(t) term is eliminated from the two equations
(3.5)F(t,u(t),∂tu(t),∂t2u(t),∂t3u(t))=0,∂F∂t3u(t)(t,u(t),∂tu(t),∂t2u(t),∂t3u(t))=0,
then an equation of the form
(3.6)H(t,u(t),∂tu(t),∂t2u(t))=0
results. Its solution (s) describe the singular loci. In this section, we are interested in using the shifted Jacobi-Gauss collocation method to solve numerically the following model problem
(3.7)∂t3u(t)=f(t,u(t),∂tu(t),∂t2u(t)),0<t≤T,
subject to Cauchy initial conditions
(3.8)u(0)=d0,∂tu(0)=d1,∂t2u(0)=d2,
where the values of d0, d1, and d2 describe the initial state of u(t) and f(t,u(t),∂tu(t),∂t2u(t)) is a nonlinear function of t,u,∂tu,and∂t2u which may be singular at t=0.Let us first introduce some basic notation that will be used in the sequel. We set(3.9)SN(0,T)=span⁡{PT,0(α,β)(t),PT,1(α,β)(t),…,PT,N(α,β)(t)},
and we define the discrete inner product and norm as
(3.10)(u,v)wT(α,β),N=∑j=0Nu(tT,N,j(α,β))v(tT,N,j(α,β))ϖT,N,j(α,β),‖u‖wT(α,β),N=(u,u)wT(α,β),N,
where tT,N,j(α,β) and ϖT,N,j(α,β) are the nodes and the corresponding weights of the shifted Jacobi-Gauss-quadrature formula on the interval (0,T), respectively.Obviously,(3.11)(u,v)wT(α,β),N=(u,v)wT(α,β),∀uv∈S2N-1.
Thus, for any u∈SN(0,T), the two norms ∥u∥wT(α,β),N and ∥u∥wT(α,β) coincide.Associated with this quadrature rule, we denote byINPT(α,β) to the shifted Jacobi-Gauss interpolation, that is,
(3.12)INPT(α,β)u(tT,N,j(α,β))=u(tT,N,j(α,β)),0≤j≤N.The shifted Jacobi-Gauss collocation method for solving (3.7) and (3.8) is to seek uN(t)∈SN(0,T) such that
(3.13)∂t3uN(tT,N,k(α,β))=f(tT,N,k(α,β),uN(tT,N,k(α,β)),∂tuN(tT,N,k(α,β)),∂t2uN(tT,N,k(α,β))),k=0,1,…,N-3,uN(i)(0)=di,i=0,1,2.
Now, we derive an algorithm for solving (3.7) and (3.8). For this purpose, let
(3.14)uN(t)=∑j=0NajPT,j(α,β)(t),a=(a0,a1,…,aN)T,
then we obtain ∂tu(t),and∂t2u(t) and ∂t3u(t) with the aid of (3.14), and accordingly by (3.7) takes the form
(3.15)∑j=0NajD3PT,j(α,β)(t)=f(t,∑j=0NajPT,j(α,β)(t),∑j=0NajDPT,j(α,β)(t),∑j=0NajD2PT,j(α,β)(t)).
and by virtue of (2.4), we deduce that
(3.16)1T3∑j=3Naj(j+λ)3PT,j-3(α+3,β+3)(t)=f(t,∑j=0NajPT,j(α,β)(t),1T∑j=1Naj(j+λ)PT,j-1(α+1,β+1)(t),1T2∑j=2Naj(j+λ)2PT,j-2(α+2,β+2)(t)).
The substitution of (3.14) into (3.8) gives
(3.17)∑j=0NajDiPT,j(α,β)(0)=di,i=0,1,2.
Now, we collocate (3.16) at the (N-2) shifted Jacobi roots, to get
(3.18)1T3∑j=3Naj(j+λ)3PT,j-3(α+3,β+3)(tT,N,k(α,β))=ftT,N,k(α,β),∑j=0NajPT,j(α,β)(tT,N,k(α,β)),1T∑j=1Naj(j+λ)PT,j-1(α+1,β+1)(tT,N,k(α,β)),1T2∑j=2Naj(j+λ)2PT,j-2(α+2,β+2)(tT,N,k(α,β))k=0,1,…,N-3
After making use of (2.7) for q=1 and q=2, (3.17) can be written as
(3.19)∑j=0N(-1)jΓ(j+β+1)Γ(β+1)j!aj=d0,∑j=1N(-1)j-1Γ(j+β+1)(j+α+β+1)T(j-1)!Γ(β+2)aj=d1,∑j=2N(-1)j-2Γ(j+β+1)(j+α+β+1)2T2(j-2)!Γ(β+3)aj=d2.The scheme (3.18)-(3.19) may be rewritten in a more suitable compact matrix form. To do this, we define the (N+1)×(N+1) matrix A with entries akj as follows:
(3.20)akj={(j+λ)3T3PT,j-3(α+3,β+3)(tT,N,k(α,β)),0≤k≤N-3,3≤j≤N,(-1)jΓ(j+β+1)Γ(β+1)j!,k=N-2,3≤j≤N,(-1)j-1Γ(j+β+1)(j+α+β+1)T(j-1)!Γ(β+2),k=N-1,3≤j≤N,(-1)j-2Γ(j+β+1)(j+α+β+1)2T2(j-2)!Γ(β+3),k=N,3≤j≤N,0,otherwise.
Also, we define the (N-2)×(N+1) three matrices B,CandD with entries bkj,ckj,anddkj as follows:
(3.21)bkj=PT,j(α,β)(tT,N,k(α,β)),0≤k≤N-3,0≤j≤N,ckj={(j+λ)TPT,j-1(α+1,β+1)(tT,N,k(α,β)),0≤k≤N-3,1≤j≤N,0,0≤k≤N-3,j=0,dkj={(j+λ)2T2PT,j-2(α+2,β+2)(tT,N,k(α,β)),0≤k≤N-3,2≤j≤N,0,0≤k≤N-3,j=0,1.
Further, let a=(a0,a1,…,aN)T, and(3.22)F(a)=(f(tT,N,0(α,β),uN(tT,N,0(α,β)),∂tuN(tT,N,0(α,β)),∂t2uN(tT,N,0(α,β))),…,f(tT,N,N-3(α,β),uN(tT,N,N-3(α,β)),∂tuN(tT,N,N-3(α,β)),∂t2uN(tT,N,N-3(α,β))),d0,d1,d2)T,
where uN(tT,N,k(α,β)),∂tuN(tT,N,k(α,β)),and∂t2uN(tT,N,k(α,β)) are the kth component of Ba,Ca,andDa, respectively. The scheme (3.18)-(3.19) may be written in the matrix form
(3.23)Aa=F(a),
or equivalently
(3.24)a=A-1F(a),
which constitutes an (N+1) nonlinear algebraic equation that can be solved for the unknown coefficients aj by using the well-known Newton's method, and, consequently, uN(t) given in (3.14) can be evaluated. A builded package in Mathematica version 6 named “FindRoot” searches for a solution to the simultaneous nonlinear system (3.24) based on Newton's method with zero initial guess used.


## 4. Numerical Results

To illustrate the effectiveness of the proposed algorithm of this paper, three test examples are carried out in this section. Comparisons of our obtained results with those obtained by some other algorithms reveal that the present method is very effective and more convenient.We consider the following examples.Example 4.1.
Consider the following linear third-order differential equation [22, 25]:
(4.1)u′′′(t)-2u′′(t)-3u′(t)+10u(t)=34te-2t-16e-2t-10t2+6t+34,t∈[0,b],
subject to the initial conditions
(4.2)u(0)=3,u′(0)=0,u′′(0)=0,
with the exact solution
(4.3)u(t)=t2e-2t-t2+3.A similar problem was also investigated by Awoyemi [25] using a P-stable linear multistep method and Mehrkanoon [22] using a direct variable step block multistep method.In case ofb=1 in [22, 25], the best results are achieved with 200 and 32 steps and the maximum absolute errors are 44.89·10-7 and 6.54·10-10, respectively, and when b=4, the maximum absolute errors are 1.46·10-4 and 6.19·10-9 with 800 and 50 steps by using methods in [25] and [22], respectively. In Table 1, we introduce the maximum absolute error, using SJCM with various choices of α,β, and N. Numerical results of this linear third-order differential equation show that SJCM converges exponentially and that it is more accurate than the two methods in [22, 25].Table 1
Maximum absolute error forN=10,20,30 for Example 4.1.
NαβbSJCMbSJCM102118.54·10-744.18·100111.54·10-64.14·1000.5−0.58.28·10-81.15·100−0.50.51.18·10-62.66·10-1202118.32·10-1647.52·10-8119.15·10-161.33·10-70.5−0.58.04·10-162.30·10-9−0.50.53.92·10-166.51·10-8302116.10·10-1641.18·10-13111.94·10-162.14·10-130.5−0.53.33·10-167.63·10-14−0.50.53.73·10-162.57·10-13Example 4.2.
Consider the following nonlinear third-order differential equation [22, 30]:
(4.4)u′′′(t)+2e-3u(t)=4(1+t)-3,t∈[0,b],
subject to the initial conditions
(4.5)u(0)=0,u′(0)=1,u′′(0)=-1,
with the exact solution
(4.6)u(t)=ln⁡(1+t).This type of equation has been solved in [22, 30] with the fourth-degree B-spline functions and in [22] using a direct variable step block multistep method.In Table2, we list the results obtained by the shifted Jacobi-Gauss collocation method proposed in this paper with α=β=0 (shifted Legendre-Gauss collocation method), α=β=-1/2 (first-kind shifted Chebyshev-Gauss collocation method) and α=β=1/2 (second-kind shifted Chebyshev-Gauss collocation method). The displayed results show that the value α=β=0 faster than other tested values of αandβ, and the SJCM method converges exponentially and is more accurate than direct variable step block multistep method [22].Table 2
Maximum absolute error forN=8,16,28,32,40 for Example 4.2.
NαβbSJCMbSJCM80.50.512.96·10-541.45·10-1003.38·10-71.89·10-2−0.5−0.51.47·10-58.24·10-2160.50.514.06·10-1141.01·10-4009.05·10-148.95·10-8−0.5−0.56.63·10-122.04·10-5240.50.512.24·10-1646.50·10-8003.33·10-162.37·10-11−0.5−0.54.44·10-167.62·10-9320.50.513.33·10-1643.83·10-11004.44·10-168.88·10-15−0.5−0.54.44·10-163.19·10-12400.50.513.33·10-1641.73·10-14004.44·10-168.65·10-15−0.5−0.54.44·10-162.44·10-15Note 4.3.
The Taylor series(4.7)ln⁡(1+t)=t-12t2+13t3-⋯
converges very slowly near t=1, and 104 terms are needed to guarantee a truncation error less than 10-4. In terms of the shifted Jacobi polynomials (α=β=-1/2), we find (see [31])
(4.8)ln⁡(1+t)=ln⁡(3+224)T0*(t)+2{λT1*(t)-12λ2T2*(t)+13λ3T3*(t)-⋯},
where λ=3-22 and Ti*(t)=P1,i(-1/2,-1/2)(t) is the shifted Chebyshev polynomial of the first kind defined on [0,1]. This expression is similar in form to the Taylor series, but converges much faster. In fact, truncation after the term in T3*(t) gives an error whose major term is λ4/2 which is less than (1/2)×10-3, compared with 0.25 of the corresponding Taylor's series truncation.Example 4.4.
Consider the following singular nonlinear problem(4.9)u′′′(t)+2tu′(t)-u′′(t)u(t)-16π2u2(t)=(8πt-64π3)cos⁡(4πt),t∈[0,1],u(0)=0,u′(0)=4π,u′′(0)=0,
with the exact solution u(t)=sin(4πt).In Table3, we introduce maximum absolute error, using SJCM with various choices of α,β, and N. Numerical results of this example show that SJCM converges exponentially for all values of αandβ, it also indicates that the numerical solution converges fast as N increases. The approximate solutions at a few collocation points (N=12) for α=β=0, α=β=0.5, and α=β=1, and the exact solution of this example are depicted in Figure 1 from which it is evident that in case of α=β=0 with a few collocation points, the approximate solution agrees very well with the exact solution. From Table 3 and Figure 1, the values α=β=0 give the best accuracy among all the tested values of αandβ for all values of N.Table 3
Maximum absolute error forN=10,20,30 for Example 4.4.
NαβSJC10121.60·10-1−0.5−0.53.25·10-1001.38·10-120128.52·10-9−0.5−0.51.04·10-7006.96·10-930121.54·10-14−0.5−0.56.10·10-15004.71·10-15Figure 1
Comparing the approximate solutions atN=12 for α=β=0, α=β=0.5, α=β=1, and the exact solution of Example 4.4.


## 5. Conclusion

An efficient and accurate numerical algorithm based on the Jacobi-Gauss collocation spectral method is proposed for solving the nonlinear third-order differential equations. The problem is reduced to the solution of system of simultaneous nonlinear algebraic equations. To the best of our knowledge, this is the first work concerning the Jacobi-Gauss collocation algorithm for solving general third-order differential equations. Numerical examples were given to demonstrate the validity and applicability of the algorithm. The results show that the method is simple and accurate. In fact, by selecting few collocation points, excellent numerical results are obtained. Numerical results in Tables1–3 enables us to conclude that the expansion based on Chebyshev polynomials (α=β=-1/2) is not always the best. This conclusion has been asserted by Light [32].



---

*Source: 837218-2011-03-30.xml*