To solve the linear eighth-order boundary value problem (1) by the Galerkin method along with Legendre basis, u(x) is approximated as
$$\begin{aligned} u(x) &= \sum _{j=0}^{n}\alpha _{j} L_{j}(x), \end{aligned}$$
(8)
where \(\alpha _{j}'s\), \(j=0,1,2,\ldots ,n\) are the Legendre coefficients. To determine these coefficients \(\alpha _{j}\), orthogonalizing the residual with respect to the basis functions, i.e.
$$\begin{aligned} \langle u^{(8)}(x),L_{r}(x)\rangle +\sum _{i=0}^{7}\langle a_{i}(x)u^{(i)}(x),L_{r}(x)\rangle -\langle f(x), L_{r}(x)\rangle =0, \end{aligned}$$
(9)
where
$$\begin{aligned} \langle \phi , \psi \rangle &= \int _{-1}^{1}\phi (x) \psi (x) {\rm d}x. \end{aligned}$$
We approximate the integrals in Eq. (9) by integrating by parts such that all derivatives transfer from u to \(L_{r}\). For convenience, few of the inner products of Eq. (9) can be calculated, as
$$\begin{aligned} \langle a_{3}(x)u^{(3)}(x),L_{r}(x)\rangle &= -\int _{-1}^{1}u(x)\left[ a_{3}(x)L_{r}(x)\right] ^{(3)}{\rm d}x,\end{aligned}$$
(10)
$$\begin{aligned} \langle a_{2}(x)u^{(2)}(x),L_{r}(x)\rangle &= \int _{-1}^{1}u(x)\left[ a_{2}(x)L_{r}(x)\right] ^{(2)}{\rm d}x,\end{aligned}$$
(11)
$$\begin{aligned} \langle a_{1}(x)u'(x),L_{r}(x)\rangle &= -\int _{-1}^{1}u(x)\left[ a_{1}(x)L_{r}(x)\right] '{\rm d}x,\end{aligned}$$
(12)
$$\begin{aligned} \langle a_{0}(x)u(x),L_{r}(x)\rangle &= \int _{-1}^{1}a_{0}(x)u(x)L_{r}(x){\rm d}x,\end{aligned}$$
(13)
$$\begin{aligned} {\rm and} \ \langle f(x),L_{r}(x)\rangle\simeq & {} \sum _{k=0}^{m}\frac{2f(x_{k}) L_{r}(x_{k})}{\left[ (1-x_{k}^{2}) (L'_{m}(x_{k}))^{2}\right] }. \end{aligned}$$
(14)
Lemma 3.1
The following relations hold:
$$\begin{aligned} 1. \ \langle u^{(8)}(x),L_{r}(x)\rangle &= \sum _{k=4}^{7}(-1)^{k+1}\left[ u^{(k)}(x)L_{r}^{(7-k)}(x)\right] _{-1}^{1}\nonumber \\&\quad +\int _{-1}^{1}u(x)L_{r}^{(8)}(x){\rm d}x,\end{aligned}$$
(15)
$$\begin{aligned} 2. \ \langle a_{7}(x)u^{(7)}(x),L_{r}(x)\rangle &= \sum _{k=4}^{6}(-1)^{k}\left[ u^{(k)}(x)\{a_{7}(x)L_{r}(x)\}^{(6-k)}\right] _{-1}^{1} \nonumber \\&\quad-\int _{-1}^{1}u(x)\{a_{7}(x)L_{r}(x)\}^{(7)}{\rm d}x, \end{aligned}$$
(16)
$$\begin{aligned} 3. \ \langle a_{6}(x)u^{(6)}(x),L_{r}(x)\rangle &= \sum _{k=4}^{5}(-1)^{k+1}\left[ u^{(k)}(x)\{a_{6}(x)L_{r}(x)\}^{(5-k)}\right] _{-1}^{1} \nonumber \\&\quad+\int _{-1}^{1}u(x)\{a_{6}(x)L_{r}(x)\}^{(6)}{\rm d}x,\end{aligned}$$
(17)
$$\begin{aligned} 4.\ \langle a_{5}(x)u^{(5)}(x),L_{r}(x)\rangle &= \left[ u^{(4)}(x)a_{5}(x)L_{r}(x)\right] _{-1}^{1}\nonumber \\&\quad-\int _{-1}^{1}u(x)\{a_{5}(x)L_{r}(x)\}^{(5)}{\rm d}x,\end{aligned}$$
(18)
$$\begin{aligned} 5. \ \langle a_{4}(x)u^{(4)}(x),L_{r}(x)\rangle &= \int _{-1}^{1}u(x)\{a_{4}(x)L_{r}(x)\}^{(4)}{\rm d}x. \end{aligned}$$
(19)
Proof
-
1.
As
$$\begin{aligned} \langle u^{(8)}(x),L_{r}(x)\rangle &= \int _{-1}^{1}u^{(8)}(x)L_{r}(x){\rm d}x. \end{aligned}$$
Integrating the right hand terms of the above equation by parts leads to
$$\begin{aligned} \langle u^{(8)}(x),L_{r}(x)\rangle &= B_{T,8}+\sum _{k=4}^{7}(-1)^{k+1}\left[ u^{(k)}(x)L_{r}^{(7-k)}(x)\right] _{-1}^{1}\\&\quad+\int _{-1}^{1}u(x)L_{r}^{(8)}(x){\rm d}x, \end{aligned}$$
where the boundary term
$$\begin{aligned} B_{T,8} &= \sum _{k=0}^{3}(-1)^{k+1}\left[ u^{(k)}(x)L_{r}^{(7-k)}(x)\right] _{-1}^{1} \end{aligned}$$
is zero using the boundary conditions defined in Eq. (2) yielding the relation.
-
2.
The inner product of \(\{a_{7}(x)u^{(7)}(x)\}\) with \(L_{r}(x)\) is obtained, as
$$\begin{aligned} \langle a_{7}(x)u^{(7)}(x),L_{r}(x)\rangle &= B_{T,7}+\sum _{k=4}^{6}(-1)^{k}\left[ u^{(k)}(x)\{a_{7}(x)L_{r}(x)\}^{(6-k)}\right] _{-1}^{1}\\&\quad-\int _{-1}^{1}u(x)\{a_{7}(x)L_{r}(x)\}^{(7)}{\rm d}x, \end{aligned}$$
where the boundary term
$$\begin{aligned} B_{T,7} &= \sum _{k=0}^{3}(-1)^{k}\left[ u^{(k)}(x)\{a_{7}(x)L_{r}(x)\}^{(6-k)}\right] _{-1}^{1}=0 \end{aligned}$$
gives the relation. The other relations can be obtained similarly.
Theorem 3.1
If Eq. (8) is the assumed approximate solution of the boundary value problem (1)–(2), then the discrete system for determining the coefficients
\(\{\alpha _{j}\}_{j=0}^{n}\)
is given by
$$\begin{aligned}&\sum _{j=0}^{n}\left[ \sum _{k=4}^{7}(-1)^{k+1}\left[ L_{j}^{(k)}(x)L_{r}^{(7-k)}(x)\right] _{-1}^{1}\right. \nonumber \\&\qquad +\sum _{k=4}^{6}(-1)^{k}\left[ L_{j}^{(k)}(x)\{a_{7}(x)L_{r}(x)\}^{(6-k)}\right] _{-1}^{1}\nonumber \\&\qquad +\sum _{k=4}^{5}(-1)^{k+1}\left[ L_{j}^{(k)}(x)\{a_{6}(x)L_{r}(x)\}^{(5-k)}\right] _{-1}^{1}\nonumber \\&\qquad +\left[ L_{j}^{(4)}(x)a_{5}(x)L_{r}(x)\right] _{-1}^{1}\nonumber \\&\qquad +\left. \sum _{q=0}^{8}(-1)^{q}\int _{-1}^{1}L_{j}(x) \{a_{q}(x)L_{r}(x)\}^{(q)} {\rm d}x\right] \alpha _{j}\nonumber \\&\quad =\sum _{k=0}^{m}\frac{2f(x_{k}) L_{r}(x_{k})}{\left[ (1-x_{k}^{2}) (L'_{m}(x_{k}))^{2}\right] },\quad 0\le r\le n. \end{aligned}$$
(20)
It can be written, in matrix form, as
$$\begin{aligned} A X &= B, \end{aligned}$$
(21)
where
$$\begin{aligned} A=\left( \begin{array}{ccccccc} \mu _{0,0}+\nu _{0,0} &{} \mu _{1,0}+\nu _{1,0} &{} \mu _{2,0}+\nu _{2,0} &{} . &{} . &{} . &{} \mu _{n,0}+\nu _{n,0} \\ \mu _{0,1}+\nu _{0,1} &{} \mu _{1,1}+\nu _{1,1} &{} \mu _{2,1}+\nu _{2,1} &{} . &{} . &{} . &{} \mu _{n,1}+\nu _{n,1} \\ \mu _{0,2}+\nu _{0,2} &{} \mu _{1,2}+\nu _{1,2} &{} \mu _{2,2}+\nu _{2,2} &{} . &{} . &{} . &{} \mu _{n,2}+\nu _{n,2} \\ \cdot &{} \cdot &{} \cdot &{} \cdot &{} &{} &{} \cdot \\ \cdot &{} \cdot &{} \cdot &{} &{} \cdot &{} &{} \cdot \\ \cdot &{} \cdot &{} \cdot &{} &{} &{} \cdot &{} \cdot \\ \mu _{0,n}+\nu _{0,n} &{} \mu _{1,n}+\nu _{1,n} &{} \mu _{2,n}+\nu _{2,n} &{} \cdot &{} \cdot &{} \cdot &{} \mu _{n,n}+\nu _{n,n} \\ \end{array} \right) \end{aligned}$$
and
$$\begin{aligned} \mu _{j,r} &= \sum _{q=0}^{8}(-1)^{q}\int _{-1}^{1}L_{j}(x) \{a_{q}(x)L_{r}(x)\}^{(q)} {\rm d}x,\quad a_{8}(x)=1, \end{aligned}$$
$$\begin{aligned} \nu _{j,r} &= \left[ \sum _{k=4}^{7}(-1)^{k+1}L_{j}^{(k)}(x)L_{r}^{(7-k)}(x) \right. \\&\quad +\sum _{k=4}^{6}(-1)^{k}L_{j}^{(k)}(x)\{a_{7}(x)L_{r}(x)\}^{(6-k)} \\&\quad + \sum _{k=4}^{5}(-1)^{k+1}L_{j}^{(k)}(x)\{a_{6}(x)L_{r}(x)\}^{(5-k)}\\ &\quad \left. +L_{j}^{(4)}(x)a_{5}(x)L_{r}(x)\right] _{-1}^{1}. \end{aligned}$$
The term
\(\mu _{j,r}\)
can be calculated using the results given in Preliminaries, while the boundary term
\(\nu _{j,r}\)
can be calculated as
$$\begin{aligned} \left[ L_{j}^{(4)}(x)a_{5}(x)L_{r}(x)\right] _{-1}^{1}=\frac{1}{384}\left\{ 1-(-1)^{n+r+j}\right\} \prod _{i=0}^{7}(j-i+4), \end{aligned}$$
$$\begin{aligned} & \sum _{k=4}^{5}(-1)^{k+1}\left[ L_{j}^{(k)}(x)\{a_{6}(x)L_{r}(x)\}^{(5-k)}\right] _{-1}^{1} = \frac{1}{3840}\left\{ 1-(-1)^{n+r+j-1}\right\} \prod _{i=0}^{9}(j-i+5)\\&\quad -\frac{1}{768}\left\{ 2n+r(r+1)\right\} \left\{ 1+(-1)^{n+r+j}\right\} \\&\quad \times \prod _{i=0}^{7}(j-i+4), \end{aligned}$$
$$\begin{aligned} & \sum _{k=4}^{6}(-1)^{k}\left[ L_{j}^{(k)}(x)\{a_{7}(x)L_{r}(x)\}^{(6-k)}\right] _{-1}^{1} = \frac{1}{46{,}080}\left\{ 1-(-1)^{n+r+j}\right\} \prod _{i=0}^{11}(j-i+6)\\&\quad -\frac{1}{7680}\left\{ 2n+r(r+1)\right\} \left\{ 1+(-1)^{n+r+j-1}\right\} \\&\quad \times \prod _{i=0}^{9}(j-i+5)+\frac{1}{3072}\left\{ 8n(n-1)+8nr(r+1)\right. \\&\quad \left. +(r+2)(r+1)(r)(r-1)\right\} \left\{ 1-(-1)^{n+r+j}\right\} \\&\quad \times \prod _{i=0}^{7}(j-i+4), \end{aligned}$$
$$\begin{aligned} & \sum _{k=4}^{7}(-1)^{k+1}\left[ L_{j}^{(k)}(x)L_{r}^{(7-k)}(x)\right] _{-1}^{1} = \frac{1}{645{,}120}\left\{ 1+(-1)^{r+j}\right\} \prod _{i=0}^{13}(j-i+7)\\&\quad -\frac{1}{92{,}160}(r(r+1))\left\{ 1-(-1)^{r+j-1}\right\} \prod _{i=0}^{11}(j-i+6)\\&\quad +\frac{1}{30{,}720}\left\{ 1-(-1)^{r+j-1}\right\} \prod _{i=0}^{3}(r-i+2)\prod _{i=0}^{9}(j-i+5)\\&\quad -\frac{1}{18{,}432}\left\{ 1-(-1)^{r+j-1}\right\} \prod _{i=0}^{5}(r-i+3)\prod _{i=0}^{7}(j-i+4). \end{aligned}$$
After solving the linear system (21) having
\((n+1)\)
equations with
\((n+1)\)
unknowns yield, the column vector
\(X=\left( \alpha _{0}, \alpha _{1}, \alpha _{2},\ldots , \alpha _{n}\right) ^{\rm T}\). Thus, u(x) can now be approximated by Eq. (8).