Theory and Modern Applications

# Jacobi orthogonal approximation with negative integer and its application to ordinary differential equations

## Abstract

In this paper, the Jacobi spectral method for ordinary differential equations, which is based on the Jacobi approximation with negative integer, is proposed. This method is very efficient for the initial value problem of ordinary differential equations. The global convergence of proposed algorithm is proved. Numerical results demonstrate the spectral accuracy of this new approach and coincide well with theoretical analysis.

## 1 Introduction

Many practical problems arising in science and engineering require us to solve the initial value problems of first-order ODEs. There have been fruitful results on their numerical solutions (see, e.g., Butcher [1, 2], Hairer et al. [3], Hairer and Wanner [4], Higham [5] and Stuart and Humphries [6]). For Hamiltonian systems, we refer to the powerful symplectic difference method of Feng [7], also see [8, 9] and the references therein.

In the past four decades, the spectral-collocation algorithm has been developed rapidly [10â€“13]. Compared with the finite-difference method, its merit is high accuracy. But the main approach used there is the spectral-collocation method which is similar to the finite-difference approach. It makes use of values of interpolation points to present coefficients of expanded form of the numerical solution, and as a result its computing scheme is complex and the corresponding error analysis is tedious. However, with a finite-element type approach, as shown in this paper, it is natural to put the approximation scheme under the general inner product type framework. We take advantage of the property of orthogonal polynomials sufficiently, and the results are that the computing scheme is simple and that the relevant convergence theory, as will be seen from SectionÂ 3, is cleaner and more reasonable than the collocation method.

In this paper, a kind of novel algorithm, which is called Jacobi spectral method, is proposed to solve the initial value problem of the equation $$\frac{du}{dx}=f(u,x)$$, and it differs from the collocation method and has several advantages. Firstly, although both the spectral method and the collocation algorithm possess high accuracy, the spectral method is simpler in computing scheme and easier to be implemented, especially for nonlinear systems. Secondly, compared with the difference method, the spectral method possesses high accuracy. Finally, the numerical solution is represented in the form of continuous function, so it can more entirely simulate the global property of exact solution and provide more information about the structures of exact solution than the collocation algorithm. Sometimes, this is very important in many practical problems. Theoretical analysis of the spectral method is simpler than that of the collocation method.

The paper is organized as follows. In the next section, we investigate the Jacobi approximation. In SectionÂ 3, we propose a kind of new algorithm by using the Jacobi approximation with negative integer. We present numerical results in SectionÂ 4, which demonstrate the spectral accuracy of the proposed method and coincide well with the theoretical analysis. The final section is conclusion.

## 2 Orthogonal approximation

In this section, we investigate some results about the Jacobi approximation. Let $$\Lambda=\{x \mid -1< x<1\}$$ and $$\chi^{(\alpha,\beta)}(x)=(1-x)^{\alpha}(1+x)^{\beta}$$, $$\alpha,\beta>-1$$ be a certain weight function. We define the weighted space

$$L^{2}_{\chi^{(\alpha,\beta)}}(\Lambda)=\bigl\{ v \mid v \mbox{ is measurable on } \Lambda \mbox{ and } \|v\|_{\chi^{(\alpha,\beta)}}< \infty\bigr\} ,$$

with the following inner product and norm:

$$(u,v)_{\chi^{(\alpha,\beta)}}=\int_{\Lambda}u(x)v(x) \chi^{(\alpha,\beta)}(x)\, dx,\qquad \|v\|_{\chi^{(\alpha,\beta )}}=(v,v)_{\chi^{(\alpha,\beta)}}^{\frac{1}{2}}.$$

For any integer $$m\geq0$$, we define the weighted Sobolev space

$$H_{\chi^{(\alpha,\beta)}}^{m}(\Lambda)=\biggl\{ v \Bigm| \frac{d^{k}v}{dx ^{k}} \in L _{\chi^{(\alpha,\beta)}}^{2}(\Lambda), 0\leq k\leq m\biggr\} ,$$

equipped with the following inner product, semi-norm and norm:

\begin{aligned}& (u,v)_{m,\chi^{(\alpha,\beta)}}=\sum_{0\leq k\leq m}\biggl( \frac {d^{k}u}{dx ^{k}},\frac{d^{k}v}{dx ^{k}}\biggr)_{\chi^{(\alpha,\beta)}}, \\& |v|_{m,\chi^{(\alpha,\beta)}}=\biggl\Vert \frac{d^{m}v}{dx ^{m}}\biggr\Vert _{\chi ^{(\alpha,\beta)}}, \qquad \|v\|_{m,\chi^{(\alpha,\beta)}}= (v,v)_{m,\chi^{(\alpha,\beta)}}^{1/2}. \end{aligned}

For any $$r>0$$, the space $$H_{\chi^{(\alpha,\beta)}}^{r}(\Lambda)$$ and its norm $$\|v\|_{r,\chi ^{(\alpha,\beta)}}$$ are defined by space interpolation as in [14]. In particular, $${}_{0}H_{\chi^{(\alpha,\beta)}}^{1}(\Lambda)=\{v\in H_{\chi^{(\alpha ,\beta)}}^{1}(\Lambda) \mid v(-1)=0\}$$.

Let $$\chi^{(\alpha,\beta)}(x)=(1-x)^{\alpha}(1+x)^{\beta}$$, $$\alpha,\beta>-1$$. The Jacobi polynomials of degree l are defined by

$$(1-x)^{\alpha}(1+x)^{\beta}J_{l}^{(\alpha,\beta)}(x)= \frac{(-1)^{l}}{2^{l}l!} \frac{d^{l}}{dx ^{l}}\bigl((1-x)^{l+\alpha}(1+x)^{l+\beta} \bigr),\quad l=0,1,2,\ldots.$$

They are the eigenfunctions of the Sturm-Liouville problem

$$\frac{d}{dx}\biggl((1-x)^{1+\alpha}(1+x)^{1+\beta} \frac {dv(x)}{dx}\biggr)+\lambda^{(\alpha,\beta)}_{l}(1-x)^{\alpha}(1+x)^{\beta} v(x)= 0,\quad x\in\Lambda$$
(2.1)

with the corresponding eigenvalues $$\lambda^{(\alpha,\beta)}_{l}=l(l+\alpha +\beta+1)$$. They fulfill the following recurrence relations:

\begin{aligned}& (2l+\alpha+\beta+2) (1-x)J_{l}^{(\alpha+1,\beta)}(x)=2(l+\alpha +1)J_{l}^{(\alpha,\beta)}(x) -2(l+1)J_{l+1}^{(\alpha,\beta)}(x), \end{aligned}
(2.2)
\begin{aligned}& \frac{dJ_{l}^{(\alpha,\beta)}(x)}{dx}=\frac{1}{2}(l+\alpha+\beta +1)J_{l-1}^{(\alpha+1,\beta+1)}(x), \end{aligned}
(2.3)
\begin{aligned}& J_{l}^{(\alpha,\beta)}(x)=\frac {\Gamma(l+\beta+1)}{\Gamma(l+\alpha+\beta+1)} \sum _{k=0}^{l}\frac{(2k+\alpha+\beta)\Gamma(k+\alpha+\beta )}{\Gamma(k+\beta+1)}J_{k}^{(\alpha-1,\beta)}(x), \end{aligned}
(2.4)
\begin{aligned}& J_{l}^{(\alpha,\beta)}(x)=\frac{\Gamma(l+\alpha+1)}{\Gamma (l+\alpha+\beta+1)} \sum _{k=0}^{l}(-1)^{l-k}\frac{(2k+\alpha+\beta)\Gamma(k+\alpha +\beta)}{\Gamma(k+\alpha+1)}J_{k}^{(\alpha,\beta-1)}(x). \end{aligned}
(2.5)

We note that $$J_{l}^{(\alpha,\beta)}(-x)=(-1)^{l}J_{l}^{(\beta,\alpha )}(x)$$; this, together with (2.2), leads to

$$(2l+\alpha+\beta+2) (1+x)J_{l}^{(\alpha,\beta+1)}(x)=2(l+\beta +1)J_{l}^{(\alpha,\beta)}(x) +2(l+1)J_{l+1}^{(\alpha,\beta)}(x).$$
(2.6)

The set of $$J^{(\alpha,\beta)}_{l}(x)$$ is the complete $$L^{2}_{\chi^{(\alpha,\beta)}}(\Lambda)$$-orthogonal system, namely

$$\bigl(J_{l}^{(\alpha,\beta)}, J_{m}^{(\alpha,\beta)} \bigr)_{\chi^{(\alpha,\beta )},\Lambda}=\left \{ \textstyle\begin{array}{l@{\quad}l} \gamma_{l}^{(\alpha,\beta)}, &l=m, \\ 0, &l\neq m, \end{array}\displaystyle \right .$$
(2.7)

where

$$\gamma_{l}^{(\alpha,\beta)}=\frac{2^{\alpha+\beta+1}\Gamma (l+\alpha+1)\Gamma(l+\beta+1)}{(2l+\alpha+\beta+1) \Gamma(l+\alpha+\beta+1)\Gamma(l+1)}.$$

Thus, for any $$v\in L_{\chi^{(\alpha,\beta)}}^{2}(\Lambda)$$,

$$v(x)=\sum_{l=0}^{\infty}\hat{v}_{l}^{(\alpha,\beta)}J_{l}^{(\alpha ,\beta)}(x)$$

with the coefficients

$$\hat{v}_{l}^{(\alpha,\beta)}=\frac{1}{\gamma_{l}^{(\alpha,\beta)}} \bigl(v,J_{l}^{(\alpha,\beta)} \bigr)_{\chi^{(\alpha,\beta)},\Lambda},\quad l\geq0 .$$

Now, let N be any positive integer and $${\mathcal{P}}_{N}({\Lambda })$$ be the set of all algebraic polynomials of degree at most N. Furthermore, $${}_{0}{\mathcal{P}}_{N}({\Lambda})=\{v\in{\mathcal{P}}_{N}({\Lambda}) \mid v(-1)=0\}$$.

In order to describe the approximation results, we introduce the Hilbert space $$H_{\chi^{(\alpha,\beta)},A}^{r}(\Lambda)$$. For any nonnegative integer r,

$$H_{\chi^{(\alpha,\beta)},A}^{r}(\Lambda)=\bigl\{ v \mid v \mbox{ is measurable on } \Lambda \mbox{ and } \Vert v\Vert _{r,\chi^{(\alpha,\beta)},A}< \infty\bigr\} ,$$

where

$$\|v\|_{r,\chi^{(\alpha,\beta)},A}=\Biggl(\sum_{k=0}^{[\frac{r-1}{2}]} \biggl\Vert \bigl(1-x^{2}\bigr)^{\frac{r}{2}-k}\frac{d^{r-k}v}{dx^{r-k}} \biggr\Vert _{\chi ^{(\alpha,\beta)}}+ \|v\|_{[\frac{r}{2}],\chi^{(\alpha,\beta)}}\Biggr)^{\frac{1}{2}}.$$

For any real $$r>0$$, we define the space $$H_{\chi^{(\alpha,\beta)},A}^{r}(\Lambda)$$ and its norm by space interpolation as in [14].

We also define the space $${}_{0}H_{\chi^{(\alpha,\beta)},A}^{r}(\Lambda)$$ as

$${}_{0}H_{\chi^{(\alpha,\beta)},A}^{r}(\Lambda)=\bigl\{ v\in H_{\chi^{(\alpha ,\beta)},A}^{r}(\Lambda) \mid v(-1)=0\bigr\} .$$

For any real $$\gamma, \delta>-1$$, similar to $$L^{2}_{\chi^{(\alpha ,\beta)}}(\Lambda)$$, we define the space $$L^{2}_{\chi^{(\gamma,\delta )}}(\Lambda)$$.

In forthcoming discussions, we will use the following lemma.

### Lemma 2.1

If

$$1< \alpha\leq\gamma+2, \qquad 1< \beta\leq\delta+2,$$

then for any $$v \in H^{1}_{\chi^{(\alpha,\beta)}}(\Lambda)\cap L^{2}_{\chi^{(\gamma,\delta)}}(\Lambda)$$,

$$\|v\|_{\chi^{(\gamma,\delta)}}\leq c\|v\|_{1,\chi^{(\alpha,\beta)}}.$$

Moreover, for any $$v \in H^{1}_{\chi^{(\alpha,\beta)}}(\Lambda)\cap L^{2}_{\chi^{(\gamma,\delta)}}(\Lambda)$$ with $$v(x_{0})=0$$, $$x_{0}\in\Lambda$$,

$$\|v\|_{\chi^{(\gamma,\delta)}}\leq c|v|_{1,\chi^{(\alpha,\beta)}}$$

provided that

$$\alpha\leq\gamma+2, \qquad \beta\leq\delta+2.$$

For the proof, see LemmaÂ 3.4 of [15].

Next, we recall the Jacobi orthogonal approximation. The orthogonal projection $$P_{N,\alpha,\beta}:L_{\chi^{(\alpha,\beta)}}^{2}(\Lambda )\rightarrow {\mathcal{P}}_{N}({\Lambda})$$ is defined by

$$(P_{N,\alpha,\beta}v-v,\phi)_{\chi^{(\alpha,\beta)}}=0,\quad \forall\phi\in{ \mathcal{P}}_{N}({\Lambda}).$$

We also define the projection $${}_{0}P_{N,\alpha,\beta}:{}_{0}L_{\chi^{(\alpha,\beta)}}^{2}(\Lambda )\rightarrow {}_{0}{\mathcal{P}}_{N}({\Lambda})$$ as

$$({}_{0}P_{N,\alpha,\beta}v-v,\phi)_{\chi^{(\alpha,\beta)}}=0,\quad \forall\phi \in{}_{0}{\mathcal{P}}_{N}({\Lambda}),$$

where

$${}_{0}L_{\chi^{(\alpha,\beta)}}^{2}(\Lambda)=\bigl\{ v \mid v \in L_{\chi ^{(\alpha,\beta)}}^{2}(\Lambda) \mbox{ and } v(-1)=0\bigr\} .$$

The following results characterize the property of $$P_{N,\alpha,\beta}$$ and $${}_{0}P_{N,\alpha,\beta}$$.

### Lemma 2.2

For any integers $$r \geq0$$, $$v\in H_{\chi ^{(\alpha,\beta)},A}^{r}(\Lambda)\cap L^{2}_{\chi^{(\alpha,\beta )}}(\Lambda)$$,

$$\|P_{N,\alpha,\beta}v-v\|_{\chi^{(\alpha,\beta)}} \leq cN^{-r}\|v \|_{r,\chi^{(\alpha,\beta)},A}.$$

For the proof, see [16].

### Lemma 2.3

For any integers $$r\geq1$$, $$v \in{}_{0}H_{\chi ^{(\alpha,\beta)},A}^{r}(\Lambda)\cap{}_{0}L_{\chi^{(\alpha,\beta )}}^{2}(\Lambda)$$,

$$\|{}_{0}P_{N,\alpha,\beta}v-v\|_{\chi^{(\alpha,\beta)}} \leq cN^{1-r} \|v\|_{r,\chi^{(\alpha,\beta)},A}.$$

### Proof

By the projection theorem,

$$\|{}_{0}P_{N,\alpha,\beta}v-v\|_{\chi^{(\alpha,\beta)}} \leq\|\phi-v \|_{\chi^{(\alpha,\beta)}}, \quad \forall \phi\in{}_{0}{\mathcal{P}}_{N}({ \Lambda}).$$

Take $$\phi(x)=\int_{-1}^{x}P_{N-1,\alpha,\beta}v'\, d\xi$$ in the above. Clearly, $$\phi\in{}_{0}{\mathcal{P}}_{N}({\Lambda})$$. According to LemmaÂ 2.1, we have

$$\|{}_{0}P_{N,\alpha,\beta}v-v\|_{\chi^{(\alpha,\beta)}} \leq c\biggl\Vert P_{N-1,\alpha,\beta}\frac{dv}{dx}-\frac{dv}{dx}\biggr\Vert _{\chi ^{(\alpha,\beta)}}.$$

A combination of LemmaÂ 2.2 and this inequality leads to the desired result.â€ƒâ–¡

### Lemma 2.4

For any $$\phi\in{\mathcal{P}}_{N}(\Lambda)\cap H^{r}_{\chi^{(\alpha,\beta)}}(\Lambda)\cap L^{2}_{\chi^{(\alpha,\beta )}}(\Lambda)$$, integer $$r\geq0$$,

$$\|\phi\|^{2}_{r,\chi^{(\alpha,\beta)}}\leq cN^{2r}\|\phi \|^{2}_{\chi^{(\alpha,\beta)}}.$$

For the proof, see [16].

For numerical solutions of ordinary differential equations, we need other orthogonal projections. For this purpose, we introduce the space, for $$r\geq n$$,

$${\mathcal{H}}^{r}_{0,n}({\Lambda})=\bigl\{ v \mid v \mbox{ is measurable on } \Lambda \mbox{ and } \Vert v\Vert _{{\mathcal{H}}^{r}_{0,n,\Lambda}}< \infty \bigr\} ,$$

equipped with the following semi-norm and norm:

$$| v|_{{\mathcal{H}}^{r}_{0,n}({\Lambda})}=\biggl\Vert \frac{d^{r}v}{dx^{r}}\biggr\Vert _{\chi^{(r,-n+r)}}, \qquad \|v\|_{{\mathcal{H}}^{r}_{0,n}({\Lambda })}=\Biggl(\sum _{k=0}^{r}| v|^{2}_{{\mathcal{H}}^{k}_{0,n}({\Lambda })} \Biggr)^{\frac{1}{2}}.$$

Accordingly, we define the space, for $$r\geq n$$,

$${}_{0}{\mathcal{H}}^{r}_{0,n}({\Lambda})=\biggl\{ \phi\in{\mathcal{H}}^{r}_{0,n}({\Lambda})\Bigm| \frac{d^{l}\phi(-1)}{dx^{l}}=0, 0\leq l\leq n-1\biggr\} .$$

In this paper, we shall use a specific family of Jacobi polynomials. They are defined by

$${\mathcal{L}}_{l}^{(0,n)}(x)=(1+x)^{n} J_{l-n}^{(0,n)}(x),\quad l\geq n, n\geq1.$$

The set of $${\mathcal{L}}^{(0,n)}_{l}(x)$$ is the complete $$L^{2}_{\chi^{(0,-n)}}(\Lambda)$$-orthogonal system, namely

$$\bigl({\mathcal{L}}_{l}^{(0,n)}, {\mathcal{L}}_{m}^{(0,n)} \bigr)_{\chi ^{(0,-n)},\Lambda}=\left \{ \textstyle\begin{array}{l@{\quad}l} \gamma_{m-n}^{(0,n)}, &l=m, \\ 0, &l\neq m. \end{array}\displaystyle \right .$$
(2.8)

Let

$${}_{0}{\mathcal{P}}^{n}_{N}({\Lambda})=\biggl\{ \phi\in{\mathcal{P}}_{N}({\Lambda})\Bigm|\frac{d^{l}\phi(-1)}{dx^{l}}=0, 0\leq l \leq n-1\biggr\} .$$

Now we define the projection operator $$P_{N}^{n,0}: {}_{0}{\mathcal{H}}^{r}_{0,n}({\Lambda})\rightarrow{}_{0}{\mathcal{P}}^{n}_{N}({\Lambda})$$ as

$$\int_{-1}^{1}\frac{d^{n}(v-P_{N}^{n,0}v)}{dx^{n}} \frac {d^{n}\phi}{dx^{n}}\chi^{(n,0)}\, dx =0, \quad \forall\phi \in{}_{0}{\mathcal{P}}^{n}_{N}({\Lambda}).$$

### Lemma 2.5

For any $$v \in{}_{0}{\mathcal{H}}^{r}_{0,n}({\Lambda })$$, integer $$0\leq k\leq r\leq N+1$$,

$$\biggl\Vert \frac{d^{k}}{dx^{k}}\bigl(v-P_{N}^{n,0}v\bigr) \biggr\Vert _{\chi^{(k,-n+k)}}\leq cN^{k-r}\biggl\Vert \frac{d^{r}v}{dx^{r}}\biggr\Vert _{\chi^{(r,-n+r)}}.$$

For the proof, see LemmaÂ 2.3 of [17].

Next, we introduce a polynomial

$$\chi^{-}_{n}(x)=\sum_{l=0}^{n-1} \frac{d^{l}\varphi(-1)}{dx^{l}}\frac {(1+x)^{l}}{l!} \in{\mathcal{P}}_{N}({\Lambda}),$$

which satisfies

$$\frac{d^{m}\chi^{-}_{n}(-1)}{dx^{m}}=\frac{d^{m}\varphi (-1)}{dx^{m}},\quad 0\leq m\leq n-1.$$

For each function Ï† in $${\mathcal{H}}^{r}_{0,n}({\Lambda})$$, we define a function $$\tilde{\varphi}_{n}$$ in $${}_{0}{\mathcal{H}}^{r}_{0,n}({\Lambda})$$ by

$$\tilde{\varphi}_{n}=\varphi-\chi^{-}_{n}(x).$$
(2.9)

Following the same idea as in [17], we define the Jacobi quasi-orthogonal projection as

$$\widetilde{P}_{0,N}^{n}\varphi=P_{N}^{n,0} \tilde{\varphi}_{n} +\chi^{-}_{n}(x).$$
(2.10)

Obviously, for any $$\varphi\in H_{\chi^{(r,-n+r)}}^{r}(\Lambda)$$ and integer $$r\geq k \geq0$$,

$$\varphi-\widetilde{P}_{0,N}^{n}\varphi=\tilde{\varphi }_{n}-P_{N}^{n,0}\tilde{\varphi}_{n}.$$

\begin{aligned} \biggl\Vert \frac{d^{k}}{dx^{k}}\bigl(\varphi-\widetilde {P}_{0,N}^{n} \varphi\bigr)\biggr\Vert _{\chi^{(k,-n+k)}} & =\biggl\Vert \frac{d^{k}}{dx^{k}} \bigl(\tilde{\varphi}_{n}-P_{N}^{n,0}\tilde { \varphi}_{n}\bigr)\biggr\Vert _{\chi^{(k,-n+k)}} \\ & \leq cN^{k-r}\biggl\Vert \frac{d^{r}\varphi}{dx^{r}}\biggr\Vert _{\chi^{(r,-n+r)}}. \end{aligned}
(2.11)

Next, we define $$\widehat{P}_{N}^{1}$$ as

$$\widehat{P}_{N}^{1}\varphi={}_{0}P_{N,\alpha,\beta} \tilde{\varphi }_{1}+\varphi(-1).$$
(2.12)

By using LemmaÂ 2.3, for any $$\varphi\in H_{\chi^{(\alpha,\beta )},A}^{r}(\Lambda)\cap L^{2}_{\chi^{(\alpha,\beta)}}(\Lambda)$$, we obtain

$$\bigl\Vert \varphi-\widehat{P}_{N}^{1}\varphi\bigr\Vert _{\chi^{(\alpha,\beta)}} =\Vert \tilde{\varphi}_{1}-{}_{0}P_{N,\alpha,\beta} \tilde{\varphi}_{1}\Vert _{\chi^{(\alpha,\beta)}} \leq cN^{1-r}\| \varphi\|_{r,\chi^{(\alpha,\beta)},A}.$$
(2.13)

## 3 Jacobi spectral method with negative integer

In this section, we apply Jacobi approximation with negative integer to ordinary differential equation.

First, we introduce Jacobi polynomials of degree l with negative integer

$${\mathcal{L}}_{l}^{(0,1)}(x)=(1+x)J_{l-1}^{(0,1)}(x), \quad l=1,2,\ldots.$$
(3.1)

The set of $${\mathcal{L}}^{(0,1)}_{l}(x)$$ is the complete $$L^{2}_{\chi^{0,-1}}(\Lambda)$$-orthogonal system, namely

$$\bigl({\mathcal{L}}_{l}^{(0,1)}, {\mathcal{L}}_{m}^{(0,1)} \bigr)_{\chi ^{0,-1},\Lambda}=\left \{ \textstyle\begin{array}{l@{\quad}l} \gamma_{l-1}^{(0,1)}, &l=m, \\ 0, &l\neq m. \end{array}\displaystyle \right .$$
(3.2)

Obviously,

$${}_{0}{\mathcal{P}}_{N}({\Lambda})=\operatorname{span}\bigl\{ { \mathcal{L}}_{1}^{(0,1)},{\mathcal{L}}_{2}^{(0,1)}, \ldots,{\mathcal{L}}_{N}^{(0,1)}\bigr\} .$$
(3.3)

Next, we define the projection $$\widetilde{P}_{N,0,-1}:{}_{0}L_{\chi ^{(0,-1)}}^{2}(\Lambda)\rightarrow{}_{0}{\mathcal{P}}_{N}({\Lambda})$$ as

$$(\widetilde{P}_{N,0,-1}u-u,\phi)_{\chi ^{0,-1}}=0, \quad \forall\phi \in{}_{0}{\mathcal{P}}_{N}({\Lambda}).$$

### Theorem 3.1

If $$u\in L_{\chi^{(0,-1)}}^{2}(\Lambda)$$ and $$\frac{d^{r}u}{dx^{r}}\in L_{\chi^{(r,-1+r)}}^{2}(\Lambda)$$, integers $$0\leq r\leq N+1$$,

$$\| \widetilde{P}_{N,0,-1}u-u\|_{\chi^{(0,-1)}} \leq cN^{-r} \biggl\Vert \frac{d^{r}u}{dx^{r}}\biggr\Vert _{\chi^{(r,-1+r)}}.$$

The proof is similar to LemmaÂ 2.3 of [17].

Next, we consider the following problem:

$$\left \{ \textstyle\begin{array}{l} \frac{dw}{dt}=f_{1}(w(t),t), \quad 0< t\leq T, \\ w(0)=v_{0}. \end{array}\displaystyle \displaystyle \right .$$

For the sake of applying the theory of orthogonal polynomials conveniently, by the linear transformation,

$$t=\frac{T(1+x)}{2}, \qquad v(x)=w\biggl(\frac{T(1+x)}{2}\biggr),$$

then

$$\left \{ \textstyle\begin{array}{l} \frac{dv}{dx}=f(v(x),x), \quad -1< x\leq1, \\ v(-1)=v_{0}. \end{array}\displaystyle \displaystyle \right .$$

Let $$u=v-v_{0}$$,

$$\left \{ \textstyle\begin{array}{l} \frac{du}{dx}=f(u(x)+v_{0},x), \quad -1< x\leq1, \\ u(-1)=0. \end{array}\displaystyle \displaystyle \right .$$
(3.4)

Next, we construct the numerical scheme. To do this, we approximate $$u(x)$$ by $$u_{N}(x)$$, where $$u_{N}(x)\in{}_{0}{\mathcal{P}}_{N}({\Lambda})$$.

$$u_{N}(x)$$ can be expanded to

$$u_{N}(x)=\sum_{l=1}^{N} \tilde{u}_{l}{\mathcal{L}}^{(0,1)}_{l}.$$

By virtue of (2.3), (2.4) and (2.6),

\begin{aligned} (1+x)\frac{d}{dx}u_{N}(x) =& \sum_{l=1}^{N}(1+x) \tilde{u}_{l} \frac{d}{dx}{\mathcal{L}}^{(0,1)}_{l}(x) =\sum_{l=1}^{N}(1+x)\tilde{u}_{l} \biggl(J^{(0,1)}_{l-1}+(1+x)\frac {d}{dx}J^{(0,1)}_{l-1}(x) \biggr) \\ =& \sum_{l=1}^{N}(1+x) \tilde{u}_{l}\biggl(J^{(0,1)}_{l-1} +\frac{l+1}{2l} \bigl(lJ^{(1,1)}_{l-2}+(l-1)J^{(1,1)}_{l-1}\bigr) \biggr) \\ =& \sum_{l=1}^{N}(1+x) \tilde{u}_{l}\Biggl(J^{(0,1)}_{l-1} +\frac{l+1}{l} \Biggl(\sum_{i=0}^{l-2}(i+1)J^{(0,1)}_{i}+ \frac {l-1}{l+1}\sum_{i=0}^{l-1}(i+1)J^{(0,1)}_{i} \Biggr)\Biggr) \\ =& \sum_{l=1}^{N}(1+x) \tilde{u}_{l}\Biggl(J^{(0,1)}_{l-1} +\frac{l+1}{l} \Biggl(\sum_{m=1}^{l-1}mJ^{(0,1)}_{m-1}+ \frac{l-1}{l+1}\sum_{m=1}^{l}mJ^{(0,1)}_{m-1} \Biggr)\Biggr) \\ =& \sum_{l=1}^{N}(1+x) \tilde{u}_{l}\Biggl(J^{(0,1)}_{l-1} +2\sum _{m=1}^{l-1}mJ^{(0,1)}_{m-1}+(l-1)J^{(0,1)}_{l-1} \Biggr) \\ =& \sum_{l=1}^{N}\Biggl(\sum _{m=1}^{l-1}2m{\mathcal{L}}^{(0,1)}_{m}+l{ \mathcal{L}}^{(0,1)}_{l}\Biggr)\tilde{u}_{l}. \end{aligned}
(3.5)

Due to the orthogonality of $${\mathcal{L}}^{(0,1)}_{l}$$, we deduce that

$$\biggl((1+x)\frac{d}{dx}u_{N}(x),{\mathcal{L}}^{(0,1)}_{k} \biggr)_{\chi^{0,-1}}=\left \{ \textstyle\begin{array}{l@{\quad}l} \gamma^{(0,1)}_{0}\tilde{u}_{1}, & k=1, \\ \gamma^{(0,1)}_{k-1}(k\tilde{u}_{k} +2k\sum_{l=k+1}^{N}\tilde{u}_{l}), & 2\leq k\leq N-1, \\ N\gamma^{(0,1)}_{N-1}\tilde{u}_{N} , & k=N. \end{array}\displaystyle \right .$$
(3.6)

Let

\begin{aligned}& a_{k,j} =\left \{ \textstyle\begin{array}{l@{\quad}l} k\gamma^{(0,1)}_{k-1}, & j= k, 1\leq k\leq N, \\ 2k\gamma^{(0,1)}_{k-1}, & k+1\leq j\leq N, 1\leq k\leq N, \end{array}\displaystyle \right . \\& A^{N}=(a_{k,j})_{N\times N}, \qquad u^{N}=( \tilde{u}_{1},\tilde {u}_{2},\ldots,\tilde{u}_{N-1}, \tilde{u}_{N})^{\top}, \\& \ddot{f}_{k}=\bigl(f\bigl(u_{N}(x)+v_{0},x \bigr),{\mathcal{L}}^{(0,1)}_{k}\bigr)_{\chi^{(0,0)}},\qquad \vec{F}^{N}\bigl(u^{N}\bigr)=(\ddot{f}_{1}, \ddot{f}_{2},\ldots,\ddot {f}_{N-1},\ddot{f}_{N})^{\top}. \end{aligned}

We derive the following spectral scheme for (3.4)

$$A^{N}u^{N}=\vec{F}^{N}\bigl(u^{N} \bigr).$$
(3.7)

Obviously, system (3.7) is equivalent to

\begin{aligned} \begin{aligned}[b] \biggl(\frac{d}{dx}u_{N}(x),\phi\biggr)_{\chi ^{(0,0)}}&= \biggl((1+x)\frac{d}{dx}u_{N}(x),\phi\biggr)_{\chi^{0,-1}} = \bigl((1+x)f\bigl(u_{N}(x)+v_{0},x\bigr),\phi \bigr)_{\chi ^{0,-1}} \\ &=\bigl(f\bigl(u_{N}(x)+v_{0},x\bigr),\phi \bigr)_{\chi^{(0,0)}}, \quad \forall\phi \in{}_{0}{ \mathcal{P}}_{N}({\Lambda}). \end{aligned} \end{aligned}
(3.8)

By the definition of $$\widetilde{P}_{N,0,-1}$$, we obtain that

$$\left \{ \textstyle\begin{array}{l} (1+x)\frac{du_{N}(x)}{dx}=\widetilde {P}_{N,0,-1}(1+x)f(u_{N}(x)+v_{0},x), \quad x\geq-1, \\ u_{N}(-1)=0. \end{array}\displaystyle \right .$$

### Remark 3.1

In SectionÂ 4, we will see that the global errors decay exponentially as N in (3.7) increases.

Next, we analyze the numerical error of (3.7). To do this, let $$E_{N}=u_{N}-\widehat{P}_{N}^{1}u$$. We suppose that $$\frac{du}{dx}$$ is continuous for $$x\geq-1$$. Let

$$G_{1}=\frac{d}{dx}\widehat{P}_{N}^{1}u(x)- \widehat{P}_{N}^{1}\frac {du}{dx}.$$
(3.9)

Then we have that

$$\biggl(\frac{d}{dx}\widehat {P}_{N}^{1}u(x),\phi \biggr)_{\chi^{(0,0)}} = \biggl(\widehat{P}_{N}^{1} \frac{du}{dx},\phi\biggr)+(G_{1},\phi )_{\chi^{(0,0)}},\quad \forall\phi\in{}_{0}{\mathcal{P}}_{N}({\Lambda})_{\chi^{(0,0)}}.$$
(3.10)

Subtracting (3.10) from (3.8) yields that

$$\left \{ \textstyle\begin{array}{l} (\frac{d}{dx}E_{N}(x),\phi)_{\chi ^{(0,0)}}= (G_{2},\phi)_{\chi^{(0,0)}} -(G_{1},\phi)_{\chi^{(0,0)}},\quad \forall\phi \in{}_{0}{\mathcal{P}}_{N}({\Lambda}), \\ E_{N}(-1)=0, \end{array}\displaystyle \right .$$
(3.11)

where

$$G_{2}=f\bigl(u_{N}(x)+v_{0},x\bigr)- \widehat{P}_{N}^{1}\frac{du}{dx} \quad \mbox{and}\quad E_{N}(x)\in{}_{0}{\mathcal{P}}_{N}({\Lambda}).$$

Taking $$\phi=2E_{N}$$ in (3.11) leads to

\begin{aligned} 2\biggl(E_{N},\frac{d}{dx}E_{N}\biggr)_{\chi ^{(0,0)}}&=2 (G_{2},E_{N})_{\chi^{(0,0)}} -2(G_{1},E_{N})_{\chi^{(0,0)}} \\ &=A_{2}+A_{1}, \end{aligned}
(3.12)

where

$$A_{1}=-2(G_{1},E_{N})\quad \mbox{and}\quad A_{2}=2(G_{2},E_{N}).$$

Since $$E_{N}(-1)=0$$, integration by parts yields

$$2\biggl(E_{N},\frac{d}{dx}E_{N}\biggr)_{\chi^{(0,0)}}= \bigl\vert E_{N}(+1)\bigr\vert ^{2}.$$
(3.13)

By using the Cauchy inequality, we derive that

$$|A_{1}|\leq2\|G_{1}\|_{\chi^{(0,0)}}\|E_{N} \|_{\chi^{(0,0)}}\leq \varepsilon\|E_{N}\|^{2}_{\chi^{(0,0)}} +\frac{1}{\varepsilon}\|G_{1}\|^{2}_{\chi^{(0,0)}}.$$
(3.14)

Next, we assume that there exists a real number Î³ such that

$$\bigl(f(z_{1},x)-f(z_{2},x)\bigr) (z_{1}-z_{2}) \leq-\gamma(z_{1}-z_{2})^{2},$$
(3.15)

then

\begin{aligned} A_{2} =&2 \biggl(f\bigl(u_{N}(x)+v_{0},x\bigr) -\widehat{P}_{N}^{1}\frac{du}{dx},E_{N} \biggr)_{\chi ^{(0,0)}} \\ =&2\bigl(f(u_{N}+v_{0},x)-f\bigl(\widehat {P}_{N}^{1}u+v_{0},x\bigr),E_{N} \bigr)_{\chi^{(0,0)}} \\ &{} +2\bigl(f\bigl(\widehat {P}_{N}^{1}u+v_{0},x \bigr)-f(u+v_{0},x),E_{N}\bigr)_{\chi^{(0,0)}} +2\biggl( \frac{du}{dx}-\widehat{P}_{N}^{1}\frac{du}{dx},E_{N} \biggr)_{\chi^{(0,0)}}. \end{aligned}

According to the above formula, we obtain that

\begin{aligned} A_{2} \leq& -2\gamma \Vert E_{N}\Vert ^{2}_{\chi^{(0,0)}}+2\gamma\bigl\Vert \widehat{P}_{N}^{1}u-u \bigr\Vert _{\chi^{(0,0)}}\Vert E_{N}\Vert _{\chi^{(0,0)}} + 2 \biggl\Vert \frac{du}{dx}-\widehat{P}_{N}^{1} \frac{du}{dx}\biggr\Vert _{\chi^{(0,0)}}\Vert E_{N}\Vert _{\chi^{(0,0)}} \\ \leq&(-2\gamma+ \varepsilon+\varepsilon)\Vert E_{N}\Vert ^{2}_{\chi^{(0,0)}}+ \frac{1}{\varepsilon}\biggl\Vert \frac{du}{dx} -\widehat{P}_{N}^{1}\frac{du}{dx}\biggr\Vert ^{2}_{\chi^{(0,0)}} + \frac{\gamma}{\varepsilon}\bigl\Vert \widehat{P}_{N}^{1}u-u\bigr\Vert ^{2}_{\chi^{(0,0)}}. \end{aligned}
(3.16)

Substituting (3.13), (3.14), (3.16) into (3.12), we assert that

\begin{aligned} \bigl\vert E_{N}(+1)\bigr\vert ^{2} \leq&(-2\gamma+ 3 \varepsilon)\|E_{N}\|^{2}_{\chi^{(0,0)}}+\frac{1}{\varepsilon} \| G_{1}\|^{2}_{\chi^{(0,0)}} \\ &{}+ \frac{1}{\varepsilon}\biggl\Vert \frac{du}{dx}-\widehat {P}_{N}^{1}\frac{du}{dx}\biggr\Vert ^{2}_{\chi^{(0,0)}}+ \frac{\gamma}{\varepsilon}\bigl\Vert \widehat{P}_{N}^{1}u-u\bigr\Vert ^{2}_{\chi^{(0,0)}}. \end{aligned}
(3.17)

Then it remains to estimate $$\|G_{1}\|^{2}$$,

\begin{aligned} \|G_{1}\|^{2}_{\chi^{(0,0)}} \leq& \biggl\Vert \frac {d(\widehat{P}_{N}^{1}u-u)}{dx}\biggr\Vert ^{2}_{\chi^{(0,0)}} + \biggl\Vert \frac{du}{dx}-\widehat{P}_{N}^{1}\frac{du}{dx}\biggr\Vert ^{2}_{\chi^{(0,0)}} \\ \leq&\bigl\vert \widehat{P}_{N}^{1}u-u\bigr\vert _{1,\chi^{(0,0)}}^{2} + \biggl\Vert \frac{du}{dx}- \widehat{P}_{N}^{1}\frac{du}{dx}\biggr\Vert ^{2}_{\chi^{(0,0)}}. \end{aligned}

With the aid of the above formula, we obtain that

\begin{aligned} (2\gamma- 3\varepsilon)\| E_{N}\|^{2}_{\chi^{(0,0)}} \leq& c\biggl(\bigl\Vert \widehat{P}_{N}^{1}u-u\bigr\Vert ^{2}_{\chi^{(0,0)}} +\bigl\vert \widehat {P}_{N}^{1}u-u \bigr\vert _{1,\chi^{(0,0)}}^{2}+\biggl\Vert \frac{du}{dx}- \widehat {P}_{N}^{1}\frac{du}{dx}\biggr\Vert ^{2}_{\chi^{(0,0)}}\biggr) \\ \leq& c\biggl(\bigl\Vert \widehat{P}_{N}^{1}u-u\bigr\Vert ^{2}_{\chi^{(0,0)}} +\biggl\Vert \frac{du}{dx}- \widehat{P}_{N}^{1}\frac{du}{dx}\biggr\Vert ^{2}_{\chi ^{(0,0)}} \\ &{}+\bigl\vert \widehat{P}_{N}^{1}u- \widetilde {P}_{0,N}^{1}u\bigr\vert _{1,\chi^{(0,0)}}^{2} +\bigl\vert \widetilde{P}_{0,N}^{1}u-u\bigr\vert _{1,\chi^{(0,0)}}^{2}\biggr). \end{aligned}
(3.18)

By virtue of LemmaÂ 2.4, we derive that

\begin{aligned} \bigl\vert \widehat{P}_{N}^{1}u-\widetilde{P}_{0,N}^{1}u \bigr\vert _{1,\chi ^{(0,0)}}^{2} \leq& cN^{2}\bigl\Vert \widehat{P}_{N}^{1}u-\widetilde{P}_{0,N}^{1}u \bigr\Vert ^{2}_{\chi^{(0,0)}} \\ \leq& cN^{2}\bigl(\bigl\Vert \widehat{P}_{N}^{1}u-u \bigr\Vert ^{2}_{\chi^{(0,0)}}+\bigl\Vert u-\widetilde {P}_{0,N}^{1}u\bigr\Vert ^{2}_{\chi^{(0,0)}} \bigr). \end{aligned}

Substituting this formula into (3.18), we obtain the following theorem.

### Theorem 3.2

If u belongs to $$H_{\chi ^{(0,1)},A}^{r}(\Lambda)$$ and $$\frac{d^{r}u}{dx^{r}}$$ belongs to $$L_{\chi^{(r,-1+r)}}^{2}(\Lambda)$$, then, by (2.11) and (2.13),

$$\| E_{N}\|_{\chi^{0,0}}\leq cN^{2-r}\biggl(\biggl\Vert \frac{du}{dx}\biggr\Vert _{r,\chi^{(0,1)},A} +\biggl\Vert \frac{d^{2}u}{dx^{2}} \biggr\Vert _{r,\chi^{(0,1)},A}\biggr)+cN^{1-r}\biggl\Vert \frac {d^{r}u}{dx^{r}}\biggr\Vert _{\chi^{(r,-1+r)}}.$$

### Remark 3.2

Assume that for a certain real number $$\gamma_{1}$$ such that

$$\bigl(f(z_{1},x)-f(z_{2},x)\bigr) (z_{1}-z_{2}) \leq\gamma_{1}(z_{1}-z_{2})^{2}$$
(3.19)

the algorithm is still applicable. In this case, we take Î± such that $$\gamma_{1}-\alpha=-\gamma<0$$ and make the variable transformation

\begin{aligned} &u(x)=e^{\alpha x}U(x), \qquad F\bigl(U(x),x \bigr)=e^{-\alpha x}f\bigl(e^{\alpha x}U(x),x\bigr)-\alpha U(x), \\ &\left \{ \textstyle\begin{array}{l} \frac{dU(x)}{dx}=F(U(x),x), \quad x>-1, \\ U(-1)=0. \end{array}\displaystyle \right . \end{aligned}
(3.20)

We may use (3.7) to resolve (3.20) and obtain the numerical solution $$U_{N}(x)$$. Moreover, condition (3.15) ensures the global accuracy of $$U_{N}(x)$$. The numerical solution of (3.4) is given by $$u_{N}(x)=e^{\alpha x}U_{N}(x)$$.

### Remark 3.3

The proposed method is also available for solving systems of first-order ODEs. In this case, let

\begin{aligned}& \vec{u}(x)=\bigl(u^{(1)}(x),u^{(2)}(x),\ldots ,u^{(m)}(x)\bigr)^{\top}, \\& \vec{f}\bigl(\vec{u}(x),x\bigr)=\bigl(f^{(1)}(\vec {u},x),f^{(2)}( \vec{u},x),\ldots ,f^{(m)}(\vec{u},x)\bigr). \end{aligned}

We consider the system

$$\left \{ \textstyle\begin{array}{l} \frac{d\vec{u}(x)}{dx}=\vec {f}(\vec{u}(x),x), \quad x>-1, \\ \vec{u}(-1)=0. \end{array}\displaystyle \right .$$
(3.21)

We approximate $$\vec{u}$$ by $$\vec{u}_{N}$$.We can derive a numerical algorithm which is similar. Further, let be $$|\vec{v}|_{E}$$ the Euclidean norm of $$\vec{v}$$. Assume that

$$\bigl(\vec{f}(\vec{z}_{1},x)-\vec {f}(\vec{z}_{2},x)\bigr) ( \vec{z}_{1}-\vec {z}_{2})\leq-\gamma|\vec{z}_{1}- \vec{z}_{2}|^{2}_{E}.$$

Then we can obtain an error estimate similar to TheoremÂ 3.2.

## 4 Numerical results

In this section, we present some numerical results. We first use scheme (3.7) to solve the problem

$$\left \{ \textstyle\begin{array}{l} \frac{du}{dx}=-\frac{u(x)}{24}+F(x), \quad x\geq-1, \\ u(-1)=u_{-1}, \end{array}\displaystyle \right .$$
(4.1)

which fulfills condition (3.15) with $$\gamma=-\frac{1}{24}$$. Take the test function $$u(x)=\cos(x)(x+1)^{5}$$. Then a direct computation shows that

$$F(x)=5\cos(x) (x+1)^{4} -\sin(x) (x+1)^{5}+ \frac{1}{24}\cos(x) (x+1)^{5}.$$

For description of numerical errors, we introduce the global error $$E_{N,L^{2}}=\|u_{N}-u\|^{\frac{1}{2}}$$ and the absolute error $$\mathrm{Err}=|u_{N}(x)-u(x)|$$.

In FigureÂ 1, we plot the global errors log10 of $$E_{N}$$ with various values of N. They indicate that the global errors decay exponentially as N increases. They coincide very well with theoretical analysis.

In FigureÂ 2, we compare scheme (3.7) with the classical four-stage explicit Runge-Kutta methods for ExampleÂ (4.1) with $$\tau=0.0001$$, $$\tau=0.00001$$. We find that the method (3.7) is more accurate than the Runge-Kutta methods for large N.

We next use scheme (3.7) to solve the problem

$$\left \{ \textstyle\begin{array}{l} \frac{dv}{dx}=\frac{1}{4}\exp(\cos (v(x)))+F(x), \quad x\geq-1, \\ v(-1)=v_{0}, \end{array}\displaystyle \right .$$

which fulfills condition (3.19) with $$\gamma_{1}=\frac{e}{4}$$. In this case, we take $$\alpha=\frac{e}{2}$$ such that $$\gamma_{1}-\alpha=-\gamma=-\frac{e}{4}<0$$ and make the variable transformation

\begin{aligned}& v(x)=e^{\frac{e}{2}x}u(x),\qquad f\bigl(u(x),x\bigr)=e^{-\frac{e}{2} x}\biggl( \frac {1}{4}\exp\bigl(\cos\bigl(e^{\frac{e}{2} x}u(x)\bigr)\bigl)+F(x)\biggr)- \frac{e}{2}u(x), \\& \left \{ \textstyle\begin{array}{l} \frac{du(x)}{dx}=f(u(x),x), \quad x>-1, \\ u(-1)=e^{\frac{e}{2}}v_{0}, \end{array}\displaystyle \right . \end{aligned}
(4.2)

which fulfills condition (3.15) with $$-\gamma=-\frac{e}{4}$$. Take the test function $$v(x)=e^{-x}(x+1)^{5}$$. Then a direct computation shows that

$$F(x)=5e^{-x}(x+1)^{4} -e^{-x}(x+1)^{5}- \frac{1}{4}\exp\bigl(\cos\bigl(e^{-x}(x+1)^{5}\bigr) \bigr).$$

Obviously, $$f(u,x)$$ is a nonlinear function for u. Let

$$u^{(m)}_{N}(x)=\sum_{l=1}^{N} \tilde{u}^{(m)}_{l}{\mathcal{L}}^{(0,1)}_{l},$$

then

$$\left \{ \textstyle\begin{array}{l} (\frac{d}{dx}u^{(m)}_{N}(x),\phi)_{\chi^{(0,0)}}= (f(u^{(m-1)}_{N}(x)+e^{\frac{e}{2}}v_{0},x),\phi)_{\chi ^{(0,0)}}, \\ u^{(m)}_{N}(0)=0,\quad \forall \phi\in{}_{0}{\mathcal{P}}_{N}({\Lambda}). \end{array}\displaystyle \right .$$

Taking $$\phi={\mathcal{L}}^{(0,1)}_{l}$$, $$1\leq l\leq N$$, in the equation, we get a system of equations

\begin{aligned}& \biggl((1+x)\frac{d}{dx}u^{(m)}_{N}(x),{ \mathcal{L}}^{(0,1)}_{l}\biggr)_{\chi^{0,-1}} \\& \quad = \bigl((1+x)f \bigl(u^{(m-1)}_{N}(x)+e^{\frac{e}{2}}v_{0},x \bigr),{\mathcal{L}}^{(0,1)}_{l}\bigr)_{\chi^{0,-1}}, \quad l=1,2,\ldots,N. \end{aligned}

We use the nonlinear iteration process to solve this system.

In FigureÂ 3, we plot the global errors log10 of $$E_{N}$$ with various values of N. They indicate that the global errors decay exponentially as N increases. They coincide very well with theoretical analysis.

In FigureÂ 4, we compare scheme (3.7) with the four-stage implicit Runge-Kutta method for ExampleÂ (4.2) with $$\tau=0.1$$, $$\tau=0.01$$, $$\tau=0.0001$$, $$\tau =0.00005$$, $$\tau=0.00001$$, in which we take $$N=55$$. We find again that the method (3.7) is more accurate than the corresponding Runge-Kutta methods for large N.

In TableÂ 1, we list the numerical errors at $$x=-0.5$$ of the four-stage implicit Runge-Kutta with $$\tau=0.01$$ and the Jacobi spectral method (J-M) for ExampleÂ (4.1), and the corresponding CPU elapsed time. Clearly, our methods cost nearly the same computational time for obtaining higher numerical accuracy.

In TableÂ 2, we list the numerical errors at $$x=0.8$$ of the four-stage implicit Runge-Kutta with $$\tau=0.00001$$ and the Jacobi spectral method for ExampleÂ (4.2), and the corresponding CPU elapsed time. Obviously, our methods cost less computational time for obtaining higher numerical accuracy.

## 5 Concluding remarks

In this paper, we propose a new Jacobi spectral method for the initial problem of first-order ordinary differential equations, which has fascinating advantages.

• The computing scheme is simple and the relevant convergence theory is cleaner and more reasonable than the collocation method.

• The numerical solution is represented by function form, so it can simulate more entirely the global property of exact solution.

• The numerical results demonstrate that the new Jacobi spectral method possesses the spectral accuracy, which coincides with theoretical analysis very well.

• In this paper, we also develop a powerful framework for analyzing various spectral methods of initial value problems of ODEs.

Although we only consider a model problem, the suggested method and technique are also applicable to many other problems, for example infinite-dimensional nonlinear dynamical system.

## References

1. Butcher, JC: Implicit Runge-Kutta processes. Math. Comput. 18, 50-64 (1964)

2. Butcher, JC: The Numerical Analysis of Ordinary Differential Equations, and General Linear Methods. Wiley, Chichester (1987)

3. Hairer, E, Norsett, SP, Wanner, G: Solving Ordinary Differential Equations I: Nonstiff Problems. Springer, Berlin (1987)

4. Hairer, E, Wanner, G: Solving Ordinary Differential Equations II: Stiff and Differential-Algebraic Problems. Springer, Berlin (1991)

5. Higham, DJ: Analysis of the Enright-Kamel partitioning method for stiff ordinary differential equations. IMA J. Numer. Anal. 9, 1-14 (1989)

6. Stuart, AM, Humphries, AR: Dynamical Systems and Numerical Analysis. Cambridge University Press, Cambridge (1996)

7. Feng, K: Difference schemes for Hamiltonian formalism and symplectic geometry. J. Comput. Math. 4, 279-289 (1980)

8. Feng, K, Qin, MZ: Symplectic Geometric Algorithms for Hamiltonian Systems. Zhejiang Science and Technology Press, Hangzhou (2003)

9. Hairer, E, Lubich, C, Wanner, G: Geometric Numerical Integration: Structure-Preserving Algorithms for Ordinary Differential Equations. Springer Series in Computational Mathematics, vol.Â 31. Springer, Berlin (2002)

10. Guo, B-Y, Wang, Z-Q: Legendre-Gauss collocation methods for ordinary differential equations. Adv. Comput. Math. 30, 249-280 (2009)

11. Yan, J-P, Guo, B-Y: A collocation method for initial value problems of second-order ODEs by using Laguerre functions. Numer. Math., Theory Methods Appl. 4(2), 283-295 (2012)

12. Zhang, X-Y, Li, Y: Generalized Laguerre pseudospectral method based Laguerre interpolation. Appl. Math. Comput. 219, 2545-2563 (2012)

13. Wang, Z-Q, Guo, B-Y: Legendre-Gauss-Radau collocation method for solving initial value problems of first order ordinary differential equations. J. Sci. Comput. 52, 226-255 (2012)

14. Bergh, J, LÃ¶fstrÃ¶m, J: Interpolation Spaces: An Introduction. Springer, Berlin (1976)

15. Guo, B-Y, Wang, L-L: Jacobi interpolation approximations and their applications to singular differential equations. Adv. Comput. Math. 14(3), 227-276 (2001)

16. Guo, B-Y: Jacobi approximation in certain Hilbert spaces and their applications to singular differential equations. J.Â Math. Anal. Appl. 243, 373-408 (2000)

17. Guo, B-Y, Sun, T, Zhang, C: Jacobi and Laguerre quasi-orthogonal applications and related interpolations. Math. Comput. 281, 413-441 (2013)

## Acknowledgements

This work was supported in part by the National Natural Science Foundation of China (Grant Nos.Â 11371074, 11271118, 11301172), the National Natural Science Foundation of China (Tianyuan Fund for Mathematics, Grant No.Â 11426103), the Natural Science Foundation of Hunan Province (Grant No.Â 13JJ4095), the Construct Program of the Key Discipline in Hunan Province and the Key Foundation of Hunan Provincial Education Department (Grant No.Â 11A043).

## Author information

Authors

### Corresponding author

Correspondence to Zheng-su Wan.

### Competing interests

The authors declare that they have no competing interests.

### Authorsâ€™ contributions

Both authors read and approved the final manuscript.

## Rights and permissions

Reprints and permissions

Zhang, Xy., Wan, Zs. Jacobi orthogonal approximation with negative integer and its application to ordinary differential equations. Adv Differ Equ 2015, 237 (2015). https://doi.org/10.1186/s13662-015-0562-z