In this section, numerical results are presented for various types of Fredholm integral equations mentioned in the previous sections. The results show the validity and efficiency of the method. It is important to note that all numerical computations are performed using Matlab software. For solving a non-linear system of equations, the Matlab built-in functions use the Newton’s method with an initial guess or some modified versions of it. Since these methods are, in general, local, the initial guess plays a decisive role in obtaining solutions.
Example 1
(Linear Fredholm integral equation) Consider the following linear Fredholm integral equation of the first kind (Wazwaz 2011):
$$\begin{aligned} u(x)= e^{x+2}-2 \int _{0}^{1} e^{x+t}u(t)\,dt. \end{aligned}$$
The exact solution for the equation is that \(u(x)=e^x\).
Applying the presented method, the following system of equations are obtained:
$$\begin{aligned} u(c)& = e^{c+2}-2(e-1)e^cu(c), \nonumber \\ u(c)& = e^{c+2}(2-e^2)+2(e-1)^2(e+1)u(c)e^c. \end{aligned}$$
(25)
Solving this system of nonlinear equations results in
$$\begin{aligned} c = 0.620114506958278 \,\,\,\text{ and } \,\,\,u(c) =1.859140914229523. \end{aligned}$$
The approximate solution can be evaluated from
$$\begin{aligned} u_{ap}(x)=e^{x+2}-2(e-1)e^xu(c), \end{aligned}$$
which leads to the exact solution. The graph of the equations in (25) is given in Fig. 1.
Example 2
(Linear Fredholm integral equation) Consider the following linear Fredholm integral equation of the first kind (Mikaeilvand and Noeiaghdam 2014):
$$\begin{aligned} u(x)= x^3-2(3+\cos (1)-4\sin (1))(\cos (x)+\sin (x))+ \int _{0}^{1} [\sin (x+t)+\cos (x+t)]u(t)\,dt. \end{aligned}$$
The exact solution for the equation is that \(u(x)=x^3\).
Applying the presented method, the following system of equations are obtained:
$$\begin{aligned} u(c)& = c^3 + (\cos (c) + \sin (c))\left[ u(c)(1+\sin (1)-\cos (1))-2(\cos (1)-4\sin (1))\right] , \\ u(c)& = c^3 + (\cos (c) + \sin (c))\left[ (\cos (2)-1)(3-4\sin (1)+\cos (1))-2(3+\cos (1)-4\sin (1))\right. \\&\left. \quad -\,\frac{1}{2}u(c)(1+\sin (1)-\cos (1))(cos(2)-3)\right] . \end{aligned}$$
Solving this system of nonlinear equations with the initial guess \([0.5,\,0.5]\) results in
$$\begin{aligned} c = 0.6448066930020793 \,\,\,\text{ and } \,\,\,u(c) =0.2680949356676439. \end{aligned}$$
The approximate solution becomes
$$\begin{aligned} u_{ap}(x)=x^3-1.6653\times 10^{-16}(\sin (x)+cos(x)). \end{aligned}$$
Example 3
(Nonlinear Fredholm integral equation) Consider the following nonlinear Fredholm integral equation of the second kind (Wazwaz 2011):
$$\begin{aligned} u(x)= \frac{5}{6}x+ \int _{0}^{1} xt^2u^3(t)\,dt, \quad x,t \in [0,\,1]. \end{aligned}$$
Three exact solutions for the equation are
$$\begin{aligned} u(x)=x,\, \frac{\left( \sqrt{21}-1\right) x}{2},\, \text{ and } -\frac{\left( \sqrt{21}+1\right) x}{2}. \end{aligned}$$
(26)
Applying the presented method, the following system of equations are obtained:
$$\begin{aligned} u(c)& = c\left( \frac{5+2u^3(c)}{6}\right) , \nonumber \\ u(c)& = c\left( \frac{5}{6}+\frac{1}{6}\left( \frac{5+2u^3(c)}{6}\right) ^3\right) . \end{aligned}$$
(27)
Solving this system of nonlinear equations yields
$$\begin{aligned} c& = 0.793700526076704 \,\,\,\text{ and } \,\,\,u(c) = \,\,0.793700525984100,\nonumber \\ c& = 0.793700526076704 \,\,\,\text{ and } \,\,\,u(c) = \,\,1.421746106732151,\nonumber \\ c& = 0.793700526076704 \,\,\,\text{ and } \,\,\,u(c) =-2.215446632716251. \end{aligned}$$
(28)
The approximate solution can be calculated from
$$\begin{aligned} u_{ap}(x)=x\left( \frac{5+2u^3(c)}{6}\right) . \end{aligned}$$
It is important to point out that each pair of solutions given in (28) corresponds to one exact solution given in (30). The first pair leads to the exact solution \(u(x)=x\), the second pair leads to the exact solution \(u(x)=\frac{(\sqrt{21}-1)x}{2}\), and the last pair leads to the third exact solution \(u(x)=-\frac{(\sqrt{21}+1)x}{2}\).
The graph of the equations in (27) is given in Fig. 2.
Example 4
(Fredholm integro-differential equation) Consider the following Fredholm integro-differential equation (Rahman 2007):
$$\begin{aligned} u''(x)= e^x - x + \int _{0}^{1}xtu(t)\,dt, \quad u(0)=u'(0) =1, \quad x,t \in [0,\,1]. \end{aligned}$$
The exact solution for the equation is that \(u(x)=e^x\).
Applying the presented method, the following system of equations are obtained:
$$\begin{aligned} u(c)& = e^c+\left( \frac{u(c)-2}{12}\right) c^3, \nonumber \\ cu(c)& = 2c+\frac{cu(c)-2c}{30}. \end{aligned}$$
(29)
Solving this nonlinear system, one gets
$$\begin{aligned} c& = 0 \quad \text{ and } \quad u(c) =1,\nonumber \\ c& = \log (2) \quad \text{ and }\quad u(c) =2. \end{aligned}$$
(30)
The approximate solution can be calculated from
$$\begin{aligned} u_{ap}(x)=e^x+\left( \frac{u(c)-2}{12}\right) x^3. \end{aligned}$$
(31)
Substituting that \(u(c)=2\) into (31) results in
$$\begin{aligned} u_{ap}(x)=e^x, \end{aligned}$$
which is indeed the exact solution.
Example 5
(System of Fredholm integral equation) Consider the following nonlinear system of Fredholm integral equation (Babolian et al. 2004):
$$\begin{aligned} u_1(x)& = x-\frac{5}{18}+\int _{0}^{1}\frac{1}{3}\left( u_1(t) + u_2(t)\right) \, dt, \nonumber \\ u_2(x)& = x^2-\frac{2}{9}+\int _{0}^{1}\frac{1}{3}\left( u_1^2(t) + u_2(t)\right) \, dt. \end{aligned}$$
(32)
The exact solution for the equation is that \(u_1(x)=x\) and \(u_2(x)=x^2\).
Applying the presented method, the following system of equations are obtained:
$$\begin{aligned} u_1(x)& = x-\frac{5}{18}+\frac{1}{3}\left( u_1(c_1) + u_2(c_2)\right) , \nonumber \\ u_2(x)& = x^2-\frac{2}{9}+\frac{1}{3}\left( u_1^2(c_3) + u_2(c_4)\right) , \end{aligned}$$
(33)
where \(c_1, c_2, c_3,\) and \(c_4\in [0,1]\).
First substitute \(c_1\) and \(c_3\) into the first equation in (33), and \(c_2\) and \(c_4\) into the second equation in (33) to get
$$\begin{aligned} u_1(c_1)& = c_1-\frac{5}{18}+\frac{1}{3}\left( u_1(c_1) + u_2(c_2)\right) , \nonumber \\ u_1(c_3)& = c_3-\frac{5}{18}+\frac{1}{3}\left( u_1(c_1) + u_2(c_2)\right) , \nonumber \\ u_2(c_2)& = c_2^2-\frac{2}{9}+\frac{1}{3}\left( u_1^2(c_3) + u_2(c_4)\right) ,\nonumber \\ u_2(c_4)& = c_4^2-\frac{2}{9}+\frac{1}{3}\left( u_1^2(c_3) + u_2(c_4)\right) . \end{aligned}$$
(34)
Then plug (33) into (32) to get
$$\begin{aligned} u_1(x)& = x-\frac{5}{18}+\frac{1}{9}\left( u_1(c_1) + u_2(c_2)+u_1^2(c_3) + u_2(c_4)+1 \right) ,\nonumber \\ u_2(x)& = x^2-\frac{2}{9}+\frac{1}{3}\left( \frac{(u_1(c_1)+u_2(c_2))^2}{9}+\frac{4(u_1(c_1)+u_2(c_2))}{27}+\frac{u_1^2(c_3) + u_2(c_4)}{3}+\frac{79}{324}\right) . \end{aligned}$$
(35)
Now replace x with \(c_1\) and \(c_3\) in the first equation in (35) and \(c_2\) and \(c_4\) in the second equation in (35) so that there are 4 more equations. Combining (34) with these equations, one finally gets a nonlinear system of 8 equations with 8 unknowns. Solving this system and the result is as follows:
$$\begin{aligned} u_1(c_1)& = c_1= \frac{5}{6} \quad u_1(c_3) =c_3 = \frac{\sqrt{6}}{3}, \\ u_2(c_2)& = u_2(c_4) = c_2=c_4=0.\\ \end{aligned}$$
Substitute these values into (33), the exact solutions are obtained, namely,
$$\begin{aligned} u_1(x)=x \quad \text{ and }\quad u_2(x)=x^2. \end{aligned}$$
(36)
Example 6
(System of Fredholm integro-differential equation) Consider the following system of Fredholm integro-differential equation:
$$\begin{aligned} u'_1(x)& = 1-\frac{5}{6}x+\int _{0}^{1}x\left( u_1(t) + u_2(t)\right) \, dt,\quad u_1(0)=0, \nonumber \\ u'_2(x)& = 2x-\frac{1}{12}+\int _{0}^{1}t\left( u_1(t) - u_2(t)\right) \,dt,\quad u_2(0)=0. \end{aligned}$$
(37)
The exact solution for the equation is that \(u_1(x)=x\) and \(u_2(x)=x^2\).
Applying the presented method, the following system of equations are obtained:
$$\begin{aligned} u'_1(x)& = 1-\frac{5}{6}x+\left( u_1(c_1) + u_2(c_2)\right) x, \nonumber \\ u'_2(x)& = 2x-\frac{1}{12}+\frac{1}{2}\left( u_1(c_3) - u_2(c_4)\right) , \end{aligned}$$
(38)
where \(c_1, c_2, c_3,\) and \(c_4\in [0,1]\).
An application of the integral operator \(L^{-1}\) introduced in (8) to both sides of Eq. (38) along with initial conditions yields
$$\begin{aligned} u_1(x)& = x-\frac{5}{12}x^2+\frac{1}{2}x^2 \left( u_1(c_1) + u_2(c_2)\right) , \nonumber \\ u_2(x)& = x^2-\frac{1}{12}x+\frac{1}{2}\left( u_1(c_3) - u_2(c_4)\right) x. \end{aligned}$$
(39)
First substitute \(c_1\) and \(c_3\) into the first equation in (39), and \(c_2\) and \(c_4\) into the second equation in (39) to get
$$\begin{aligned} u_1(c_1)& = c_1-\frac{5}{12}c_1^2+\frac{1}{2}c_1^2\left( u_1(c_1) + u_2(c_2)\right) , \nonumber \\ u_1(c_3)& = c_3-\frac{5}{12}c_3^2+\frac{1}{2}c_3^2\left( u_1(c_1) + u_2(c_2)\right) , \nonumber \\ u_2(c_2)& = c_2^2-\frac{1}{12}c_2+\frac{1}{2}c_2\left( u_1(c_3) - u_2(c_4)\right) ,\nonumber \\ u_2(c_4)& = c_4^2-\frac{1}{12}c_4+\frac{1}{2}c_4\left( u_1(c_3) - u_2(c_4)\right) . \end{aligned}$$
(40)
Then plug (39) and (38) into (37) to get
$$\begin{aligned} (u_1(c_1)+u_2(c_2))x& = \frac{1}{72}\left( 12(u_1(c_1)+u_2(c_2))+ 18(u_1(c_3) - u_2(c_4))+47\right) x,\nonumber \\ u_1(c_3) - u_2(c_4)& = \frac{3}{16}( u_1(c_1) + u_2(c_2))+\frac{1}{96}. \end{aligned}$$
(41)
Now replace x with \(c_1, c_2\) and \(c_4\) in the first equation in (41) and taking the second equation in (41) as it is there will be 4 more equations. Combining (40) with these equations to get a nonlinear system of 8 equations with 8 unknowns. Solving this system and the result is as follows:
$$\begin{aligned} u_1(c_1)& = c_1= \frac{5}{6} \quad u_1(c_3) =c_3 = \frac{1}{6}, \\ u_2(c_2)& = u_2(c_4) = c_2=c_4=0.\\ \end{aligned}$$
Substitute these values into (39), the exact solutions are obtained, namely,
$$\begin{aligned} u_1(x)=x \quad \text{ and }\quad u_2(x)=x^2. \end{aligned}$$
(42)