Abstract
In this study, an accurate and efficient numerical method based on spectral collocation is presented to solve integral equations and integrodifferential equations of -th order. The method is developed using compact combinations of shifted Legendre polynomials as a spectral basis and shifted Legendre–Gauss–Lobatto nodes as collocation points to construct the appropriate algorithm that makes simple systems easy to solve. The technique treats both types of equations: linear and nonlinear equations. The study aims to provide the relevant spectral basis by the use of compact combinations, which allows us to take advantage of shifted Legendre polynomials and to reduce the dimension of the space of approximation. The reliability of the proposed algorithms is proven via different examples of several cases and the results are discussed to confirm the effectiveness of the spectral approach.
1. Introduction
In the last years, integral equations and integrodifferential equations received a lot of interest from researchers in many areas of science. Mathematicians and physicists have given importance to this kind of equations used in fundamental problems in biology, medicine [1], chemistry, electrostatics, fluid dynamics, physics [2], economics [3], engineering [4], mechanics [5], potential theory [6], and problems of gravitation [7].
Integral equations which consider an unknown function that appears under the sign of integration can be classified into two categories depending on the boundaries of integration (Fredholm and Volterra equations). When the equation also contains the derivative of the unknown function, we obtain an integrodifferential equation that has the same order of the order of derivation appearing in the equation.
These types of equations, generally difficult to solve directly by classical methods, were the main subjects of numerous numerical methods that aim to approximate the solution by a reliable algorithm [8]. For this reason, mathematicians are still developing numerical methods to solve both integral and integrodifferential equations [9]. Every method has its advantages and inconveniences, so scientists are always working to improve various methods, especially with the development of computer sciences [10].
When talking about numerical methods for integral and integrodifferential equations, many studies have been interested in them. Doha et al. [11] used shifted Jacobi polynomials in the spectral collocation method to solve integrodifferential equations and system of integrodifferential equations. In [12], the authors developed a collocation procedure using cubic B-splines for linear and nonlinear Fredholm and Volterra integral equations. Fathy et al. [13] presented a Legendre–Galerkin method for the linear Fredholm integrodifferential equations. Nemati in [14] used the shifted Legendre polynomials to approximate the solution of Volterra-Fredholm integral equations. Others such as Černá et al. [9] and Moghaddam et al. [15,16] used b-spline wavelets, Maleknejad et al. [17] used Haar wavelets, and Lakestani et al. [18] used multiwavelets to solve integral and integrodifferential equations numerically. Moghaddam et al. in [19] developed the fractional finite differences method, Biçer et al. [10] investigated Bernoulli polynomials, Doha et al. [20] used ultraspherical polynomials, Jalilian et al. [21] used the exponential spline method, Meng et al. [22] and El-Sayed et al. [23] used alternative (shifted) Legendre polynomials, Mandal et al. [24] used Bernstein polynomials, Machado et al. [25] reduced differential transform, Loh et al. [26] used the Laplace transform and resolvent kernel method, and Mokhtary et al. used spectral methods [27] to solve numerically integrodifferential equations.
Recently, spectral methods (including all its categories: Galerkin, collocation, and tau) gained a high level of interest to solve different kinds of equations, especially to solve integral equations and integrodifferential equations [28]. Due to their simple application, spectral methods provide interesting results compared to other methods. The idea is to develop the solution as a finite sum of special basis functions [29] (generally orthogonal polynomials or a combination of orthogonal polynomials) [30] to obtain the simplest system where the solution builds the coefficients of the approximation in the chosen basis [31]. Thanks to the generous properties of orthogonal polynomials (Legendre and Chebyshev, …), spectral methods have speed convergence, which means that with small data, we obtain a great rate of convergence and gain spectral accuracy [32]. The choice of basis functions takes a very important part in the application of spectral methods [33]. When choosing the suitable basis [34], the resulted systems would be simple with a special structure of matrices, easy to invert, which reduce the cost of the method and provide efficiency and accuracy.
Our motivation in this study is to elaborate a spectral approximation governing both integral and integrodifferential equations of linear and nonlinear cases. We apply the shifted Legendre–Gauss collocation method by the use of a certain combination of shifted Legendre polynomials as basis functions and the nodes of shifted Legendre–Gauss interpolation as collocation points. The initial condition of the problem is invested in the choice of the basis which leads in all cases to simple systems, which will be solved directly by Gauss elimination in the linear case and by using a Newton algorithm in the nonlinear case.
The study is divided into five sections. We present first the main properties of Legendre polynomials and shifted Legendre polynomials. Then, in Section 3, we start describing the proposed method by introducing the studied problem and characterizing the main steps of the method. Next, we study separately the linear and the nonlinear cases and we apply the Gauss quadrature in each case. In Section 4, several numerical examples are presented and discussed to confirm the reliability of the described method. Section 5 recaps all details as conclusion.
2. Preliminaries
We start by presenting basic facts of Legendre polynomials, followed by introducing important properties of shifted Legendre polynomials that helps in developing the proposed method.
2.1. Legendre Polynomials
We denote by the space of polynomials of degree less than or equal to and the Legendre polynomial.
The standard Legendre polynomials are orthogonal polynomials of degree defined on resulting from the following differential Legendre equation (for more details see [29–31]):
The first Legendre polynomials are given by
In particular, we have
They constitute a Hilbert basis of with the weight function with the following norm and inner product:
They also satisfy the relation of orthogonality relative to the weight in :
They satisfy the recurrence relations:and the Rodrigues formula
2.2. Shifted Legendre Polynomials
In order to generalize the use of these polynomials in any interval of the form , the shifted Legendre polynomials are introduced by implementing the change of variable ; in the special case, for . We denote the obtained polynomial by . Then, the shifted Legendre polynomials can be obtained using the following recurrence formula (for more details, see [22, 23]).and the first ones are as follows:
Note the special cases as follows:
These polynomials also satisfy the orthogonality condition with respect to the weight function on with the inner product:
3. Shifted Legendre Collocation Method
We are interested in using a shifted Legendre collocation method to solve the integrodifferential equation of -th order:joined to the following initial conditions:where denotes the -th derivative of , are the given functions in , is the known kernel which is continuous and square integrable function, is the given function of which can be linear or nonlinear (like: ), is a given constant, and is a known function.
The order of derivation denotes the order of the integrodifferential equation (12), when , we derive the case of integral equations.
We define aswhere are the shifted Legendre polynomials defined on .
We set , the subspace where the initial conditions (13) are verified
The spectral scheme to solve (12) is to find , such that for all ,where denotes the inner product in the space .
When applying a spectral method, one wonders about the choice of the appropriate basis such that the obtained system is the simplest possible. Therefore, we look to use compact combinations of orthogonal polynomials as basis functions to gain more efficiency. Many studies developed several types of combinations for different equations [32, 35–38]. The choice of orthogonal polynomials as basis functions allows us to benefit from their advantages: important properties, especially as a Hilbert basis for . On the other hand, the choice of compact combinations of orthogonal polynomials, allows us not only to take the advantage of these orthogonal polynomials but also to reduce the dimension of the space of approximation from to .
3.1. The Choice of Basis Functions
In this paper, we choose a spectral basis composed of shifted Legendre polynomials of the form
The coefficients are calculated, such that verifies the initial conditions (13), which means
So,
Taking into account the important properties of shifted Legendre polynomials resulting from those of Legendre polynomials (1)–(3), (5), and (6), the basis coefficients are obtained from the following system:
Remark 1. If for a certain , we move to homogeneous initial conditions by a suitable change of variable.
The determinant of this system is different from zero, and we note here the following special cases.(i)When , we obtain (ii)When , we obtain(iii)When , we obtain It is obvious that are linearly independent and , so we obtain and we denote our approximation as Then, (14) becomes for It can be written as We consider here two cases depending on the linearity of .(1)When is linear which means ,then (25) becomes, for all , Let us denote So that (26) is equivalent to the following linear system:(2)When is nonlinear of the form , then (25) becomes
We define as a vectorial function bywhere
The Jacobian matrix of is given bywhere
3.2. Gauss Quadrature
Let us denote the Legendre–Gauss–Lobatto nodes of by with their respective weights . While moving to , we can define the shifted Legendre–Gauss–Lobatto (SLGL) nodes with their respective weights by [31](i)When is linear, (26) becomes for all , It leads to matrix system (28) with To solve (28) in both cases, we proceed by a method of Gauss elimination.(ii)When is nonlinear, then (31) becomes for all , And the Jacobian matrix of is Here, Now, to solve (31)–(33) and (37)–(39), we use the following algorithm of Newton.(i)Initialisation: let be , an initial vector,(ii)Iteration: we solve(iii)Stop .
4. Numerical Examples
In this section, several examples are presented to be discussed in order to illustrate the effectiveness of the described method. To compare between the exact solution and the approximate solution , we define the absolute error bythe maximum absolute error bythe square error norm bywhere is the number of interval subdivisions and is the appropriate step, and the relative error by
To prove the exponential convergence of the method, the Log slope coefficient according to relative error is calculated using the following formula:where (respectively, ) denotes the relative error calculated for (resp. ) and .
Example 1. Consider the following nonlinear integral equation:The exact solution is .
Error values were calculated for different , and we obtain , for all in .
Example 2. Consider the following nonlinear integral equation:where . The exact solution is .
Example 3. Let us consider the following linear first-order Fredholm integrodifferential equation:with the initial condition . The exact solution is .
Example 4. Consider the following nonlinear first-order Fredholm integrodifferential equation of the formwith the initial condition . The exact solution is .
Example 5. Consider the following nonlinear first-order Fredholm integrodifferential equation of the formwith the initial condition . The exact solution is .
Example 6. Consider the following nonlinear second-order Fredholm integrodifferential equation of the formwith the initial condition . The exact solution is .
4.1. Results and Discussion
By applying the described method in this study, we get systems of linear and nonlinear equations that can be solved directly by Gauss elimination or by Newton’s algorithm, respectively. Several results are presented in tables and figures to confirm the accuracy of our method. All computations were carried out by MATLAB R2020a on an AMD Ryzen 5 5600X 6-Core Processor Desktop.
All results are obtained for and CPU time is given in seconds. For Newton’s method, is taken and the maximum number of iterations is 5.
Tables 1–3 expose different values of εmax, ε2, and εre, allowing us to compare, for each example, the exact solution and the approximate one established via the proposed method, and this is for different increasing values of confirming that the results are very accurate and precise for small values of . Also, they present the coefficient that confirms the exponential convergence of the solution according to the relative error.
Tables 4 and 5 present the values of the exact solution and the approximation for different nodes on , and the absolute error is also calculated for each node.
Figure 1 presents the curve of the absolute error when . The figure is homogeneous with the results obtained in Table 1. Figure 2 shows the curve of the maximum absolute error calculated for different , while Figure 3 compares different values of absolute error calculated for different nodes on when . The error is of order for . The results confirm the reliability of the method specially when taking high values of .



5. Conclusion
In this study, the shifted Legendre spectral method is used to find approximate solutions for both linear and nonlinear integral equations and Fredholm integrodifferential equations of -th order with the initial condition. Through important properties of shifted Legendre polynomials, we build a new algorithm simple to use and effective for accurate results, which has been proven through several examples. Error calculations (absolute error, maximum absolute error, square error norm, and relative error) confirm for each example the reliability of the method and the exponential convergence in terms of relative error. The use of compact combinations of orthogonal polynomials as basis functions of spectral decomposition leads to simple systems with simple matrices to invert. In addition, the collocation treatment by evaluating the obtained integrals from the inner product using Gauss quadrature on shifted Legendre–Gauss–Lobatto nodes with the respective weights enables us to get more precise calculations which reduce the cost of the method and makes it accessible and simple to use for many different kinds of equations.
Data Availability
No data were used to support this study.
Conflicts of Interest
The authors declare that they have no conflicts of interest.
Acknowledgments
Z. Laouar and N. Arar acknowledge support from Directorate General for Scientific Research and Technological Development (DGRSDT), Algeria.