1.
Introduction
Boundary value problems(BVPs) of differential equations originate from many scientific fields such as applied mathematics, physics, chemistry, biology, medical science, economics, engineering science, etc. [1,2,3,4]. BVPs have always been the frontier of scientific research due to its important applications and scientific implications. It is difficult to obtain analytic solutions of these equations, which promotes the research of approximate methods to get numerical solutions. For instance, the authors in [5] develop a numerical method for second-order three-point BVPs by using the idea of piecewise approximation. A computational approach for multi-point BVPs is discussed based on the least squares approximation method and the Lagrange-multiplier method in [6]. The authors in [7] investigate the collocation method with linear/linear rational splines for the numerical solution of two-point boundary value problems. Numerical approaches based on B-spline method [8,9,10,11] and reproducing kernel techniques [12,13,14] are proposed respectively for solving singular linear and nonlinear equations. In [15] and [16], the authors applied Legendre polynomials to handle numerical solutions. Recently, multiscale algorithms with different multiscale orthogonal basis are introduced in [17,18].
Numerical methods for solving linear equations have been studied extensively. This paper is concerned with the the following BVPs:
where ai(x),i=1,⋯,n,g(x) are sufficiently smooth functions and Biy=αi,i=1,⋯,n are linear boundary conditions. In this work, we will give a new approach to Eq (1.1) based on compressed Legendre polynomials. The method can reduce computational cost and provide highly accurate approximate solutions. What's more, this method can avoid Runge phenomenon caused by high-order polynomial approximation. Without loss of generality, we will discuss a class of equations with boundary conditions as in Eq (1.2) to show our method conveniently. The whole analysis is also applicable to higher order equations or equations with more complex boundary conditions by proper modifications.
This paper is organized as follows. In section 2, we introduce an orthonormal basis generated from compressed Legendre polynomials. The numerical algorithm is established in section 3, and the convergence analysis is given in section 4. In section 5, we give some numerical examples to testify the effectiveness of our method.
2.
A new basis based on compressed Legendre polynomials
For convenience, we homogenize the boundary conditions in Eq (1.2) so to get Eq (2.1).
We define
W22[0,1]={u(x)|u′is absolutely continuous on [0,1], u″∈L2[0,1],u(0)=u(1)=0}.
It is a reproducing kernel space as introduced in [19].
The inner product in W22[0,1] is given by
As we all know that Legendre polynomials Ln(x) is an orthogonal basis in L2[−1,1]. Therefore,
is an orthonormal basis of L2[0,1].
By using Eq (2.2), we will construct an orthonormal basis of W22[0,1]. First, we compress Pn(x) to obtain a new basis in L2[0,1].
Lemma 2.1. Given k,p∈Z+, with 1≤k≤p, define
where p is the compression coefficient, then {φnk}∞pn=0,k=1 is an orthonormal basis of L2[0,1].
Proof. ∀φnk,φmj,n≠m,
i) k≠j, φnk,φmj are orthogonal according to the definition;
ii) k=j, ∫10φnkφmjdx=∫10φnkφmkdx=∫kpk−1ppPn(px−k+1)Pm(px−k+1)dx.
Let s=px−k+1,
φnk(x) maintain the orthogonality.
And
It follows that φnk(x) are orthonormal.
In addition,
∀u∈L2[0,1], if ∫10uφnkdx=0, that is
then u=0.
So, φnk(x) are orthonormal and complete. Therefore {φnk}∞pn=0,k=1 is an orthonormal basis of L2[0,1].
Next, we construct an orthonormal basis of W22[0,1].
Define J2φnk as
Note that J2φnk(0)=J2φnk(1)=0. We will prove that {J2φnk}∞pn=0,k=1 is a basis of W22[0,1].
Theorem 2.1. {J2φnk(x)}∞pn=0,k=1 is an orthonormal basis of W22[0,1].
Proof. J2φnk(x) are orthonormal. In fact,
∀u∈W22[0,1], if ∫10u″(J2φnk)″dx=0, then ∫10u″φnkdx=0, which implies that u″=0.
Because u′ is absolutely continuous on [0,1], we have u′=C, C is a constant.
Notice that u(0)=u(1)=0, so we have u=0 on [0,1] which shows the completeness.
Therefore, {J2φnk(x)} is an orthonormal basis of W22[0,1].
3.
Numerical method
In this section, we introduce a numerical algorithm for solving Eq (2.1).
Define a linear operator
by
Eq (2.1) can be transformed into the following operator form
It can be proved that the operator is bounded. Next, we demonstrate the implementation steps of our numerical algorithm for solving Eq (3.1). The theoretical background and the error analysis will be discussed in the upcoming section.
Definition 3.1. For any ε>0, u is called an ε-approximate solution if ‖Lu−f‖2L2[0,1]<ε.
Let F(c01,⋯⋯,cnp)=‖n∑j=0p∑k=1cjkLJ2φjk−f‖2L2[0,1], and (c∗01,⋯⋯,c∗np) is the minimum value point of F(c01,⋯⋯,cnp).
Theorem 3.1. For any ε>0, ∃N, when n>N, unp=n∑j=0p∑k=1c∗jkJ2φjk is an ε-approximate solution of Eq (3.1).
Proof. Assume that u is the exact solution of Eq (3.1), u=∞∑j=0p∑k=1ajkJ2φjk.
∀ε>0, ∃N, when n>N, we have wnp=n∑j=0p∑k=1ajkJ2φjk satisfies
Because
we get
According to Theorem 3.1, we obtain an ε-approximate solution unp of Eq (3.1) by using the new basis. The coefficient is the minimum value point of F. Now, we will prove the minimum value point of F is unique.
Take partial derivatives of the function F with respect to cml,m=0⋯n,l=1⋯p.
Let ∂F∂cml=0, then
Define a matrix D=(⟨LJ2φjk,LJ2φml⟩)(n+1)p×(n+1)p, and a vector b=(⟨LJ2φml,f⟩)T(n+1)p. Then (c∗01,⋯⋯c∗np) is the solution of Dc=b, where c=(c01,⋯⋯cnp)T.
Theorem 3.2. Suppose that L is invertible, then the solution of (3.2) is unique.
Proof. The homogeneous equation corresponding to (3.2) is
Let's multiply both sides of the above equations by cml,m=0⋯n,l=1⋯p, and add them all. We have
which is just ‖n∑j=0p∑k=1cjkLJ2φjk‖2L2[0,1]=0. Then n∑j=0p∑k=1cjkLJ2φjk=0.
L is invertible and {J2φnk(x)}∞pn=0,k=1 is an orthonormal basis, so
Hence, Eq (3.2) has a unique solution.
4.
Convergence and stability analysis
In this section, we will prove the convergence and stability of our method.
Let u(x)=∞∑j=0p∑k=1ajkJ2φjk is the exact solution of Eq (3.1), unp(x)=n∑j=0p∑k=1c∗jkJ2φjk is the ε-approximate solution as constructed in the previous section.
Theorem 4.1. unp(x) uniformly converges to u(x).
Proof. Theorem 3.1 implies that ‖Lunp−f‖2L2[0,1]→0. We obtain that
So,
Furthermore,
where Rx(t) is the reproducing kernel of W22[0,1].
Because Rx(t) is bounded on [0,1], we get
We now present the error analysis of our method.
Let
By (4.1), we get
By Theorem 3.1, it follows that
So,
In the above formula,
Since u″=∞∑j=0p∑k=1ajkφjk,w″np=n∑j=0p∑k=1ajkφjk, we get
Assume v(s,k)=u″(s+k−1p), vn(s,k)=w″np(s+k−1p), then
where bjk are the coefficients of the generalized Fourier expansion with respect to the basis {Pj(x)}∞j=1. So v(s,k)=∞∑j=0bjkPj(s),vn(s,k)=n∑j=0bjkPj(s).
Now Eq (4.3) becomes
According to [20], we can get
where C is a constant and m makes u(m+2)∈L2[0,1].
Since v(s,k)=u″(s+k−1p), ∂lsv(s,k)=1plu(l+2)(x).
Hence,
where C0 is a constant.
By (4.3) and (4.4), we have that
Plug it into (4.2), we conclude that
where M0 is a constant.
Inequality (4.5) gives the error bound of our new approach. We summarize our result in the following theorem.
Theorem 4.2. If u(m+2)∈L2[0,1] with m≥0, and n≥m−1, then there exists a positive constant M0 so that ‖unp−u‖W22[0,1]≤√M01nm1pm.
Theorem 4.2 indicates the convergence of our algorithm is influenced by both of n and p. The rate of convergence gets faster with the increasing of the two parameters.
In the end of this section, the stability of our algorithm is discussed by using the condition number of the matrix D.
Let {ψi}∞i=1={J2φ01,⋯,J2φ0p,⋯,J2φn1,⋯,J2φnp,⋯}, then D=(⟨LJ2φjk,LJ2φml⟩)M×M could be rewritten as D=(⟨Lψi,Lψj⟩)M×M, M=(n+1)p.
Lemma 4.1 ([17]) If u∈W22[0,1] with ‖u‖W22[0,1]=1, then ‖Lu‖L2[0,1]≥1‖L−1‖.
Theorem 4.3. The condition number of D satisfies Cond(D)2≤‖L‖2‖L−1‖2.
Proof. Assume x=(x1,⋯xM)T is a unit eigenvector belonging to λ, i.e., λx=Dx, ‖x‖=1.
We have
Multiplying Eq (4.6) by xi,i=1⋯M, and add all the equations.
On the other hand,
where u=M∑i=1xiψi.
From Lemma 4.1, λ≥1‖L−1‖2.
So
The stability is proved.
5.
Numerical examples
In this part, we will test four examples of BVPs which have been discussed by different algorithms in [17,21,22,23,24]. In the following examples, comparison of numerical results demonstrate the efficiency and stability of our method. The absolute error function is defined as E=|ynp(x)−y(x)|,0≤x≤1, where y(x) is the exact solution and ynp(x) is an ε-approximate solution.
Example 1. ([17,21]) Consider an equation with Robin boundary condition:
y=x2 is the exact solution of Eq (5.1). The numerical results using our method are compared with [17,21] in Table 1. It shows that our method converges rapidly with higher accuracy.
Example 2. Consider the following two-point BVP:
where f(x)={xcosx,0≤x<12,(−x/2+1)sinhx,12≤x≤1.. Since the exact solution of Eq (5.2) is not known, we discuss the absolute residual error function defined as R=|Lunp−f|. The results are listed in Table 2. It shows that the numerical error is rather smaller by our method.
Example 3. ([22,23] We consider the following sixth-order BVP:
y=(1−x)ex is the exact solution of Eq (5.3). The results are reported in the Table 3. The absolute error of our method is smaller than those obtained in [22] by homotopy perturbation method and in [23] by Legendre wavelet collocation method.
Example 4. ([24]) Consider the following nonlinear fourth-order BVP:
where f(x)=1+sin(1+sinh(x))−(ex−2)sinh(x). The exact solution of Eq (5.4) is y(x)=1+sinh(x). Firstly, Eq (5.4) is linearized by Newton iterative method [13]. Then, we use our method to solve the linear equation. The numerical results obtained after three iterations are given in Table 4. It is seen from Table 4 that we have got a better approximation to the exact solution of the nonlinear problem.
6.
Conclusions
In this paper, a new basis {J2φnk(x)}∞pn=0,k=1 of W22[0,1] is constructed from compressed Legendre polynomials. This basis is simple, efficient, and practical. Our method can avoid Runge phenomenon caused by high-order polynomial approximation. Using the concept of ε-approximate solution, we describe a method with the new basis to solve boundary value problems. The convergence and stability of our algorithm are proved. Our algorithm is tested by some numerical examples with different boundary conditions. The numerical results show that our method have higher accuracy for solving linear and nonlinear problems.
Acknowledgments
This work has been supported by characteristic innovation project of Guangdong Province (2019KTSCX217) and Big data research center of Zhuhai Campus, Beijing Institute of Technology (XJ-2018-05).
Conflict of interest
The authors declare that they have no competing interests.