Advertisement

Jacobi–Sobolev Orthogonal Polynomials and Spectral Methods for Elliptic Boundary Value Problems

  • Xuhong Yu
  • Zhongqing WangEmail author
  • Huiyuan Li
Original Paper
  • 84 Downloads

Abstract

Generalized Jacobi polynomials with indexes \(\alpha ,\beta \in \mathbb {R}\) are introduced and some basic properties are established. As examples of applications, the second- and fourth-order elliptic boundary value problems with Dirichlet or Robin boundary conditions are considered, and the generalized Jacobi spectral schemes are proposed. For the diagonalization of discrete systems, the Jacobi–Sobolev orthogonal basis functions are constructed, which allow the exact solutions and the approximate solutions to be represented in the forms of infinite and truncated Jacobi series. Error estimates are obtained and numerical results are provided to illustrate the effectiveness and the spectral accuracy.

Keywords

Generalized Jacobi polynomials Spectral method Jacobi–Sobolev orthogonal basis functions Elliptic boundary value problems Error analysis 

Mathematics Subject Classification

33C45 65N35 35J25 65N15 

1 Introduction

During the past decades, significant progress has been made in research on Jacobi spectral methods for solving various differential equations; see, e.g., [3, 4, 5, 8, 9, 10, 17, 18]. In the early days, one usually considered approximations to differential equations by the classical Jacobi orthogonal polynomials \(\{P^{\alpha ,\beta }_k(x)\}_{k\ge 0}\) with indexes \(\alpha , \beta > -1\); see [2, 20]. To overcome the restrictions of indexes \(\alpha ,\beta > -1,\) some authors extended the classical Jacobi orthogonal polynomials to generalized Jacobi polynomials/functions, which allow \(\alpha ,\beta \) to be any real numbers. This essentially widens the applications of Jacobi spectral methods [6, 7]. In fact, Shen [16] introduced an efficient Legendre orthogonal basis function \(\phi _k(x)=\frac{1}{\sqrt{4k+6}}(L_k(x)-L_{k+2}(x)),\) which can also be regarded as generalized Jacobi polynomials with indexes \((\alpha ,\beta )=(-1,-1).\)

Since for non-integers \(\alpha ,\beta <-1,\)\(P^{\alpha ,\beta }_k(x)\) is a function, but not a polynomial in the definition of [6, 7]. This will bring some difficulties to the error analysis sometimes. For this purpose, Li and Xu [11] recently introduced a family of new generalized Jacobi polynomials \(\{J^{\alpha ,\beta }_k(x)\}_{k\ge 0}\) with indexes \(\alpha ,\beta \in \mathbb {R}\), which inherit all properties of the classical Jacobi polynomials. It is worth pointing out that \(J^{\alpha ,\beta }_k(x)\) is always a polynomial for any \(\alpha ,\beta \in \mathbb {R}\) and \(k\ge 0.\) In this paper, we will present some properties of this kind of new generalized Jacobi polynomials, including the orthogonality and recurrence relations, etc.

As applications of generalized Jacobi polynomials, we consider the second- and fourth-order elliptic boundary value problems with Dirichlet or Robin boundary conditions, and propose the corresponding generalized Jacobi spectral methods. As is well known, the utilization of generalized Jacobi polynomials usually leads to a sparse (e.g., penta-diagonal) and well-conditioned algebraic system. In order to diagonalize the discrete system (see, e.g., [1, 12, 13, 14, 19]), we will construct the Jacobi–Sobolev orthogonal polynomials. Sobolev orthogonal polynomials have been studied extensively in the past quarter-century, and the interested readers may refer to Marcellan and Xu [15] for a survey of the main developments up to now. By using these Jacobi–Sobolev orthogonal polynomials as basis functions, the discrete system becomes a diagonal matrix. Accordingly, the exact solutions and the approximate solutions can be represented in the forms of infinite and truncated Jacobi series. We also present some rigorous error estimates and provide some numerical results to illustrate the effectiveness and the spectral accuracy.

This paper is organized as follows. In the next section, we first make conventions on the frequently used notations, and then introduce the properties of generalized Jacobi polynomials with arbitrary indexes \(\alpha ,\beta \in \mathbb {R}.\) The Jacobi–Sobolev orthogonal basis functions are constructed and the related Jacobi spectral methods are proposed in Sect. 3. Section 4 is then devoted to the convergence analysis. Numerical results are presented in Sect. 5 to demonstrate the effectiveness and accuracy of the suggested approaches.

2 Generalized Jacobi Polynomials

Let \(I=(-1,1)\) and \(\omega (x)\) be a certain weight function. We define
$$\begin{aligned} L^2_\omega (I)=\{v~|~v\mathrm{~is~measurable~on~} I \mathrm{~and~}\Vert v\Vert _\omega <\infty \}, \end{aligned}$$
with the following inner product and norm:
$$\begin{aligned} (u,v)_\omega =\displaystyle \int _Iu(x)v(x)\omega (x){\text {d}}x,\quad \Vert v\Vert _\omega =(u,v)^{\frac{1}{2}}_\omega ,\quad \forall u,v\in L^2_\omega (I). \end{aligned}$$
For simplicity, we denote \(\partial ^k_xv:=\frac{{\text d}^kv}{{\text d}x^k}.\) For any integer \(r\ge 0,\) we define the weight Sobolev space \(H^r_\omega (I)\) as
$$\begin{aligned} H^r_\omega (I)=\{v~|~\partial ^k_xv\in L^2_\omega (I),0\le k\le r\}, \end{aligned}$$
with the following semi-norm and norm:
$$\begin{aligned} |v|_{r,\omega }=\Vert \partial ^r_xv\Vert _\omega ,\qquad \Vert v\Vert _{r,\omega }= \left( \displaystyle \sum ^r_{k=0}|v|^2_{k,\omega } \right) ^{\frac{1}{2}}. \end{aligned}$$
We omit the subscript \(\omega \) whenever \(\omega (x)\equiv 1.\) We denote by \(\mathbb {R},~\mathbb {N}\) and \(\mathbb {Z}^-\) the sets of real numbers, positive integers and negative integers, respectively. For \(a\in \mathbb {R}\) and \(n\ge 1\), let \((a)_n:=a(a+1)\cdots (a+n-1)\) be the rising factorial in the Pochhammer symbol. Furthermore, \(\mathcal {P}_N(I)\) stands for the set of all algebraic polynomials of degree at most N.
For \(\alpha ,\beta >-1,\) the classical Jacobi polynomials are defined by (see [20])
$$\begin{aligned} P^{\alpha ,\beta }_n(x)=\displaystyle \sum ^n_{k=0}\dfrac{(k+\alpha +1)_{n-k}(n+\alpha +\beta +1)_{k}}{(n-k)!k!} \left( \dfrac{x-1}{2} \right) ^k,\qquad n\ge 0. \end{aligned}$$
(1)
With a slight modification of Theorems 3.22 and 3.23 of [7], we have the following recurrence relationships between the classical Jacobi polynomials \(P^{\alpha ,\beta }_n(x)\) and \(P^{\alpha +1,\beta +1}_n(x)\):
$$\begin{aligned} (1-x^2)P^{\alpha +1,\beta +1}_{n-1}(x)=\widetilde{A}^{\alpha ,\beta }_nP^{\alpha ,\beta }_{n-1}(x) +\widetilde{B}^{\alpha ,\beta }_nP^{\alpha ,\beta }_n(x)-\widetilde{C}^{\alpha ,\beta }_nP^{\alpha ,\beta }_{n+1}(x), \end{aligned}$$
(2)
and
$$\begin{aligned} P^{\alpha ,\beta }_n(x)=P^{\alpha +1,\beta +1}_n(x)+\widehat{A}^{\alpha ,\beta }_nP^{\alpha +1,\beta +1}_{n-1}(x) -\widehat{B}^{\alpha ,\beta }_nP^{\alpha +1,\alpha +1}_{n-2}(x), \end{aligned}$$
(3)
where
$$\begin{aligned} \begin{array}{ll} \widetilde{A}^{\alpha ,\beta }_n=\dfrac{4(n+\alpha )(n+\beta )}{(2n+\alpha +\beta )(2n+\alpha +\beta +1)},&{} \widetilde{B}^{\alpha ,\beta }_n=\dfrac{4n(\alpha -\beta )}{(2n+\alpha +\beta )(2n+\alpha +\beta +2)},\\ \widetilde{C}^{\alpha ,\beta }_n=\dfrac{4n(n+1)}{(2n+\alpha +\beta +1)(2n+\alpha +\beta +2)},&{} \widehat{A}^{\alpha ,\beta }_n=\dfrac{\alpha -\beta }{(2n+\alpha +\beta )(2n+\alpha +\beta +2)},\\ \widehat{B}^{\alpha ,\beta }_n=\dfrac{(n+\alpha )(n+\beta )}{(2n+\alpha +\beta -1)(2n+\alpha +\beta )^2(2n+\alpha +\beta +1)}.&{} \end{array} \end{aligned}$$
The classical Jacobi polynomials \(P^{\alpha ,\beta }_n(x)\) can be extended to cases with any \(\alpha ,\beta \in \mathbb {R}\) and the same representation as (1). Moreover, \(P^{\alpha ,\beta }_n(x)\) is always a polynomial in x for all \(\alpha ,\beta \in \mathbb {R}.\) However, if \(-n-\alpha -\beta \in \{1,2,\ldots ,n\},\) i.e., \((n+\alpha +\beta +1)_n=0,\) then a reduction of the degree of \(P^{\alpha ,\beta }_n(x)\) occurs. To avoid the degree reduction, Li and Xu [11] introduced a kind of new generalized Jacobi polynomials (GJPs) by
$$\begin{aligned} J^{\alpha ,\beta }_n(x):=\displaystyle \sum ^n_{k=n_0}\dfrac{(k+\alpha +1)_{n-k}}{(n-k)!k!(n+\alpha +\beta +k+1)_{n-k}} \left( \dfrac{x-1}{2}\right) ^k,\qquad n\ge 0, \end{aligned}$$
(4)
where
$$\begin{aligned} n_0:=n_0(n,\alpha ,\beta )=\left\{ \begin{array}{ll}-n-\alpha -\beta ,&{}\quad -n-\alpha -\beta \in \{1,2,\ldots ,n\},\\ 0,&{}\quad \mathrm{otherwise}.\end{array}\right. \end{aligned}$$
It is clear that the leading coefficient \(k^{\alpha ,\beta }_n\) of \(J^{\alpha ,\beta }_n(x)\) is equal to \(\dfrac{1}{2^nn!}.\) For notational convenience, let \(\mathcal {N}:=\mathbb {Z}^-\cup (-1,+\infty )\) and
$$\begin{aligned} \widehat{\alpha }=\left\{ \begin{array}{ll}-\alpha ,&{}\quad \alpha \le -1,\\ 0,&{}\quad \alpha>-1,\end{array}\right. \qquad \qquad \overline{\alpha }=\left\{ \begin{array}{ll}-\alpha ,&{}\quad \alpha \le -1,\\ \alpha ,&{}\quad \alpha >-1.\end{array}\right. \end{aligned}$$
By comparison of the corresponding powers of \(x-1\) in \(J^{\alpha ,\beta }_n(x)\) and \(P^{\alpha ,\beta }_n(x)\), we have

Lemma 2.1

(see [11]) For\(\alpha ,\beta \in \mathcal {N},\)
$$\begin{aligned}&J^{\alpha ,\beta }_n(x)=\dfrac{1}{(n+\alpha +\beta +1)_n}P^{\alpha ,\beta }_n(x),\qquad {~if~}n_0=0, \end{aligned}$$
(5)
$$\begin{aligned} J^{\alpha ,\beta }_n(1)=\dfrac{(\alpha +1)_n}{n!(n+\alpha +\beta +1)_n}\delta _{n_0,0}, \end{aligned}$$
(6)
$$\begin{aligned}&\partial _xJ^{\alpha ,\beta }_n(x)=\dfrac{1}{2}J^{\alpha +1,\beta +1}_{n-1}(x), \end{aligned}$$
(7)
and
$$\begin{aligned} J^{\alpha ,\beta }_n(x)=\dfrac{1}{(n-\widehat{\alpha }-\widehat{\beta }+1)_{\widehat{\alpha }+\widehat{\beta }}} \left( \dfrac{x-1}{2}\right) ^{\widehat{\alpha }}\left( \dfrac{x+1}{2}\right) ^{\widehat{\beta }}J^{\overline{\alpha },\overline{\beta }}_{n-\widehat{\alpha }-\widehat{\beta }}(x), \quad n\ge \widehat{\alpha }+\widehat{\beta }. \end{aligned}$$
(8)
According to (8), we know that
$$\begin{aligned} \begin{array}{ll} \partial ^\nu _x J^{\alpha ,\beta }_n(1)=0,&{}\qquad n\ge -\alpha \in \mathbb {N},~ \nu =0,1,\ldots ,-\alpha -1,\\ \partial ^\nu _x J^{\alpha ,\beta }_n(-1)=0,&{}\qquad n\ge -\beta \in \mathbb {N}, ~\nu =0,1,\ldots ,-\beta -1.\end{array} \end{aligned}$$
(9)
Moreover, by (4) we have \(J^{\alpha ,\beta }_0(x)=1\) and
$$\begin{aligned} J^{\alpha ,\beta }_1(x)=\left\{ \begin{array}{ll}\dfrac{1}{2}(x-1),&{}\quad \alpha +\beta +2=0,\\ \dfrac{1}{2}(x-1)+\dfrac{\alpha +1}{\alpha +\beta +2},&{}\quad \mathrm{~otherwise}. \end{array}\right. \end{aligned}$$
With a slight modification of (3.110) in [18], we obtain the following recurrence relation.

Lemma 2.2

For any \(\alpha ,\beta \in \mathbb {R},\) \(n\ge 1\) and \(-n-\alpha -\beta \notin \{-1,0,1,2,\ldots ,n+1\},\)
$$\begin{aligned} a^{\alpha ,\beta }_nJ^{\alpha ,\beta }_{n+1}(x)=(b^{\alpha ,\beta }_nx+c^{\alpha ,\beta }_n)J^{\alpha ,\beta }_n(x)-d^{\alpha ,\beta }_nJ^{\alpha ,\beta }_{n-1}(x), \end{aligned}$$
(10)
where
$$\begin{aligned} \begin{array}{ll} a^{\alpha ,\beta }_n=2(n+1)(n+\alpha +\beta +1)_{n+2}(2n+\alpha +\beta -1)(2n+\alpha +\beta )^2(2n+\alpha +\beta +1),\\ b^{\alpha ,\beta }_n=(n+\alpha +\beta +1)_{n+2}(2n+\alpha +\beta -1)(2n+\alpha +\beta )^2(2n+\alpha +\beta +1),\\ c^{\alpha ,\beta }_n=(\alpha ^2-\beta ^2)(n+\alpha +\beta +1)_{n+1}(2n+\alpha +\beta -1)(2n+\alpha +\beta )(2n+\alpha +\beta +1),\\ d^{\alpha ,\beta }_n=2(n+\alpha )(n+\beta )(n+\alpha +\beta )_{n+3}. \end{array} \end{aligned}$$

Remark 2.1

For \(-n-\alpha -\beta \in \{-1,0,1,2,\ldots ,n+1\},\) we may derive the generalized Jacobi polynomials \(J^{\alpha ,\beta }_n(x)\) directly from the definition of (4).

Let \(\omega ^{\alpha ,\beta }(x)=(1-x)^\alpha (1+x)^\beta .\) It can be checked readily that the generalized Jacobi polynomials satisfy the following orthogonality relation:
$$\begin{aligned} \int _I J^{\alpha ,\beta }_m(x)J^{\alpha ,\beta }_n(x)\omega ^{\alpha ,\beta }(x){\text {d}}x =\gamma ^{\alpha ,\beta }_n\delta _{m,n},\qquad \alpha ,\beta \in \mathcal {N},\quad m,n\ge \widehat{\alpha }+\widehat{\beta }, \end{aligned}$$
(11)
where \(\delta _{m,n}\) is the Kronecker symbol, and the normalization constant is given by
$$\begin{aligned} \gamma ^{\alpha ,\beta }_n=\dfrac{2^{\alpha +\beta +1}\Gamma (n+\alpha +1)\Gamma (n+\beta +1)}{n!(n+\alpha +\beta +1)_{n+1}\Gamma (2n+\alpha +\beta +1)}. \end{aligned}$$
(12)
Moreover, by (7) and (11) we get
$$\begin{aligned} \int _I\partial ^k_xJ^{\alpha ,\beta }_m(x)\partial ^k_xJ^{\alpha ,\beta }_n(x)\omega ^{\alpha +k,\beta +k}(x){\text {d}}x =\dfrac{1}{4^k}\gamma ^{\alpha +k,\beta +k}_{n-k}\delta _{m,n}, \qquad m,n\ge \widehat{\alpha +k}+\widehat{\beta +k}+k. \end{aligned}$$
(13)

Lemma 2.3

For any \(\alpha ,\beta \in \mathcal {N},\) the generalized Jacobi polynomials satisfy
$$\begin{aligned} J^{\alpha ,\beta }_n(x)=J^{\alpha +1,\beta +1}_n(x)+A^{\alpha ,\beta }_nJ^{\alpha +1,\beta +1}_{n-1}(x)-B^{\alpha ,\beta }_nJ^{\alpha +1,\beta +1}_{n-2}(x), \end{aligned}$$
(14)
where
$$\begin{aligned} \begin{array}{ll}A^{\alpha ,\beta }_n=\dfrac{\alpha -\beta }{(2n+\alpha +\beta )(2n+\alpha +\beta +2)},\\ B^{\alpha ,\beta }_n=\dfrac{(n+\alpha )(n+\beta )}{(2n+\alpha +\beta -1)(2n+\alpha +\beta )^2(2n+\alpha +\beta +1)}. \end{array} \end{aligned}$$

Proof

This formula follows from (2), (3), (5) and (8) directly. We omit the details.

As special cases, one can verify that
$$\begin{aligned} \begin{array}{ll} J^{-1,-1}_n(x)&{}=J^{0,0}_n(x)-\dfrac{1}{4(2n-1)(2n-3)}J^{0,0}_{n-2}(x),\quad n\ge 2,\\ J^{-2,-2}_n(x)&{}=J^{0,0}_n(x)-\dfrac{1}{2(2n-1)(2n-5)}J^{0,0}_{n-2}(x)+\dfrac{1}{16(2n-3)(2n-5)^2(2n-7)}J^{0,0}_{n-4}(x),\quad n\ge 4.\end{array} \end{aligned}$$
(15)

Lemma 2.4

For\(\alpha ,\beta \in \mathbb {R},\) the generalized Jacobi polynomials\(J^{\alpha ,\beta }_n(x)\) are the eigenfunctions of the following singular Sturm–Liouville differential operators:
$$\begin{aligned} \partial _x(\omega ^{\alpha +1,\beta +1}(x)\partial _xJ^{\alpha ,\beta }_n(x)) +\lambda ^{\alpha ,\beta }_n\omega ^{\alpha ,\beta }(x)J^{\alpha ,\beta }_n(x)=0\quad {with}\quad \lambda ^{\alpha ,\beta }_n=n(n+\alpha +\beta +1), \end{aligned}$$
(16)
provided that\(n_0=0\) or\(n_0\le -\alpha \) with\(\alpha \in \mathbb {Z}^-.\)

Proof

Clearly,
$$\begin{aligned} \begin{array}{ll}\quad \partial _x(\omega ^{\alpha +1,\beta +1}(x)\partial _xJ^{\alpha ,\beta }_n(x)) +\lambda ^{\alpha ,\beta }_n\omega ^{\alpha ,\beta }(x)J^{\alpha ,\beta }_n(x)\\ \quad=\omega ^{\alpha ,\beta }(x) [(1-x^2)\partial ^2_xJ^{\alpha ,\beta }_n(x) +((\beta -\alpha )-(\alpha +\beta +2)x)\partial _xJ^{\alpha ,\beta }_n(x) +\lambda ^{\alpha ,\beta }_nJ^{\alpha ,\beta }_n(x)]. \end{array} \end{aligned}$$
Next, using the expression (4), we derive that
$$\begin{aligned} \begin{array}{rl} &{}(1-x^2)\partial ^2_xJ^{\alpha ,\beta }_n(x)+((\beta -\alpha )-(\alpha +\beta +2)x)\partial _xJ^{\alpha ,\beta }_n(x)+\lambda ^{\alpha ,\beta }_nJ^{\alpha ,\beta }_n(x)\\ =&-\displaystyle \sum ^n_{k=n_0}\dfrac{\Gamma (n+\alpha +1)\Gamma (n+\alpha +\beta +k+1)}{(n-k)!(k-2)!\Gamma (k+\alpha +1)\Gamma (2n+\alpha +\beta +1)} \left( \dfrac{x-1}{2}\right) ^k\\ & -\displaystyle \sum ^n_{k=n_0}\dfrac{\Gamma (n+\alpha +1)\Gamma (n+\alpha +\beta +k+1)}{(n-k)!(k-2)!\Gamma (k+\alpha +1)\Gamma (2n+\alpha +\beta +1)}\left( \dfrac{x-1}{2}\right) ^{k-1}\\ &-(\alpha +\beta +2)\displaystyle \sum ^n_{k=n_0}\dfrac{\Gamma (n+\alpha +1)\Gamma (n+\alpha +\beta +k+1)}{(n-k)!(k-1)!\Gamma (k+\alpha +1)\Gamma (2n+\alpha +\beta +1)}\left( \dfrac{x-1}{2}\right) ^k\\ & -(\alpha +1)\displaystyle \sum ^n_{k=n_0}\dfrac{\Gamma (n+\alpha +1)\Gamma (n+\alpha +\beta +k+1)}{(n-k)!(k-1)!\Gamma (k+\alpha +1)\Gamma (2n+\alpha +\beta +1)}\left( \dfrac{x-1}{2}\right) ^{k-1}\\ & +n(n+\alpha +\beta +1)\displaystyle \sum ^n_{k=n_0}\dfrac{\Gamma (n+\alpha +1)\Gamma (n+\alpha +\beta +k+1)}{(n-k)!k!\Gamma (k+\alpha +1)\Gamma (2n+\alpha +\beta +1)}\left( \dfrac{x-1}{2}\right) ^k\\ =&\dfrac{n_0(n_0+\alpha )\Gamma (n+\alpha +1)\Gamma (n+\alpha +\beta +n_0+1)}{(n-n_0)!n_0!\Gamma (n_0+\alpha +1)\Gamma (2n+\alpha +\beta +1)}\left( \dfrac{x-1}{2}\right) ^{n_0-1}. \end{array} \end{aligned}$$
(17)
Hence, if \(n_0=0\), then we obtain the result of (16). Moreover, if \(\alpha \in \mathbb {Z}^-\) and \(0\le n_0\le -\alpha ,\) then \(\Gamma (n+\alpha +1)=0.\) This also leads to the desired result.

3 Applications

This section is devoted to the applications of generalized Jacobi polynomials. We consider the second- and fourth-order elliptic boundary value problems with Dirichlet or Robin boundary conditions, and propose the generalized Jacobi spectral schemes. For the diagonalization of discrete systems, we construct the Jacobi–Sobolev orthogonal basis functions, which allow the exact solutions and the approximate solutions to be represented in the forms of infinite and truncated Jacobi series.

3.1 Second-Order Problem with Dirichlet Boundary Condition

Consider the following second-order elliptic boundary value problem:
$$\begin{aligned} \left\{ \begin{array}{ll} -u''(x)+\mu u(x)=f(x),\quad \mu \ge 0,~x\in I,\\ u(-1)=u(1)=0. \end{array}\right. \end{aligned}$$
(18)
Let
$$\begin{aligned} H^1_0(I)=\{v\in H^1(I)~|~v(\pm 1)=0\},\qquad \mathcal {P}^0_N(I)=\mathcal {P}_N(I)\cap H^1_0(I). \end{aligned}$$
Clearly, \(\mathcal {P}^0_N(I)=\mathrm{span}\{J^{-1,-1}_n(x):2\le n\le N\}.\) A weak formulation of (18) is to find \(u\in H^1_0(I)\) such that
$$\begin{aligned} A_\mu (u,v):=(u',v')+\mu (u,v)=(f,v),\qquad \forall v\in H^1_0(I). \end{aligned}$$
(19)
Clearly, if \(f\in (H^1_0(I))',\) then by the Lax–Milgram lemma, (19) admits a unique solution.
The generalized Jacobi spectral scheme for (19) is to find \(u_N\in \mathcal {P}^0_N(I)\) such that
$$\begin{aligned} A_\mu (u_N,\phi )=(f,\phi ),\qquad \forall \phi \in \mathcal {P}^0_N(I). \end{aligned}$$
(20)
To propose a fully diagonalized approximation scheme for (20), we need to construct new basis functions \(\{\varphi _n\}_{n\ge 2},\) which are mutually orthogonal with respect to the Sobolev inner product \(A_\mu (\cdot ,\cdot ).\)

Lemma 3.1

Let \(\varphi _2(x)=(3)_2J^{-1,-1}_2(x)\) and \(\varphi _n(x)\in \mathcal {P}^0_n(I)\) be the Sobolev orthogonal generalized Jacobi polynomials such that \(\varphi _n(x)-(n+1)_nJ^{-1,-1}_n(x)\in \mathcal {P}^0_{n-1}(I),\) and
$$\begin{aligned} A_\mu (\varphi _m,\varphi _n)=\eta _n\delta _{m,n},\qquad m,~n\ge 2. \end{aligned}$$
(21)
Then we have
$$\begin{aligned} \varphi _n(x)=(n+1)_nJ^{-1,-1}_n(x)-d_n\varphi _{n-2}(x),\qquad n\ge 2, \end{aligned}$$
(22)
where \(\varphi _n(x)\equiv 0~(n<2),~\eta _n=0~(n<2),~d_n=0~(n<4),\) and
$$\begin{aligned} \eta _n=2(2n-1)+\frac{4\mu (2n-1)}{(2n-3)(2n+1)}-d^2_n\eta _{n-2},\quad n\ge 2,\qquad d_n=-\dfrac{2\mu }{(2n-3)\eta _{n-2}},\quad n\ge 4. \end{aligned}$$
(23)

Proof

According to the orthogonality assumption (21) and the Gram–Schmidt orthogonalization procedure, we have
$$\begin{aligned} \varphi _n(x)=(n+1)_nJ^{-1,-1}_n(x)-\displaystyle \sum ^{n-1}_{m=2}\dfrac{A_\mu ((n+1)_nJ^{-1,-1}_n,\varphi _m)}{\eta _m}\varphi _m(x),\qquad n\ge 3. \end{aligned}$$
(24)
We first use mathematical induction to verify (22). Clearly, by (19) and (13), we deduce that for any \(n>m\ge 2,\)
$$\begin{aligned} A_\mu ((n+1)_nJ^{-1,-1}_n,\varphi _m) =\mu (n+1)_n(J^{-1,-1}_n,\varphi _m). \end{aligned}$$
(25)
Hence, by (25), (15) and (11) we derive
$$\begin{aligned} A_\mu ((4)_3J^{-1,-1}_3,\varphi _2)=\mu (120J^{-1,-1}_3,12J^{-1,-1}_2)=0. \end{aligned}$$
This implies \(\varphi _3(x)=(4)_3J^{-1,-1}_3(x).\) Similarly, by (25), (15) and (11) we get that for \(n=4\) and \(m=2,3,\)
$$\begin{aligned} \begin{array}{ll} A_\mu ((n+1)_nJ^{-1,-1}_n,\varphi _m)=\mu ((n+1)_nJ^{-1,-1}_n,(m+1)_mJ^{-1,-1}_m)\\ & \quad =\mu (n+1)_n(m+1)_m\left(J^{0,0}_n-\frac{1}{4(2n-1)(2n-3)}J^{0,0}_{n-2},J^{0,0}_m-\frac{1}{4(2m-1)(2m-3)}J^{0,0}_{m-2}\right)\\ & \quad =-\frac{2\mu }{2n-3}\delta _{m,n-2}.\end{array} \end{aligned}$$
Therefore, \(\varphi _4(x)=(5)_4J^{-1,-1}_4(x)-d_4\varphi _{2}(x)\) with \(d_4=-\frac{2\mu }{5\eta _2}.\)
Next, assume that for any \(4\le m\le n-1\) and \(n\ge 5,\)
$$\begin{aligned} \varphi _m(x)=(m+1)_mJ^{-1,-1}_m(x)-d_m\varphi _{m-2}(x). \end{aligned}$$
We shall prove \(\varphi _n(x)=(n+1)_nJ^{-1,-1}_n(x)-d_n\varphi _{n-2}(x)\) for \(n\ge 5.\) Clearly, by (25), (15), (11) and the induction assumption, we derive that for \(n>m\) and \(n\ge 5,\)
$$\begin{aligned} \begin{array}{ll} A_\mu ((n+1)_nJ^{-1,-1}_n,\varphi _m)\\ =\mu ((n+1)_nJ^{-1,-1}_n,(m+1)_mJ^{-1,-1}_m)-\mu d_m((n+1)_nJ^{-1,-1}_n,\varphi _{m-2})\\ =\mu (n+1)_n(m+1)_m \left(J^{0,0}_n-\frac{1}{4(2n-1)(2n-3)}J^{0,0}_{n-2},J^{0,0}_m-\frac{1}{4(2m-1)(2m-3)}J^{0,0}_{m-2}\right)\\ \quad -\; \mu d_m(n+1)_n \left(J^{0,0}_n-\frac{1}{4(2n-1)(2n-3)}J^{0,0}_{n-2},\varphi _{m-2}\right)\\ =-\dfrac{2\mu }{2n-3}\delta _{m,n-2},\end{array} \end{aligned}$$
which along with (24), implies
$$\begin{aligned} \varphi _n(x)=(n+1)_nJ^{-1,-1}_n(x)-d_n\varphi _{n-2}(x),\qquad d_n=-\dfrac{2\mu }{(2n-3)\eta _{n-2}},\qquad n\ge 5. \end{aligned}$$
It remains to confirm the constant \(\eta _n,~n\ge 2.\) Clearly, by (21), (19), (13), (15) and (11), we know that for \(n=2,3,\)
$$\begin{aligned} \eta _n&=A_\mu (\varphi _n,\varphi _n)=A_\mu ((n+1)_nJ^{-1,-1}_n,(n+1)_nJ^{-1,-1}_n) \nonumber \\&=((n+1)_n\partial _xJ^{-1,-1}_n,(n+1)_n\partial _xJ^{-1,-1}_n) \nonumber \\&\quad +\mu ((n+1)_n)^2\left(J^{0,0}_n-\frac{1}{4(2n-1)(2n-3)}J^{0,0}_{n-2},J^{0,0}_n-\frac{1}{4(2n-1)(2n-3)}J^{0,0}_{n-2}\right) \nonumber \\&=2(2n-1)+\frac{4\mu (2n-1)}{(2n-3)(2n+1)}. \end{aligned}$$
(26)
Thus \(\eta _2=6+\frac{12}{5}\mu \) and \(\eta _3=10+\frac{20}{21}\mu \) as in (23). Moreover, by (26) we obtain readily that for any \(n\ge 4,\)
$$\begin{aligned} A_\mu ((n+1)_nJ^{-1,-1}_n,(n+1)_nJ^{-1,-1}_n)=2(2n-1)+\frac{4\mu (2n-1)}{(2n-3)(2n+1)}. \end{aligned}$$
On the other hand, by (22) and (21) we have
$$\begin{aligned} A_\mu ((n+1)_nJ^{-1,-1}_n,(n+1)_nJ^{-1,-1}_n)=A_\mu (\varphi _n+d_n\varphi _{n-2},\varphi _n+d_n\varphi _{n-2})=\eta _n+d^2_n\eta _{n-2}. \end{aligned}$$
Hence
$$\begin{aligned} \eta _n=2(2n-1)+\frac{4\mu (2n-1)}{(2n-3)(2n+1)}-d^2_n\eta _{n-2},\qquad n\ge 4. \end{aligned}$$
This ends the proof.

Obviously, \(\mathcal {P}^0_N(I)=\{\varphi _n~|~2\le n\le N\}.\) Thus the variational forms (19) and (20) together with the orthogonality of \(\{\varphi _n\}_{n\ge 2}\) lead to the following main theorem in this subsection.

Theorem 3.1

Letu(x) and\(u_N(x)\) be the solutions of (19) and (20), respectively. Then bothu(x) and\(u_N(x)\) have the explicit representations in\(\{\varphi _n\}_{n\ge 2},\)
$$\begin{aligned} \begin{array}{ll} u(x)=\displaystyle \sum ^{\infty }_{n=2}\hat{u}_n\varphi _n(x),\qquad u_N(x)=\displaystyle \sum ^{N}_{n=2}\hat{u}_n\varphi _n(x),\\ \hat{u}_n=\dfrac{1}{\eta _n}A_\mu (u,\varphi _n)=\dfrac{1}{\eta _n}(f,\varphi _n),\qquad n\ge 2.\end{array} \end{aligned}$$

3.2 Second-Order Problem with Robin Boundary Condition

Consider the following second-order elliptic boundary value problem:
$$\begin{aligned} \left\{ \begin{array}{ll} -u''(x)+\mu u(x)=f(x),&{}\qquad \mu >0,~ x\in I,\\ u'(1)+\nu _+u(1)=a_+,&{}\qquad \nu _+\ge 0,\\ -u'(-1)+\nu _-u(-1)=a_-,&{}\qquad \nu _-\ge 0.\end{array}\right. \end{aligned}$$
(27)
A weak formulation of (27) is to find \(u\in H^1(I)\) such that
$$\begin{aligned} \begin{array}{rl} A_{\mu ,\nu }(u,v):=&{}(u',v')+\mu (u,v)+\nu _+ u(1)v(1)+\nu _- u(-1)v(-1)\\ =&{}(f,v)+a_+v(1)+a_-v(-1),\qquad \forall v\in H^1(I). \end{array} \end{aligned}$$
(28)
The Lax–Milgram lemma guarantees a unique solution to (28) if \(f\in (H^1(I))'.\)
Clearly, \(\mathcal {P}_N(I)=\{J^{-1,-1}_n~|~0\le n\le N\}.\) The generalized Jacobi spectral scheme for (28) is to find \(u_N\in \mathcal {P}_N(I),\) such that
$$\begin{aligned} A_{\mu ,\nu }(u_N,\phi )=(f,\phi )+a_+\phi (1)+a_-\phi (-1),\qquad \forall \phi \in \mathcal {P}_N(I). \end{aligned}$$
(29)
To propose a fully diagonalized approximation scheme for (29), we need to construct new basis functions \(\{\psi _n\}_{n\in \mathbb {N}},\) which are mutually orthogonal with respect to the Sobolev inner product \(A_{\mu ,\nu }(\cdot ,\cdot ).\)

Lemma 3.2

Let \(\psi _0(x)=J^{-1,-1}_0(x)\) and \(\psi _n(x)\in \mathcal {P}_n(I)\) be the Sobolev orthogonal Jacobi polynomials such that \(\psi _n(x)-(n+1)_nJ^{-1,-1}_n(x)\in \mathcal {P}_{n-1}(I),\) and
$$\begin{aligned} A_{\mu ,\nu }(\psi _m,\psi _n)=\rho _n\delta _{m,n},\qquad m,n\ge 0. \end{aligned}$$
(30)
Then we have \(\psi _1(x)=2J^{-1,-1}_1(x)-d_{1,1}\psi _0(x),\) and
$$\begin{aligned} \psi _n(x)=(n+1)_nJ^{-1,-1}_n(x)-d_{n,1}\psi _{n-1}(x)-d_{n,2}\psi _{n-2}(x),\qquad n\ge 2, \end{aligned}$$
(31)
where
$$\begin{aligned} \begin{array}{ll} \rho _0=2\mu +\nu _++\nu _-,\qquad \rho _1=2+\frac{2}{3}\mu +2\mu (d_{1,1}+1)^2+\nu _+d^2_{1,1}+\nu _-(2+d_{1,1})^2,\\ \rho _n=2(2n-1)-d^2_{n,1}\rho _{n-1}-d^2_{n,2}\rho _{n-2}+\frac{4\mu (2n-1)}{(2n-3)(2n+1)},\qquad n\ge 2,\\ d_{1,1}=-\frac{2(\mu +\nu _-)}{\rho _0},\qquad d_{2,1}=\frac{2\mu (d_{1,1}+1)}{\rho _1},\qquad d_{2,2}=-\frac{2\mu }{\rho _0},\\ d_{n,1}=\frac{2\mu d_{n-1,1}}{(2n-3)\rho _{n-1}},\qquad d_{n,2}=-\frac{2\mu }{(2n-3)\rho _{n-2}},\qquad n\ge 3.\end{array} \end{aligned}$$

Proof

According to the orthogonality assumption (30) and the Gram–Schmidt orthogonalization procedure, we have
$$\begin{aligned} \psi _n(x)=(n+1)_nJ^{-1,-1}_n(x) -\displaystyle \sum ^{n-1}_{m=0}\dfrac{A_{\mu ,\nu }((n+1)_nJ^{-1,-1}_n,\psi _m)}{\rho _m}\psi _m(x),\qquad n\ge 1. \end{aligned}$$
(32)
We first use mathematical induction to verify (31). Clearly, by (28) and (13), we deduce that for any \(n>m\ge 0,\)
$$\begin{aligned} A_{\mu ,\nu }(J^{-1,-1}_n,\psi _m) =\mu (J^{-1,-1}_n,\psi _m)+\nu _+ J^{-1,-1}_n(1)\psi _m(1)+\nu _- J^{-1,-1}_n(-1)\psi _m(-1). \end{aligned}$$
(33)
Moreover, by the definition of (4), we have \(J^{-1,-1}_1(x)=J^{0,0}_1(x)-\frac{1}{2}J^{0,0}_0(x)\) and
$$\begin{aligned} J^{-1,-1}_0(\pm 1)=1,\qquad J^{-1,-1}_1(-1)=-1,\qquad J^{-1,-1}_1(1)=0,\qquad J^{-1,-1}_n(\pm 1)=0,\quad n\ge 2. \end{aligned}$$
(34)
Hence, by (33), (34) and (11), we get
$$\begin{aligned} \begin{array}{ll} A_{\mu ,\nu }(2J^{-1,-1}_1,\psi _0) &{}=\mu (2J^{0,0}_1-J^{0,0}_0,J^{0,0}_0)+2\nu _+ J^{-1,-1}_1(1)J^{-1,-1}_0(1)+2\nu _- J^{-1,-1}_1(-1)J^{-1,-1}_0(-1)\\ &{}=-2(\mu +\nu _-).\end{array} \end{aligned}$$
This means that
$$\begin{aligned} \psi _1(x)=2J^{-1,-1}_1(x)-d_{1,1}\psi _0(x),\qquad d_{1,1}=-\dfrac{2(\mu +\nu _-)}{\rho _0}. \end{aligned}$$
Similarly, using (33), (34), (30) and (11), we get that for \(n\ge 2\) and \(m=0,1,\)
$$\begin{aligned} \begin{array} {ll} A_{\mu ,\nu }((n+1)_nJ^{-1,-1}_n,\psi _0) =\mu ((n+1)_nJ^{-1,-1}_n,J^{-1,-1}_0) \\ & =\mu (n+1)_n \left(J^{0,0}_n-\frac{1}{4(2n-1)(2n-3)}J^{0,0}_{n-2},J^{0,0}_0\right)=-2\mu \delta _{0,n-2}, \end{array} \end{aligned}$$
(35)
and
$$\begin{aligned} \begin{array} {ll} A_{\mu ,\nu }((n+1)_nJ^{-1,-1}_n,\psi _1) =\mu ((n+1)_nJ^{-1,-1}_n,2J^{-1,-1}_1-d_{1,1}\psi _0)\\ =\mu (n+1)_n \left(J^{0,0}_n-\frac{1}{4(2n-1)(2n-3)}J^{0,0}_{n-2},2J^{0,0}_1-(d_{1,1}+1)J^{0,0}_0\right)\\ =-\frac{2}{3}\mu \delta _{1,n-2}+2\mu (d_{1,1}+1)\delta _{0,n-2}. \end{array} \end{aligned}$$
(36)
Therefore, there exist the constants \(d_{2,1}\) and \(d_{2,2}\) such that
$$\begin{aligned} \psi _2(x)=(3)_2J^{-1,-1}_2(x)-d_{2,1}\psi _1(x)-d_{2,2}\psi _0(x),\qquad d_{2,1}=\frac{2\mu (d_{1,1}+1)}{\rho _1},\qquad d_{2,2}=-\frac{2\mu }{\rho _0}. \end{aligned}$$
Next, assume that for any \(2\le m\le n-1\) and \(n\ge 3,\)
$$\begin{aligned} \psi _m(x)=(m+1)_mJ^{-1,-1}_m(x)-d_{m,1}\psi _{m-1}(x)-d_{m,2}\psi _{m-2}(x). \end{aligned}$$
We shall prove \(\psi _n(x)=(n+1)_nJ^{-1,-1}_n(x)-d_{n,1}\psi _{n-1}(x)-d_{n,2}\psi _{n-2}(x)\) for \(n\ge 3.\) Clearly, by (33), (34), (15), (11) and the induction assumption, we derive that for \(n>m\ge 2,\)
$$\begin{aligned} &\,\, A_{\mu ,\nu }((n+1)_nJ^{-1,-1}_n,\psi _m)\\ &=\mu ((n+1)_nJ^{-1,-1}_n,(m+1)_mJ^{-1,-1}_m-d_{m,1}\psi _{m-1}-d_{m,2}\psi _{m-2})\\ & =\mu (n+1)_n(J^{0,0}_n-\frac{1}{4(2n-1)(2n-3)}J^{0,0}_{n-2},\\& \quad(m+1)_m(J^{0,0}_m-\frac{1}{4(2m-1)(2m-3)}J^{0,0}_{m-2})-d_{m,1}(m)_{m-1}J^{0,0}_{m-1})\\ & =-\,\frac{2\mu }{2n-3}\delta _{m,n-2}+\frac{2\mu d_{n-1,1}}{2n-3}\delta _{m-1,n-2}.\end{aligned}$$
(37)
This together with (32) leads to
$$\begin{aligned} \begin{array}{ll} \psi _n(x)=(n+1)_nJ^{-1,-1}_n(x)-d_{n,1}\psi _{n-1}(x)-d_{n,2}\psi _{n-2}(x),\qquad n\ge 3,\\ d_{n,1}=\frac{2\mu d_{n-1,1}}{(2n-3)\rho _{n-1}},\qquad \qquad d_{n,2}=-\frac{2\mu }{(2n-3)\rho _{n-2}}.\end{array} \end{aligned}$$
It remains to confirm the constant \(\rho _n\) with \(n\ge 0.\) Clearly, by (28), (7), (34) and (11), we know that
$$\begin{aligned}&\rho _0=A_{\mu ,\nu }(\psi _0,\psi _0) =(\partial _xJ^{-1,-1}_0,\partial _xJ^{-1,-1}_0)+\mu (J^{-1,-1}_0,J^{-1,-1}_0) \nonumber \\&\qquad +\nu _+ J^{-1,-1}_0(1)J^{-1,-1}_0(1)+\nu _- J^{-1,-1}_0(-1)J^{-1,-1}_0(-1) \nonumber \\&\quad =2\mu +\nu _++\nu _-, \end{aligned}$$
and
$$\begin{aligned} & \rho _1= \,& A_{\mu ,\nu }(\psi _1,\psi _1)=\,(\partial _x\psi _1,\partial _x\psi _1) +\mu (\psi _1,\psi _1)+\nu _+ \psi _1(1)\psi _1(1)+\nu _- \psi _1(-1)\psi _1(-1)\\= & (\partial _x(2J^{-1,-1}_1-d_{1,1}J^{-1,-1}_0),\partial _x(2J^{-1,-1}_1-d_{1,1}J^{-1,-1}_0))\\&+\mu (2J^{-1,-1}_1-d_{1,1}J^{-1,-1}_0,2J^{-1,-1}_1-d_{1,1}J^{-1,-1}_0)+\nu _+d^2_{1,1}+\nu _-(2+d_{1,1})^2\\= \,& 2+\frac{2}{3}\mu +2\mu (d_{1,1}+1)^2+\nu _+d^2_{1,1}+\nu _-(2+d_{1,1})^2. \end{aligned}$$
Moreover, by (28), (7) and (11), we obtain readily that for any \(n\ge 2,\)
$$\begin{aligned} A_{\mu ,\nu }((n+1)_nJ^{-1,-1}_n,(n+1)_nJ^{-1,-1}_n)=2(2n-1)+\frac{4\mu (2n-1)}{(2n-3)(2n+1)}. \end{aligned}$$
On the other hand, by (31) and (30) we have
$$\begin{aligned} &\,\,A_{\mu ,\nu }((n+1)_nJ^{-1,-1}_n,(n+1)_nJ^{-1,-1}_n)\\ &=A_{\mu ,\nu }(\psi _n+d_{n,1}\psi _{n-1}+d_{n,2}\psi _{n-2},\psi _n+d_{n,1}\psi _{n-1}+d_{n,2}\psi _{n-2})\\ & =\rho _n+d^2_{n,1}\rho _{n-1}+d^2_{n,2}\rho _{n-2}. \end{aligned}$$
Hence
$$\begin{aligned} \rho _n=2(2n-1)+\frac{4\mu (2n-1)}{(2n-3)(2n+1)}-d^2_{n,1}\rho _{n-1}-d^2_{n,2}\rho _{n-2},\qquad n\ge 2. \end{aligned}$$
The proof is completed.

Obviously, \(\mathcal {P}_N(I)=\{\psi _n~|~0\le n\le N\}.\) Thus the variational forms (28) and (29) together with the orthogonality of \(\{\psi _n\}_{n\ge 0}\) lead to the following main theorem in this subsection.

Theorem 3.2

Letu(x) and\(u_N(x)\) be the solutions of (28) and (29), respectively. Then bothu(x) and\(u_N(x)\) have the explicit representations in\(\{\psi _n\}_{n\ge 0},\)
$$\begin{aligned} \begin{array}{ll} u(x)=\displaystyle \sum ^{\infty }_{n=0}\hat{u}_n\psi _n(x),\qquad \qquad u_N(x)=\displaystyle \sum ^{N}_{n=0}\hat{u}_n\psi _n(x),\\ \hat{u}_n=\dfrac{1}{\rho _n}A_{\mu ,\nu }(u,\psi _n) =\dfrac{1}{\rho _n} [(f,\psi _n)+a_+\psi _n(1)+a_-\psi _n(-1)],\qquad n\ge 0.\end{array} \end{aligned}$$

3.3 Second-Order Problem with a Harmonic Potential

Consider the following second-order problem with a harmonic potential:
$$\begin{aligned} \left\{ \begin{array}{ll} -u''(x)+\mu x^2u(x)=f(x),\qquad \mu \ge 0,~x\in I,\\ u(-1)=u(1)=0. \end{array}\right. \end{aligned}$$
(38)
A weak formulation of (38) is to find \(u\in H^1_0(I)\) such that
$$\begin{aligned} B_\mu (u,v):=(u',v')+\mu (x^2u,v)=(f,v),\qquad \forall v\in H^1_0(I). \end{aligned}$$
(39)
The generalized Jacobi spectral scheme for (39) is to find \(u_N\in \mathcal {P}^0_N(I)\) such that
$$\begin{aligned} B_\mu (u_N,\phi )=(f,\phi ),\qquad \forall \phi \in \mathcal {P}^0_N(I). \end{aligned}$$
(40)
To propose a fully diagonalized approximation scheme for (39), we need to construct new basis functions \(\{\Psi _n\}_{n\ge 2},\) which are mutually orthogonal with respect to the Sobolev inner product \(B_\mu (\cdot ,\cdot ).\)

Lemma 3.3

Let \(\Psi _2(x)=(3)_2J^{-1,-1}_2(x)\) and \(\Psi _n(x)\in \mathcal {P}^0_n(I)\) be the Sobolev orthogonal generalized Jacobi polynomials such that \(\Psi _n(x)-(n+1)_nJ^{-1,-1}_n(x)\in \mathcal {P}^0_{n-1}(I),\) and
$$\begin{aligned} B_\mu (\Psi _m,\Psi _n)=\varrho _n\delta _{m,n},\qquad m,n\ge 2. \end{aligned}$$
(41)
Then we have
$$\begin{aligned} \Psi _n(x)=(n+1)_nJ^{-1,-1}_n(x)-d_{n,1}\Psi _{n-2}(x)-d_{n,2}\Psi _{n-4}(x),\qquad n\ge 2, \end{aligned}$$
(42)
where \(\Psi _n(x)\equiv 0~(n<2),~\varrho _n=0~(n<2),~d_{n,1}=0~(n<4),~d_{n,2}=0~(n<6),\) and
$$\begin{aligned} \begin{array}{ll} \varrho _n=2(2n-1)+\dfrac{4\mu (2n-1)(n^2-n-3)}{(2n-5)(2n-3)(2n+1)(2n+3)} -d^2_{n,1}\varrho _{n-2}-d^2_{n,2}\varrho _{n-4},\qquad n\ge 2,\\ d_{n,1}=\dfrac{1}{\varrho _{n-2}}\left( \dfrac{2\mu (1+d_{n-2,1})(n-2)(n-3)}{(2n-3)(2n-5)(2n-7)} -\dfrac{2\mu (n^2-n-3)}{(2n-5)(2n-3)(2n+1)}\right) ,\qquad n\ge 4,\\ d_{n,2}=-\dfrac{2\mu (n-2)(n-3)}{(2n-3)(2n-5)(2n-7)\varrho _{n-4}},\qquad n\ge 6. \end{array} \end{aligned}$$
(43)

Proof

According to the orthogonality assumption (41) and the Gram–Schmidt orthogonalization procedure, we have
$$\begin{aligned} \Psi _n(x)=(n+1)_nJ^{-1,-1}_n(x)-\displaystyle \sum ^{n-1}_{m=2}\dfrac{B_\mu ((n+1)_nJ^{-1,-1}_n,\Psi _m)}{\varrho _m}\Psi _m(x),\qquad n\ge 3. \end{aligned}$$
(44)
We first use mathematical induction to verify (42). Clearly, by (39) and (13), we deduce that for any \(n>m\ge 2,\)
$$\begin{aligned} \begin{array}{ll} B_\mu ((n+1)_nJ^{-1,-1}_n,\Psi _m) &{}=(n+1)_n(\partial _xJ^{-1,-1}_n,\partial _x\Psi _m)+\mu (n+1)_n(x^2J^{-1,-1}_n,\Psi _m)\\ &{}=\mu (n+1)_n(x^2J^{-1,-1}_n,\Psi _m). \end{array} \end{aligned}$$
(45)
Moreover, by Lemma 2.3 with \(\alpha =\beta =-1,\) we get for \(n\ge 2\)
$$\begin{aligned} \begin{array}{rl} x^2J^{-1,-1}_n(x)=&{}4(n+1)(n+2)J^{0,0}_{n+2}(x)+\dfrac{n^2-n-3}{(2n-3)(2n+3)}J^{0,0}_n(x)\\ &{}-\dfrac{n^2-n-3}{4(2n+1)(2n-1)(2n-3)(2n-5)}J^{0,0}_{n-2}(x)\\ &{}-\dfrac{(n-2)(n-3)}{16(2n-1)(2n-3)^2(2n-5)^2(2n-7)}J^{0,0}_{n-4}(x). \end{array} \end{aligned}$$
(46)
Hence, by (45), (46), (15) and (11) we derive
$$\begin{aligned} B_\mu ((4)_3J^{-1,-1}_3,\Psi _2)=\mu (120x^2J^{-1,-1}_3,12J^{-1,-1}_2)=0. \end{aligned}$$
This implies \(\Psi _3(x)=(4)_3J^{-1,-1}_3(x).\) Similarly, we get that for \(n=4\) and \(m=2,3,\)
$$\begin{aligned} \begin{array}{ll} B_\mu ((n+1)_nJ^{-1,-1}_n,\Psi _m)=\mu ((n+1)_nx^2J^{-1,-1}_n,(m+1)_mJ^{-1,-1}_m)\\ = \left(\dfrac{2\mu (n-2)(n-3)}{(2n-3)(2n-5)(2n-7)}-\dfrac{2\mu (n^2-n-3)}{(2n-5)(2n-3)(2n+1)}\right)\delta _{m,n-2}-\dfrac{2\mu (n-2)(n-3)}{(2n-3)(2n-5)(2n-7)}\delta _{m,n-4}\\ =\dfrac{6\mu }{(2n+1)(2n-3)(2n-7)}\delta _{m,n-2}-\dfrac{2\mu (n-2)(n-3)}{(2n-3)(2n-5)(2n-7)}\delta _{m,n-4}. \end{array} \end{aligned}$$
Therefore,
$$\begin{aligned} \begin{array}{ll} \Psi _4(x)=(5)_4J^{-1,-1}_4(x)-d_{4,1}\Psi _{2}(x),\qquad d_{4,1}=\frac{2\mu }{15\varrho _2},\\ \Psi _5(x)=(6)_5J^{-1,-1}_5(x)-d_{5,1}\Psi _{3}(x),\qquad d_{5,1}=\frac{2\mu }{77\varrho _3}.\end{array} \end{aligned}$$
In the same manner, we can verify the results of (42) for \(n=6\) with the constants \(d_{6,1}\) and \(d_{6,2}\) as in (43).
Next, assume that for any \(6\le m\le n-1\) and \(n\ge 7,\)
$$\begin{aligned} \Psi _m(x)=(m+1)_mJ^{-1,-1}_m(x)-d_{m,1}\Psi _{m-2}(x)-d_{m,2}\Psi _{m-4}(x). \end{aligned}$$
We shall prove \(\Psi _n(x)=(n+1)_nJ^{-1,-1}_n(x)-d_{n,1}\Psi _{n-2}(x)-d_{n,2}\Psi _{n-4}(x)\) for \(n\ge 7.\) Clearly, by (45), (46), (15), (11) and the induction assumption, we derive that for \(n>m\) and \(n\ge 7,\)
$$\begin{aligned} &\,\, B_\mu ((n+1)_nJ^{-1,-1}_n,\Psi _m)\\ & =\mu ((n+1)_nx^2J^{-1,-1}_n,(m+1)_mJ^{-1,-1}_m-d_{m,1}\Psi _{m-2}-d_{m,2}\Psi _{m-4})\\ & =\left( \dfrac{2\mu (1+d_{n-2,1})(n-2)(n-3)}{(2n-3)(2n-5)(2n-7)}-\dfrac{2\mu (n^2-n-3)}{(2n-5)(2n-3)(2n+1)}\right) \delta _{m,n-2}-\dfrac{2\mu (n-2)(n-3)}{(2n-3)(2n-5)(2n-7)}\delta _{m,n-4}, \end{aligned}$$
which along with (44), implies
$$\begin{aligned} \begin{array}{ll} \Psi _n(x)=(n+1)_nJ^{-1,-1}_n(x)-d_{n,1}\Psi _{n-2}(x)-d_{n,2}\Psi _{n-4}(x),\\ d_{n,1}=\dfrac{1}{\varrho _{n-2}}\left( \dfrac{2\mu (1+d_{n-2,1})(n-2)(n-3)}{(2n-3)(2n-5)(2n-7)}-\dfrac{2\mu (n^2-n-3)}{(2n-5)(2n-3)(2n+1)}\right) ,\\ d_{n,2}=-\dfrac{2\mu (n-2)(n-3)}{(2n-3)(2n-5)(2n-7)\varrho _{n-4}}.\end{array} \end{aligned}$$
It remains to confirm the constant \(\varrho _n,~n\ge 2.\) Clearly, by (41), (39), (13), (46), (15) and (11), we know that for \(n=2,3,\)
$$\begin{aligned} \begin{array}{ll} \varrho _n&{}=B_\mu (\Psi _n,\Psi _n)=((n+1)_n)^2B_\mu (J^{-1,-1}_n,J^{-1,-1}_n)\\ &{}=((n+1)_n)^2\big ((\partial _xJ^{-1,-1}_n,\partial _xJ^{-1,-1}_n)+\mu (x^2J^{-1,-1}_n,J^{-1,-1}_n)\big )\\ &{}=(2n-1)^2(L_{n-1},L_{n-1})+\mu \left( \dfrac{n^2-n-3}{(2n-3)(2n+3)}L_n-\dfrac{n^2-n-3}{(2n-5)(2n+1)}L_{n-2},L_n-L_{n-2}\right) \\ &{}=2(2n-1)+\dfrac{4\mu (2n-1)(n^2-n-3)}{(2n-5)(2n-3)(2n+1)(2n+3)}. \end{array} \end{aligned}$$
(47)
Thus \(\varrho _2=6+\frac{12}{35}\mu \) and \(\varrho _3=10+\frac{20}{63}\mu \) as in (43). Moreover, by (47) we obtain readily that for any \(n\ge 4,\)
$$\begin{aligned} B_\mu ((n+1)_nJ^{-1,-1}_n,(n+1)_nJ^{-1,-1}_n)=2(2n-1)+\frac{4\mu (2n-1)(n^2-n-3)}{(2n-5)(2n-3)(2n+1)(2n+3)}. \end{aligned}$$
On the other hand, by (42) and (41) we have
$$\begin{aligned} & \,\,B_\mu ((n+1)_nJ^{-1,-1}_n,(n+1)_nJ^{-1,-1}_n)\\ & =B_\mu (\Psi _n+d_{n,1}\Psi _{n-2}+d_{n,2}\Psi _{n-4},\Psi _n+d_{n,1}\Psi _{n-2}+d_{n,2}\Psi _{n-4})\\ & =\varrho _n+d^2_{n,1}\varrho _{n-2}+d^2_{n,2}\varrho _{n-4}. \end{aligned}$$
Hence
$$\begin{aligned} \varrho _n=2(2n-1)+\frac{4\mu (2n-1)(n^2-n-3)}{(2n-5)(2n-3)(2n+1)(2n+3)}-d^2_{n,1}\varrho _{n-2}-d^2_{n,2}\varrho _{n-4},\qquad n\ge 4. \end{aligned}$$
This ends the proof.

Obviously, \(\mathcal {P}^0_N(I)=\{\Psi _n~|~2\le n\le N\}.\) Thus the variational forms (39) and (40) together with the orthogonality of \(\{\Psi _n\}_{n\ge 2}\) lead to the following main theorem in this subsection.

Theorem 3.3

Letu(x) and\(u_N(x)\) be the solutions of (39) and (40), respectively. Then bothu(x) and\(u_N(x)\) have the explicit representations in\(\{\Psi _n\}_{n\ge 2},\)
$$\begin{aligned} \begin{array}{ll} u(x)=\displaystyle \sum ^{\infty }_{n=2}\hat{u}_n\Psi _n(x),\qquad u_N(x)=\displaystyle \sum ^{N}_{n=2}\hat{u}_n\Psi _n(x),\\ \hat{u}_n=\dfrac{1}{\varrho _n}B_\mu (u,\Psi _n)=\dfrac{1}{\varrho _n}(f,\Psi _n),\qquad n\ge 2.\end{array} \end{aligned}$$

3.4 Fourth-Order Problem with Dirichlet Boundary Condition

Consider the following fourth-order elliptic boundary value problem:
$$\begin{aligned} \left\{ \begin{array}{ll} \!\!\partial ^4_xu(x)-\lambda \partial ^2_xu(x)+\mu u(x)=f(x),\qquad \lambda , \mu \ge 0,~x\in I,\\ \!\!\partial _xu(\pm 1)=u(\pm 1)=0. \end{array}\right. \end{aligned}$$
(48)
Let
$$\begin{aligned} H^2_0(I)=\{v\in H^2(I)~|~\partial _xv(\pm 1)=v(\pm 1)=0\},\qquad \mathcal {V}_N(I)=\mathcal {P}_N(I)\cap H^2_0(I). \end{aligned}$$
Clearly, \(\mathcal {V}_N(I)=\mathrm{span}\{J^{-2,-2}_n(x):4\le n\le N\}.\) A weak formulation of (48) is to find \(u\in H^2_0(I)\) such that
$$\begin{aligned} B_{\lambda ,\mu }(u,v):=(\partial ^2_xu,\partial ^2_xv)+\lambda (\partial _xu,\partial _xv)+\mu (u,v)=(f,v),\qquad \forall v\in H^2_0(I). \end{aligned}$$
(49)
Clearly, if \(f\in (H^2_0(I))',\) then by the Lax–Milgram lemma, (49) admits a unique solution.
The generalized Jacobi spectral scheme for (49) is to find \(u_N\in \mathcal {V}_N(I)\) such that
$$\begin{aligned} B_{\lambda ,\mu }(u_N,\phi )=(f,\phi ),\qquad \forall \phi \in \mathcal {V}_N(I). \end{aligned}$$
(50)
To propose a fully diagonalized approximation scheme for (49), we need to construct new basis functions \(\{\Phi _n\}_{n\ge 4},\) which are mutually orthogonal with respect to the Sobolev inner product \(B_{\lambda ,\mu }(\cdot ,\cdot ).\)

Lemma 3.4

Let \(\Phi _4(x)=(4)_3J^{-2,-2}_4(x)\) and \(\Phi _n(x)\in \mathcal {V}_n(I)\) be the Sobolev orthogonal generalized Jacobi polynomials such that \(\Phi _n(x)-(n)_{n-1}J^{-2,-2}_n(x)\in \mathcal {V}_{n-1}(I),\) and
$$\begin{aligned} B_{\lambda ,\mu }(\Phi _m,\Phi _n)=\sigma _n\delta _{m,n},\qquad m,n\ge 4. \end{aligned}$$
(51)
Then we have
$$\begin{aligned} \Phi _n(x)=(n)_{n-1}J^{-2,-2}_n(x)-d_{n,1}\Phi _{n-2}(x)-d_{n,2}\Phi _{n-4}(x),\qquad n\ge 5, \end{aligned}$$
(52)
where \(\Phi _n(x)\equiv 0~(n\le 3),~\sigma _n=0~(n\le 3),~d_{n,1}=0~(n\le 5),~d_{n,2}=0~(n\le 7),\) and
$$\begin{aligned} \begin{array}{ll} \sigma _n=\dfrac{2n-3}{2}+\dfrac{\lambda (2n-3)}{(2n-1)(2n-5)}+\dfrac{3\mu (2n-3)}{(2n-7)(2n-5)(4n^2-1)}-d^2_{n,1}\sigma _{n-2}-d^2_{n,2}\sigma _{n-4},\qquad n\ge 4,\\ d_{n,1}=-\dfrac{1}{\sigma _{n-2}}\left( \frac{\lambda }{2(2n-5)}+\dfrac{2\mu }{(2n-1)(2n-5)(2n-9)}+\dfrac{\mu d_{n-2,1}}{2(2n-5)(2n-7)(2n-9)}\right) ,\qquad n\ge 6,\\ d_{n,2}=\dfrac{\mu }{2(2n-5)(2n-7)(2n-9)\sigma _{n-4}},\qquad n\ge 8. \end{array} \end{aligned}$$
(53)

Proof

According to the orthogonality assumption (51) and the Gram–Schmidt orthogonalization procedure, we have
$$\begin{aligned} \Phi _n(x)=(n)_{n-1}J^{-2,-2}_n(x)-\displaystyle \sum ^{n-1}_{m=4}\dfrac{B_{\lambda ,\mu }((n)_{n-1}J^{-2,-2}_n,\Phi _m)}{\sigma _m}\Phi _m(x),\qquad n\ge 5. \end{aligned}$$
(54)
We first use mathematical induction to verify (52). Clearly, by (49) and (13), we deduce that for any \(n>m\ge 4,\)
$$\begin{aligned} \begin{array}{ll} B_{\lambda ,\mu }((n)_{n-1}J^{-2,-2}_n,\Phi _m) =\lambda (n)_{n-1}(\partial _xJ^{-2,-2}_n,\partial _x\Phi _m)+\mu (n)_{n-1}(J^{-2,-2}_n,\Phi _m). \end{array} \end{aligned}$$
(55)
Moreover, by (15), we get for \(n\ge 4,\)
$$\begin{aligned} \partial _xJ^{-2,-2}_n(x)=\frac{1}{2} \left( J^{0,0}_{n-1}(x)-\frac{1}{4(2n-3)(2n-5)}J^{0,0}_{n-3}(x)\right) . \end{aligned}$$
(56)
Hence, by (55), (56), (15) and (11) we derive
$$\begin{aligned} \begin{array}{ll} B_{\lambda ,\mu }((5)_4J^{-2,-2}_5,\Phi _4)=\lambda (5)_4(\partial _xJ^{-2,-2}_5,\partial _xJ^{-2,-2}_4)+\mu (5)_4(J^{-2,-2}_5,J^{-2,-2}_4) =0.\end{array} \end{aligned}$$
This implies \(\Phi _5(x)=(5)_4J^{-2,-2}_5(x).\) Similarly, we get that for \(n>m\) and \(m=4,5,\)
$$\begin{aligned} \begin{array}{ll} B_{\lambda ,\mu }((n)_{n-1}J^{-2,-2}_n,\Phi _m)\\ =(n)_{n-1}(m)_{m-1}\big (\lambda (\partial _xJ^{-2,-2}_n,\partial _xJ^{-2,-2}_m)+\mu (J^{-2,-2}_n,J^{-2,-2}_m)\big )\\ =-\left( \dfrac{\lambda }{2(2n-5)}+\dfrac{2\mu }{(2n-1)(2n-5)(2n-9)}\right) \delta _{m,n-2}+\dfrac{\mu }{2(2n-5)(2n-7)(2n-9)}\delta _{m,n-4}. \end{array} \end{aligned}$$
Therefore
$$\begin{aligned} \begin{array}{ll} \Phi _6(x)=(6)_5J^{-2,-2}_6(x)-d_{6,1}\Phi _4(x),\qquad d_{6,1}=-\frac{33\lambda +4\mu }{462\sigma _4},\\ \Phi _7(x)=(7)_6J^{-2,-2}_7(x)-d_{7,1}\Phi _5(x),\qquad d_{7,1}=-\frac{65\lambda +4\mu }{{1}\,{170\sigma _5}}.\end{array} \end{aligned}$$
In the same manner, we can verify the results of (52) for \(n=8\) with the constants \(d_{8,1}\) and \(d_{8,2}\) as in (53).
Next, assume that for any \(4\le m\le n-1\) and \(n\ge 9,\)
$$\begin{aligned} \Phi _m(x)=(m)_{m-1}J^{-2,-2}_m(x)-d_{m,1}\Phi _{m-2}(x)-d_{m,2}\Phi _{m-4}(x). \end{aligned}$$
We shall prove \(\Phi _n(x)=(n)_{n-1}J^{-2,-2}_n(x)-d_{n,1}\Phi _{n-2}(x)-d_{n,2}\Phi _{n-2}(x)\) for \(n\ge 9.\) Clearly, by (55), (56), (15), (11) and the induction assumption, we derive that for \(n>m\) and \(n\ge 9,\)
$$\begin{aligned} & B_{\lambda ,\mu }((n)_{n-1}J^{-2,-2}_n,\Phi _m)\\ & =\lambda (n)_{n-1}(m)_{m-1}(\partial _xJ^{-2,-2}_n,\partial _xJ^{-2,-2}_m)+\mu (n)_{n-1}(m)_{m-1}(J^{-2,-2}_n,J^{-2,-2}_m)\\ & \qquad -\mu d_{m,1}(n)_{n-1}(m-2)_{m-3}(J^{-2,-2}_n,J^{-2,-2}_{m-2})\\ & =-\left( \frac{\lambda }{2(2n-5)}+\frac{2\mu }{(2n-1)(2n-5)(2n-9)}+\frac{\mu d_{n-2,1}}{2(2n-5)(2n-7)(2n-9)}\right) \delta _{m,n-2}+\frac{\mu }{2(2n-5)(2n-7)(2n-9)}\delta _{m,n-4}, \end{aligned}$$
which along with (54) implies
$$\begin{aligned} \begin{array}{ll} \Phi _n(x)=(n)_{n-1}J^{-2,-2}_n(x)-d_{n,1}\Phi _{n-2}(x)-d_{n,2}\Phi _{n-4}(x),\qquad n\ge 8,\\ d_{n,1}=-\dfrac{1}{\sigma _{n-2}}\left( \dfrac{\lambda }{2(2n-5)}+\dfrac{2\mu }{(2n-1)(2n-5)(2n-9)}+\dfrac{\mu d_{n-2,1}}{2(2n-5)(2n-7)(2n-9)}\right) ,\\ d_{n,2}=\dfrac{\mu }{2(2n-5)(2n-7)(2n-9)\sigma _{n-4}}.\end{array} \end{aligned}$$
It remains to confirm the constant \(\sigma _n,~n\ge 4.\) Clearly, by (52), (51), (13), (56), (15) and (11), we know that for \(n=4,5,\)
$$\begin{aligned} \begin{array}{ll} \sigma _n&{}=B_{\lambda ,\mu }(\Phi _n,\Phi _n)=((n)_{n-1})^2B_{\lambda ,\mu }(J^{-2,-2}_n,J^{-2,-2}_n)\\ &{}=((n)_{n-1})^2\big ((\partial ^2_xJ^{-2,-2}_n,\partial ^2_xJ^{-2,-2}_n)+\lambda (\partial _xJ^{-2,-2}_n,\partial _xJ^{-2,-2}_n)+\mu (J^{-2,-2}_n,J^{-2,-2}_n)\big )\\ &{}=\dfrac{2n-3}{2}+\dfrac{\lambda (2n-3)}{(2n-1)(2n-5)}+\dfrac{3\mu (2n-3)}{(2n-7)(2n-5)(4n^2-1)}. \end{array} \end{aligned}$$
(57)
Thus \(\sigma _4=\frac{5}{2}+\frac{5}{21}\lambda +\frac{5}{63}\mu \) and \(\sigma _5=\frac{7}{2}+\frac{7}{45}\lambda +\frac{7}{495}\mu .\) Moreover, by (57) we obtain readily that for any \(n\ge 6,\)
$$\begin{aligned} B_{\lambda ,\mu }((n)_{n-1}J^{-2,-2}_n,(n)_{n-1}J^{-2,-2}_n)=\frac{2n-3}{2}+\frac{\lambda (2n-3)}{(2n-1)(2n-5)}+\frac{3\mu (2n-3)}{(2n-7)(2n-5)(4n^2-1)}. \end{aligned}$$
On the other hand, by (52) and (51) we have
$$\begin{aligned} \begin{array}{ll} B_{\lambda ,\mu }((n)_{n-1}J^{-2,-2}_n,(n)_{n-1}J^{-2,-2}_n)\\ =B_{\lambda ,\mu }(\Phi _n+d_{n,1}\Phi _{n-2}+d_{n,2}\Phi _{n-4},\Phi _n+d_{n,1}\Phi _{n-2}+d_{n,2}\Phi _{n-4})\\ =\sigma _n+d^2_{n,1}\sigma _{n-2}+d^2_{n,2}\sigma _{n-4}.\end{array} \end{aligned}$$
Hence
$$\begin{aligned} \sigma _n=\frac{2n-3}{2}+\frac{\lambda (2n-3)}{(2n-1)(2n-5)}+\frac{3\mu (2n-3)}{(2n-7)(2n-5)(4n^2-1)}-d^2_{n,1}\sigma _{n-2}-d^2_{n,2}\sigma _{n-4},\qquad n\ge 6. \end{aligned}$$
This ends the proof.

Obviously, \(\mathcal {V}_N(I)=\{\Phi _n~|~4\le n\le N\}.\) Thus the variational forms (49) and (50) together with the orthogonality of \(\{\Phi _n\}_{n\ge 2}\) lead to the following main theorem in this subsection.

Theorem 3.4

Letu(x) and\(u_N(x)\) be the solutions of (49) and (50), respectively. Then bothu(x) and\(u_N(x)\) have the explicit representations in\(\{\Phi _n\}_{n\ge 4},\)
$$\begin{aligned} \begin{array}{ll} u(x)=\displaystyle \sum ^{\infty }_{n=4}\hat{u}_n\Phi _n(x),\qquad u_N(x)=\displaystyle \sum ^{N}_{n=4}\hat{u}_n\Phi _n(x),\\ \hat{u}_n=\dfrac{1}{\sigma _n}B_{\lambda ,\mu }(u,\Phi _n)=\dfrac{1}{\sigma _n}(f,\Phi _n),\qquad n\ge 4.\end{array} \end{aligned}$$

4 Convergence Analysis

In this section, we first derive the approximation properties of generalized Jacobi orthogonal projections, and then present the numerical errors of schemes (20) and (29).

4.1 Orthogonal Projections

Let \(\alpha ,\beta \in \mathcal {N}\) and
$$\begin{aligned} \mathcal {Q}^{\alpha ,\beta }_N(I):=\mathrm{span} \left \{J^{\alpha ,\beta }_{\hat{\alpha }+\hat{\beta }}(x),J^{\alpha ,\beta }_{\hat{\alpha }+\hat{\beta }+1}(x),\ldots ,J^{\alpha ,\beta }_N(x)\right\}. \end{aligned}$$
According to (9), we have
$$\begin{aligned} \mathcal {Q}^{\alpha ,\beta }_N(I)=\{\phi \in \mathcal {P}_N(I):\partial ^i_x\phi (-1)=\partial ^j_x\phi (1)=0,~0\le i\le -\alpha -1,~0\le j\le -\beta -1\}. \end{aligned}$$
The orthogonal projection \(\pi _{N,\alpha ,\beta }:L^2_{\omega ^{\alpha ,\beta }}(I)\rightarrow \mathcal {Q}^{\alpha ,\beta }_N(I)\) is defined by
$$\begin{aligned} (\pi _{N,\alpha ,\beta }u-u,~\phi )_{\omega ^{\alpha ,\beta }}=0, \qquad \forall \phi \in \mathcal {Q}^{\alpha ,\beta }_N(I), \end{aligned}$$
(58)
or equivalently,
$$\begin{aligned} \pi _{N,\alpha ,\beta }u=\displaystyle \sum ^N_{n=\widehat{\alpha }+\widehat{\beta }}\hat{u}^{\alpha ,\beta }_nJ^{\alpha ,\beta }_n(x),\qquad \hat{u}^{\alpha ,\beta }_n=\dfrac{1}{\gamma ^{\alpha ,\beta }_n}\displaystyle \int _Iu(x)J^{\alpha ,\beta }_n(x)\omega ^{\alpha ,\beta }(x){\text {d}}x. \end{aligned}$$
According to Theorem 1.8.2 of [17], one verifies readily that if \(\alpha ,\beta \in \mathcal {N},\)\(\partial ^r_xu\in L^2_{\omega ^{\alpha +r,\beta +r}}(I)\) and integers \(1\le r\le N+1,\) then
$$\begin{aligned} \Vert \partial ^k_x(\pi _{N,\alpha ,\beta }u-u)\Vert _{\omega ^{\alpha +k,\beta +k}}\le cN^{k-r}\Vert \partial ^r_xu\Vert _{\omega ^{\alpha +r,\beta +r}},\qquad 0\le k\le r, \end{aligned}$$
(59)
where c stands for a generic positive constant independent of any function and N.
Next, for integers \(m\ge 1,\) let
$$\begin{aligned} H^m_0(I)=\{v\in H^m(I)~|~\partial ^k_xv(\pm 1)=0,~0\le k\le m-1\}. \end{aligned}$$
It is obvious that \((\partial ^m_x\cdot ,~\partial ^m_x\cdot )\) is an inner product on \(H^m_0(I)\) and \(\mathcal {Q}^{-m,-m}_N(I)\subseteq H^m_0(I).\) We define the orthogonal projection \(\pi ^{m,0}_N:H^m_0(I)\rightarrow \mathcal {Q}^{-m,-m}_N(I)\) by
$$\begin{aligned} (\partial ^m_x(\pi ^{m,0}_Nu-u),~\partial ^m_x\phi )=0,\qquad \forall \phi \in \mathcal {Q}^{-m,-m}_N(I). \end{aligned}$$
(60)
By (58) and integration by parts, we know that for any \(u\in H^m_0(I),\)
$$\begin{aligned} \begin{array}{ll} (\partial ^m_x(\pi _{N,-m,-m}u-u),\partial ^m_x\phi )=(-1)^m(\pi _{N,-m,-m}u-u,\partial ^{2m}_x\phi )\\ =(-1)^m(\pi _{N,-m,-m}u-u,\omega ^{m,m}\partial ^{2m}_x\phi )_{\omega ^{-m,-m}}=0,\qquad \forall \phi \in \mathcal {Q}^{-m,-m}_N(I). \end{array} \end{aligned}$$
(61)
This means \(\pi ^{m,0}_Nu(x)=\pi _{N,-m,-m}u(x)\) for any \(u\in H^m_0(I).\) Therefore, by (59) we get that for integers \(1\le r\le N+1,\)
$$\begin{aligned} \Vert \partial ^k_x(\pi ^{m,0}_Nu-u)\Vert _{\omega ^{-m+k,-m+k}} \le cN^{k-r}\Vert \partial ^r_xu\Vert _{\omega ^{-m+r,-m+r}},\qquad 0\le k\le r. \end{aligned}$$
(62)
In order to analyze the numerical error of scheme (25), we have to consider an unusual mapping. To do this, for any \(u\in H^1(I)\) we set
$$\begin{aligned} \widetilde{u}(x)=u(x)-\frac{1}{2}u(1)(x+1)+\frac{1}{2}u(-1)(x-1)\in H^1_0(I), \end{aligned}$$
and define the mapping \({}_*\pi ^1_N\) by
$$\begin{aligned} {}_*\pi ^1_N u(x)=\pi ^{1,0}_N\widetilde{u}(x)+\frac{1}{2}u(1)(x+1)-\frac{1}{2}u(-1)(x-1)\in \mathcal {P}_N(I). \end{aligned}$$
Clearly, \({}_*\pi ^1_N u(\pm 1)=u(\pm 1).\) Moreover, by virtue of (62) with \(m=1,\) we have that if \(\partial ^r_x u\in L^2_{\omega ^{r-1,r-1}}(I)\) and integers \(1\le r\le N+1,\) then for \(k=0,1,\)
$$\begin{aligned} \begin{array}{ll} \Vert \partial ^k_x({}_*\pi ^1_N u-u)\Vert _{\omega ^{k-1,k-1}} &{}=\Vert \partial ^k_x(\pi ^{1,0}_N\widetilde{u}-\widetilde{u})\Vert _{\omega ^{k-1,k-1}}\\ &{}\le cN^{k-r}\Vert \partial ^r_x\widetilde{u}\Vert _{\omega ^{r-1,r-1}} \le cN^{k-r}\Vert \partial ^r_xu\Vert _{\omega ^{r-1,r-1}}. \end{array} \end{aligned}$$
(63)

4.2 Convergence Analysis

Theorem 4.1

Letu and\(u_N\) be the solutions of (19) and (20), respectively. If\(u\in H^r_{\omega ^{r-1,r-1}}(I)\) and integers\(1\le r\le N+1,\) then for\(\mu >0,\)
$$\begin{aligned} \Vert \partial ^k_x(u-u_N)\Vert \le cN^{k-r}\Vert \partial ^r_xu\Vert _{\omega ^{r-1,r-1}},\qquad k=0,1, \end{aligned}$$
(64)
while for\(\mu =0,\)
$$\begin{aligned} \Vert \partial ^k_x(u-u_N)\Vert _{\omega ^{k-1,k-1}}\le cN^{k-r}\Vert \partial ^r_xu\Vert _{\omega ^{r-1,r-1}},\qquad k=0,1. \end{aligned}$$
(65)

Proof

Clearly, \(\mathcal {P}^0_N(I)=\mathcal {Q}^{-1,-1}_N(I).\) Hence, by (19) and (60) with \(m=1,\) we get
$$\begin{aligned} (\partial _x \pi ^{1,0}_Nu,\partial _x\phi )+\mu (\pi ^{1,0}_Nu,\phi )=(f,\phi )+\mu (\pi ^{1,0}_Nu-u,\phi ),\quad \phi \in \mathcal {P}^0_N(I). \end{aligned}$$
(66)
Subtracting (20) from (66) yields
$$\begin{aligned} (\partial _x(\pi ^{1,0}_Nu-u_N),\partial _x\phi )+\mu (\pi ^{1,0}_Nu-u_N,\phi )=\mu (\pi ^{1,0}_Nu-u,\phi ),\quad \phi \in \mathcal {P}^0_N(I). \end{aligned}$$
(67)
Taking \(\phi =\pi ^{1,0}_Nu-u_N\) in (67), and using the Cauchy–Schwartz inequality, we find
$$\begin{aligned} \Vert \partial _x(\pi ^{1,0}_Nu-u_N)\Vert ^2+\mu \Vert \pi ^{1,0}_Nu-u_N\Vert ^2=\mu (\pi ^{1,0}_Nu-u,\pi ^{1,0}_Nu-u_N)\le \mu \Vert \pi ^{1,0}_Nu-u\Vert \Vert \pi ^{1,0}_Nu-u_N\Vert . \end{aligned}$$
This along with (62) leads to
$$\begin{aligned} \Vert \partial _x(\pi ^{1,0}_Nu-u_N)\Vert ^2+\mu \Vert \pi ^{1,0}_Nu-u_N\Vert ^2\le c\Vert \pi ^{1,0}_Nu-u\Vert ^2 \le cN^{-2r}\Vert \partial ^r_xu\Vert ^2_{\omega ^{r-1,r-1}}. \end{aligned}$$
If \(\mu >0,\) then by using (62) again, we obtain the desired result of (64) for \(k=0,1.\) If \(\mu =0,\) then we have \(u_N(x)=\pi ^{1,0}_Nu(x).\) Hence, by (62) we derive the desired result of (65).

Theorem 4.2

Letu and\(u_N\) be the solutions of (28) and (29), respectively. If \(u\in H^r_{\omega ^{r-1,r-1}}(I)\) and integers\(1\le r\le N+1,\) then
$$\begin{aligned} \Vert \partial _x(u-u_N)\Vert +\mu \Vert u-u_N\Vert +\nu _+|u(1)-u_N(1)|+\nu _-|u(-1)-u_N(-1)| \le cN^{1-r}\Vert \partial ^r_xu\Vert _{\omega ^{r-1,r-1}}. \end{aligned}$$
(68)

Proof

By (28) we get
$$\begin{aligned} \begin{array}{ll} (\partial _x{}_*\pi ^1_Nu,\partial _x\phi )+\mu ({}_*\pi ^1_Nu,\phi )+\nu _+u(1)\phi (1)+\nu _-u(-1)\phi (-1)\\ =(\partial _x({}_*\pi ^1_Nu-u),\partial _x\phi )+\mu ({}_*\pi ^1_Nu-u,\phi )+(f,\phi )+a_+\phi (1)+a_-\phi (-1), \quad \phi \in \mathcal {P}_N(I). \end{array} \end{aligned}$$
(69)
Subtracting (29) from (69) yields
$$\begin{aligned} \begin{array}{ll} (\partial _x({}_*\pi ^1_Nu-u_N),\partial _x\phi )+\mu ({}_*\pi ^1_Nu-u_N,\phi )\\ +\nu _+(u(1)-u_N(1))\phi (1)+\nu _-(u(-1)-u_N(-1))\phi (-1)\\ =(\partial _x({}_*\pi ^1_Nu-u),\partial _x\phi )+\mu ({}_*\pi ^1_Nu-u,\phi ),\qquad \phi \in \mathcal {P}_N(I). \end{array} \end{aligned}$$
(70)
Take \(\phi ={}_*\pi ^1_Nu-u_N\) in (70). Then by (63), the Cauchy–Schwartz inequality and the fact \({}_*\pi ^1_Nu(\pm 1)=u(\pm 1),\) we deduce that
$$\begin{aligned} \begin{array}{ll} \Vert \partial _x({}_*\pi ^1_Nu-u_N)\Vert ^2+\mu \Vert {}_*\pi ^1_Nu-u_N\Vert ^2 +\nu _+(u(1)-u_N(1))^2+\nu _-(u(-1)-u_N(-1))^2\\ =&{}(\partial _x({}_*\pi ^1_Nu-u),\partial _x({}_*\pi ^1_Nu-u_N))+\mu ({}_*\pi ^1_Nu-u,{}_*\pi ^1_Nu-u_N)\\ \le &{}\Vert \partial _x({}_*\pi ^1_Nu-u)\Vert \Vert \partial _x({}_*\pi ^1_Nu-u_N)\Vert +\mu \Vert {}_*\pi ^1_Nu-u\Vert \Vert {}_*\pi ^1_Nu-u_N\Vert .\end{array} \end{aligned}$$
This along with the Cauchy–Schwartz inequality and (63) leads to
$$\begin{aligned} \begin{array}{ll} \Vert \partial _x({}_*\pi ^1_Nu-u_N)\Vert ^2+\mu \Vert {}_*\pi ^1_Nu-u_N\Vert ^2 +2\nu _+(u(1)-u_N(1))^2+2\nu _-(u(-1)-u_N(-1))^2\\ &\quad \le \Vert \partial _x({}_*\pi ^1_Nu-u)\Vert ^2+\mu \Vert {}_*\pi ^1_Nu-u\Vert ^2\le cN^{2-2r}\Vert \partial ^r_xu\Vert ^2_{\omega ^{r-1,r-1}}. \end{array} \end{aligned}$$
By using (63) again, we get the desired result.

5 Numerical Results

In this section, we examine the effectiveness and the accuracy of the generalized Jacobi spectral method for solving elliptic boundary problems on the interval I.

5.1 Problem (18)

We examine the second-order Dirichlet boundary problem (18) with \(\mu =1\) and consider the following two cases:
  • Smooth solution:  \(u(x)=(1-x^2)\sin (1+x).\) In Fig. 1, we list the discrete \(L^2\)- and \(L^\infty \)-errors. Clearly, the near straight lines indicate an exponential convergence rate.

  • Non-smooth solution:  \(u(x)=(1-x^2)(1+x)^h.\) In Fig. 2, we plot the discrete \(L^2\)-errors vs. \(\log _{10}N\) with \(h=\frac{1}{2},\frac{3}{2},\frac{5}{2},\frac{7}{2},\frac{9}{2}.\) They show that the bigger the index h becomes, the faster the numerical errors decay. Obviously,
    $$\begin{aligned} \Vert \partial ^r_x((1-x^2)(1+x)^h)\Vert _{\omega ^{r-1,r-1}}<\infty ,\qquad \forall 1\le r\le 2h+1, \end{aligned}$$
the expected \(L^2\)-errors given by Theorem 4.1 can be bounded by \(cN^{-1-2h+\epsilon }\) for any \(\epsilon >0.\) The observed convergence rates shown in Fig. 2 agree with the theoretical result, and the near straight lines indicate an algebraic convergence rate.
Fig. 1

Errors of \(u(x)=(1-x^2)\sin (1+x)\)

Fig. 2

\(L^2\)-errors of \(u(x)=(1-x^2)(1+x)^h\)

5.2 Problem (27)

We examine the second-order Robin boundary problem (27) with \(\mu =\nu _+=\nu _-=1\) and consider the following two cases:
  • Smooth solution:  \(u(x)=\sin (1+x^2).\) In Fig. 3, we list the discrete \(L^2\)- and \(L^\infty \)-errors. Again, the near straight lines indicate an exponential convergence rate.

  • Non-smooth solution:  \(u(x)=(1+x)^h\mathrm{e}^x.\) In Fig. 4, we plot the discrete \(L^2\)-errors vs. \(\log _{10}N\) with \(h=\frac{5}{2},\frac{7}{2},\frac{9}{2}.\) They also show that the bigger the index h becomes, the faster the numerical errors decay. Clearly,
    $$\begin{aligned} \Vert \partial ^r_x((1+x)^h\mathrm{e}^x)\Vert _{\omega ^{r-1,r-1}}<\infty ,\qquad 1\le r\le 2h-1, \end{aligned}$$
the expected \(L^2\)-errors given by Theorem 4.2 can be bounded by \(cN^{2-2h+\epsilon }\) for any \(\epsilon >0.\) The observed convergence rates shown in Fig. 4 agree with the theoretical result, and the near straight lines indicate an algebraic convergence rate again.
Fig. 3

Errors of \(u(x)=\sin (1+x^2)\)

Fig. 4

\(L^2\)-errors of \(u(x)=(1+x)^h\mathrm{e}^x\)

5.3 Problem (38)

We examine the second-order problem (38) with a harmonic potential. Take \(\mu =2\) and consider the following two cases:
  • Smooth solution:  \(u(x)=(1-x^2)\sin (1+x).\) In Fig. 5, we list the discrete \(L^2\)- and \(L^\infty \)-errors. The two near straight lines indicate an exponential convergence rate.

  • Non-smooth solution:  \(u(x)=(1-x^2)(1+x)^h.\) In Fig. 6, we plot the discrete \(L^2\)-errors vs. \(\log _{10}N\) with \(h=\frac{1}{2},\frac{3}{2},\frac{5}{2},\frac{7}{2},\frac{9}{2}.\) They also show that the bigger the index h becomes, the faster the numerical errors decay, and the near straight lines indicate an algebraic convergence rate again.

Fig. 5

Errors of \(u(x)=(1-x^2)\sin (1+x)\)

Fig. 6

\(L^2\)-errors of \(u(x)=(1-x^2)(1+x)^h\)

5.4 Problem (48)

We examine the fourth-order Dirichlet boundary problem (48) with \(\lambda =1,\mu =2\) and consider the following two cases:
  • Smooth solution:  \(u(x)=(1-x^2)^2\sin (1+x).\) In Fig. 7, we list the discrete \(L^2\)- and \(L^\infty \)-errors. The two near straight lines indicate an exponential convergence rate.

  • Non-smooth solution:  \(u(x)=(1-x^2)^2(1+x)^h.\) In Fig. 8, we plot the discrete \(L^2\)-errors vs. \(\log _{10}N\) with \(h=\frac{1}{2},\frac{3}{2},\frac{5}{2},\frac{7}{2},\frac{9}{2}.\) They also show that the bigger the index h becomes, the faster the numerical errors decay, and the near straight lines indicate an algebraic convergence rate again.

Fig. 7

Errors of \(u(x)=(1-x^2)^2\sin (1+x)\)

Fig. 8

\(L^2\)-errors of \(u(x)=(1-x^2)^2(1+x)^h\)

5.5 Condition Numbers

We examine the issue on condition numbers for the resulting algebraic systems. Since we use the Sobolev-orthogonal generalized Jacobi polynomials \(\{\varphi _k(x)/\sqrt{\eta _k}\}^N_{k=2}\) and \(\{\psi _k(x)/\sqrt{\rho _k}\}^N_{k=0}\) as the basis functions for (20) and (29), respectively, the condition numbers of the total stiff matrices are equal to 1. While in the classical Jacobi spectral method, the basis functions for (20) and (29) are chosen as \(\{(1-x^2)P^{0,0}_n(x)\}^{N-2}_{n=0}\) and \(\{P^{0,0}_n(x)\}^{N}_{n=0},\) respectively. The total stiff matrices have off-diagonal entries. In Table 1 below, we list the condition numbers of the total stiff matrices of the classical Jacobi spectral method for (20) and (29). It can be observed that the condition numbers of the resulting systems increase asymptotically as \(\mathcal {O}(N^2)\) and \(\mathcal {O}(N^3)\) for (20) and (29), respectively.
Table 1

Condition numbers of the classical Jacobi spectral methods

N

8

16

32

64

128

Eq. (20)

6.073 5E+00

2.793 6E+01

1.255 8E+02

5.423 8E+02

2.279 0E+03

Eq. (29)

5.564 0E+01

3.435 6E+02

2.401 6E+03

1.793 4E+04

1.385 6E+05

Notes

Acknowledgements

The work is supported by the National Natural Science Foundation of China (Nos. 11571238, 11601332, 91130014, 11471312 and 91430216).

References

  1. 1.
    Ai, Q., Li, H., Wang, Z.: Diagonalized Legendre spectral methods using Sobolev orthogonal polynomials for elliptic boundary value problems. Appl. Numer. Math. 127, 196–210 (2018)MathSciNetCrossRefzbMATHGoogle Scholar
  2. 2.
    Askey, R.: Orthogonal Polynomials and Special Functions. Society for Industrial and Applied Mathematics, Philadelphia (1975)CrossRefzbMATHGoogle Scholar
  3. 3.
    Canuto, C., Hussaini, M.Y., Quarteroni, A., Zang, T.A.: Spectral Methods: Fundamentals in Single Domains. Springer, Berlin (2006)zbMATHGoogle Scholar
  4. 4.
    Guo, B.: Jacobi approximations in certain Hilbert spaces and their applications to singular differential equations. J. Math. Anal. Appl. 243, 373–408 (2000)MathSciNetCrossRefzbMATHGoogle Scholar
  5. 5.
    Guo, B.: Jacobi spectral approximation and its applications to differential equations on the half line. J. Comput. Math. 18, 95–112 (2000)MathSciNetzbMATHGoogle Scholar
  6. 6.
    Guo, B., Shen, J., Wang, L.: Optimal spectral-Galerkin methods using generalized Jacobi polynomials. J. Sci. Comput. 27, 305–322 (2006)MathSciNetCrossRefzbMATHGoogle Scholar
  7. 7.
    Guo, B., Shen, J., Wang, L.: Generalized Jacobi polynomials/functions and their applications. Appl. Numer. Math. 59, 1011–1028 (2009)MathSciNetCrossRefzbMATHGoogle Scholar
  8. 8.
    Guo, B., Wang, L.: Jacobi interpolation approximations and their applications to singular differential equations. Adv. Comput. Math. 14, 227–276 (2001)MathSciNetCrossRefzbMATHGoogle Scholar
  9. 9.
    Guo, B., Wang, L.: Jacobi approximations in non-uniformly Jacobi-weighted Sobolev spaces. J. Approx. Theory 128, 1–41 (2004)MathSciNetCrossRefzbMATHGoogle Scholar
  10. 10.
    Guo, B., Wang, Z., Wan, Z., Chu, D.: Second order Jacobi approximation with applications to fourth-order differential equations. Appl. Numer. Math. 55, 480–502 (2005)MathSciNetCrossRefzbMATHGoogle Scholar
  11. 11.
    Li, H., Xu, Y.: Spectral approximation on the unit ball. SIAM J. Numer. Anal. 52, 2647–2675 (2014)MathSciNetCrossRefzbMATHGoogle Scholar
  12. 12.
    Li, J., Wang, Z., Li, H.: Fully diagonalized Chebyshev spectral methods for second and fourth order elliptic boundary value problems. Int. J. Numer. Anal. Model. 15, 243–259 (2018)MathSciNetzbMATHGoogle Scholar
  13. 13.
    Liu, F., Li, H., Wang, Z.: Spectral methods using generalized Laguerre functions for second and fourth order problems. Numer. Algorithm 75, 1005–1040 (2017)MathSciNetCrossRefzbMATHGoogle Scholar
  14. 14.
    Liu, F., Wang, Z., Li, H.: A fully diagonalized spectral method using generalized Laguerre functions on the half line. Adv. Comput. Math. 43, 1227–1259 (2017)MathSciNetCrossRefzbMATHGoogle Scholar
  15. 15.
    Marcellan, F., Xu, Y.: On Sobolev orthogonal polynomials. Expos. Math. 33, 308–352 (2015)MathSciNetCrossRefzbMATHGoogle Scholar
  16. 16.
    Shen, J.: Efficient spectral-Galerkin method, I. Direct solvers for second and fourth order equations using Legendre polynomials. SIAM J. Sci. Comput. 15, 1489–1505 (1994)MathSciNetCrossRefzbMATHGoogle Scholar
  17. 17.
    Shen, J., Tang, T.: Spectral and High-Order Methods with Applications. Science Press, Beijing (2006)zbMATHGoogle Scholar
  18. 18.
    Shen, J., Tang, T., Wang, L.: Spectral Methods: Algorithms, Analysis and Applications. Springer, Berlin (2011)CrossRefzbMATHGoogle Scholar
  19. 19.
    Shen, J., Wang, L.: Fourierization of the Legendre–Galerkin method and a new space-time spectral method. Appl. Numer. Math. 57, 710–720 (2007)MathSciNetCrossRefzbMATHGoogle Scholar
  20. 20.
    Szegő, G.: Orthogonal Polynomials, 4th edn. American Mathematical Society, Colloquium Publications, vol. XXIII. American Mathematical Society, Providence (1975)Google Scholar

Copyright information

© Shanghai University 2019

Authors and Affiliations

  1. 1.University of Shanghai for Science and TechnologyShanghaiChina
  2. 2.State Key Laboratory of Computer Science/Laboratory of Parallel Computing, Institute of SoftwareChinese Academy of SciencesBeijingChina

Personalised recommendations