1 Introduction

Nonlinear systems of second-order boundary value problems appear as models for studying many physical systems in science and engineering. Many techniques have been proposed to solve such systems such as the sinc-collocation method [12, 14], homotopy perturbation-reproducing kernel method [24], variational iteration method [31], continuous genetic algorithm [2], method of [25], the local radial basis functions based differential quadrature collocation method [13], reproducing kernel method [1], hat basis functions [10], Euler polynomials approach [5], Chebyshev operational matrix method [32] and a new algorithm based on reproducing kernel Hilbert space [35]. Simultaneously, system of integral and integro-differential equations has been solved by discrete Adomian decomposition method [9], a spectral collocation method [29], Bernoulli Galerkin matrix method [28], Block-Pulse functions [41], fractional alternative Legendre functions [34], a Jacobi spectral method [44], Chebyshev spectral collocation method [23], Taylor expansion [11] and infinite point and Riemann-Stieltjes integral conditions [15].

We mainly consider the nonlinear second order system of two linear integro-differential equations of Fredholm type on the interval \(x\in (-1,1)\) given by

$$\begin{aligned}&\sum \limits ^{2}_{i=0} a\,_{i}(x) \,y_{1}^{(i)}(x)+\sum \limits ^{2}_{i=0} b\,_{i}(x) \,y_{2}^{(i)}(x)+R_{1}(x,y_{1},y_{2}) \nonumber \\&\qquad +\int ^{1} _{-1}\,K_{11}(x,t)\,y_{1}(t) dt + \int ^{1}_{-1}\,K_{12}(x,t)\,y_{2}(t) dt =f_{1}(x), \end{aligned}$$
(1.1)
$$\begin{aligned}&\sum \limits ^{2}_{i=0} c\,_{i}(x) \,y_{1}^{(i)}(x)+\sum \limits ^{2}_{i=0} d\,_{i}(x) \,y_{2}^{(i)}(x)+R_{2}(x,y_{1},y_{2}) \nonumber \\&\qquad + \int ^{1}_{-1}\,K_{21}(x,t)\,y_{1}(t) dt + \int ^{1} _{-1}\,K_{22}(x,t)\,y_{2}(t) dt = f_{2}(x), \end{aligned}$$
(1.2)

subject to the following boundary conditions

$$\begin{aligned} y_{j}^{(r)}(1)= & {} \theta 1_r, \nonumber \\ y_{j}^{(r)}(-1)= & {} \theta 2_r,\quad r=0,1, \quad \mathrm {and} \quad j=1,2. \end{aligned}$$
(1.3)

where \(a\,_{i}(x)\), \(b\,_{i}(x)\), \(c\,_{i}(x)\) and \(d\,_{i}(x)\) are continuous functions and the constants \(\theta 1_{r}\) and \(\theta 2_{r}\) are real. The kernel functions \(K_{ij}\) are Lipschitz continuous over \([-1,1]\times [-1,1]\) and the functions \(f_{j}(x)\) are given source terms. The functions \(R_i(x,y_1,y_2)\) are nonlinear in terms of \(y_1\) and \(y_2\), and we are mainly interested in functions \(R_i\) of the form

$$\begin{aligned} R_i(x,y_{1}, y_{2})=g_{i}(x)\, y^{(\omega )}_{j}(x)\, y^{(\nu )}_{j}(x) \,+ \, h_{i}(x)\,(y^{(\omega )}_{j}(x))^{\nu }, \end{aligned}$$

for positive integers \(\nu \) and \(\omega \).

In recent years, there is an increasing interest in application and development of the Chebyshev pseudo-spectral methods in many areas in science and engineering. The Chebyshev function theory and methods have been developed by the fundamental work of Daşcioǧlu for solving the linear Fredholm-Volterra integro-differential equations [3]. Daşcioǧlu and Yaslan studied high-order nonlinear ordinary differential equations in [4], El-Gamel presented a Chebyshev collocation method for the twelfth-order boundary-value problems [21], Heydari utilize a new class of nonlinear optimal control problems [27], Karunakar and Chakraverty used partial differential equations [30], Bai et al., applied three-dimensional Helmholtz-type equations [8], Secer and Bakir supported Ginzburg-Landau Equation [37], Bermejo and Sastre illustrated the nonlinear Lithium-ion battery equations [7], Saw and Kumar solved multi-term the fractional order initial value problem [36], Hassani et al., depicted fractional optimal control problems [26], Yiğit and Bayram showed third and fourth-order singular perturbation problems [42], Baccouch and Kaddeche offered Viscous Burgers equations in one and two space dimensions [6], Yousef et al., gave information about a class of Fredholm fractional integro-differential equations [43], Saw and Kumar dissolved space fractional advection dispersion equation [39], Wang et al. presented generalized fractional pantograph equations with variable coefficients [40], Ghimire et al. displayed elliptic partial differential equations [22], El-Gamel and Sameeh exhibited singular two-point boundary value problems [20], El-Gamel et al., two-point BVP in modelling Viscoelastic flows [19], El-Gamel exposed the Eigenvalues of Sturm-Liouville problems in [18], El-Gamel and Sameeh gave the solution of Troeschs problem [17], El-Gamel and Sameeh presented an efficient technique for finding the eigenvalues of fourth-order Sturm-Liouville problems [16] and Öztürk offered a solution for the system of Lane-Emden type equations [33].

The rest of the paper is organized as follows. Section 2 outlines essential formulations of Chebyshev polynomials that are necessary for our proposed method. In Sect. 3, Chebyshev-collocation method is introduced and developed to solve nonlinear systems of second order Fredholm integro-differential equations. Section 4 reports some numerical examples and the efficiency of the method is illustrated in comparison with the RKHS method. Finally, a conclusion of the study is presented in Sect. 5.

2 Preliminaries

The matrix representation of the approximate solutions to the system in Eqs. (1.1) and  (1.2) can be written as

$$\begin{aligned}{}[y_{j}(x)] \approx \mathbf{T} (x)\,\varvec{A}_{j}, \quad j=1,2, \end{aligned}$$
(2.1)

where the entries of the matrix \(\varvec{\mathrm {T}}\) and the column vectors \(\varvec{A}_j\) are given by

$$\begin{aligned} \mathbf{T} =\left[ \begin{array}{cccc} T_{0}(x_{0}) &{} T_{1}(x_{0})&{} \cdots &{}T_{N}(x_{0})\\ T_{0}(x_{1}) &{} T_{1}(x_{1})&{} \cdots &{}T_{N}(x_{1})\\ \vdots &{} \vdots &{} \vdots &{} \vdots \\ T_{0}(x_{N}) &{} T_{1}(x_{N})&{} \cdots &{}T_{N}(x_{N})\\ \end{array} \right] , \quad \text {and} \quad \varvec{A}_{j}=\left[ \frac{a_{j0}}{2},a_{j1},\ldots ,a_{jN}\right] ^{\tau }. \end{aligned}$$

where the superscript \(\tau \) denotes the matrix transpose. Here \(T_n(x) = \cos (n\arccos (x))\) is the Chebyshev polynomial of degree n, and

$$\begin{aligned} x_n = \cos (n \pi /N), \quad n = 0,1,\ldots ,N \end{aligned}$$
(2.2)

are the Chebyshev-Gauss-Lobatto collocation points. An approximation to the nth derivative of a solution \(y_j\) takes the form [38]

$$\begin{aligned}{}[y_j^{(n)}(x)]=2^{n}\,\mathbf{T} \,\mathbf{M} ^{n}\,\varvec{A}_j, \quad n\in {\mathbb {N}}. \end{aligned}$$
(2.3)

The entries of the matrix \(\mathbf {M}\) are given for the case odd and even number N by

$$\begin{aligned} \mathbf{M}&=\left[ \begin{array}{ccccccc} 0 &{} \frac{1}{2} &{} 0 &{} \frac{3}{2} &{} \cdots &{}0 &{} N /2 \\ 0 &{} 0 &{} 2 &{} 0 &{} \cdots &{}N -1 &{} 0 \\ 0 &{} 0 &{} 0 &{} 3 &{} \cdots &{} 0&{} N \\ \vdots &{} \vdots &{} \vdots &{} \vdots &{} \ddots &{} \vdots &{} \vdots \\ 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} \cdots &{} N \\ 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} \cdots &{} 0 \end{array} \right] , \quad N \quad \mathrm {odd} \\ \mathbf{M}&=\left[ \begin{array}{ccccccc} 0 &{} \frac{1}{2} &{} 0 &{} \frac{3}{2} &{} \cdots &{} \frac{N -1}{2} &{}0 \\ 0 &{} 0 &{} 2 &{} 0 &{} \cdots &{} 0&{} N \\ 0 &{} 0 &{} 0 &{} 3 &{} \cdots &{} N -1 &{} 0\\ \vdots &{} \vdots &{} \vdots &{} \vdots &{} \ddots &{} \vdots &{} \vdots \\ 0 &{} 0 &{} 0 &{} 0 &{} \cdots &{} 0 &{} N \\ 0 &{} 0 &{} 0 &{} 0 &{} \cdots &{} 0&{} 0 \end{array} \right] . \quad N \quad \mathrm {even} \end{aligned}$$

For fixed \(x = x_s\), the kernel \(K_{ij}(x,t)\) can be approximated in terms of a Chebyshev series in the variable t by

$$\begin{aligned} K_{ij}(x_{s},t)=\sum ^{N }_{c=0} \! '' k^{ij}_{c}(x_{s}) T_{c}(t), \end{aligned}$$

where the double prime in summation symbol demonstrates a sum with first and last terms divided by two. Together with the relation mentioned in (1.11.2), the Chebyshev coefficients \({k}^{ij}_{c}(x_{s})\) are given by

$$\begin{aligned} k^{ij}_{c}(x_{s})=\frac{2}{N} \sum ^{N }_{m=0}\! '' \,K_{ij}(x_{s},t_{m}) T_{c}(t_{m}), \end{aligned}$$

where

$$\begin{aligned}t_{m}= \cos \left( \frac{m\pi }{N}\right) . \end{aligned}$$

As a consequence, \(K_{ij}(x_{s},t)\) can be expressed in the matrix form as

$$\begin{aligned} K_{ij}(x_{s},t)=K_{ij}(x_{s}) T(t)^{\tau }, \end{aligned}$$
(2.4)

as, \(T(t)^{\tau }\) symbolizes the transpose of T(t). Concerning,

$$\begin{aligned} K_{ij}(x_{s})=\left[ \begin{array}{c} k_{ij}(x_{0}) \\ k_{ij}(x_{1}) \\ \vdots \\ k_{ij}(x_{N}) \end{array} \right] =\left[ \begin{array}{cccc} \frac{1}{2}k^{ij}_{0}(x_{0}) &{} k^{ij}_{1}(x_{0}) &{} \ldots &{} \frac{1}{2}k^{ij}_{N}(x_{0}) \\ \frac{1}{2}k^{ij}_{0}(x_{1})&{} k^{ij}_{1}(x_{1}) &{} \ldots &{} \frac{1}{2}k^{ij}_{N}(x_{1}) \\ \vdots &{} \vdots &{} \ldots &{} \vdots \\ \frac{1}{2}k^{ij}_{0}(x_{N}) &{} k^{ij}_{1}(x_{N}) &{} \ldots &{} \frac{1}{2}k^{ij}_{N}(x_{N}) \end{array} \right] . \end{aligned}$$

In a similar manner, substituting the relation (2.2), the integrals in Eqs. (1.1) and (1.2) takes the form

$$\begin{aligned} I_{i}(x_{s})=\int ^{1}_{-1}\sum ^{2}_{j=1} \,K_{ij}(x_{s},t)\,y_{j}(t) dt , \quad i=1,2. \end{aligned}$$
(2.5)

Besides, by using the relation [3]

$$\begin{aligned} \mathbf{Z} =\int ^{1}_{-1} T(t)^{T} T(t) dt=\left[ \int ^{1}_{-1} T_{n}(t)^{\tau } T_{m}(t) dt \right] =[z_{nm}],\quad n,m=0,1,2,\ldots ,N \end{aligned}$$

where

$$\begin{aligned} z_{nm}=\left\{ \begin{array}{ll} \frac{1}{1-(n+m)^{2}}+\frac{1}{1-(n-m)^{2}}, &{} \hbox { for even n+ m} \\ 0 . &{} \hbox { for odd n+ m } \\ \end{array} \right. \end{aligned}$$

The integral \(I_{i}(x_{s})\) in Eq. (2.5) then takes the form

$$\begin{aligned} I_{i}(x_{s})=\sum ^{2}_{j=1} \,K_{ij}(x_{s})\,\mathbf{Z} (x_{s}) \varvec{A}_{j} , \quad i=1,2. \end{aligned}$$

3 Method of solution

The present method mainly depends on estimating the values of Chebyshev coefficients by approximating the operators in Eqs.  (1.11.2) at the Chebyshev collocation points. This yields a nonlinear system of equations of the form

$$\begin{aligned}&\left( \sum \limits ^{2}_{i=0} 2^{i} A_{i}(x(s)) \mathbf{T} \mathbf{M} ^{i}-\mathbf{k} _{11} \mathbf{Z} \right) \mathbf{A} _{1}+ \left( \sum \limits ^{2}_{i=0} 2^{i} B\,_{i}(x(s)) \mathbf{T} \mathbf{M} ^{i} -\mathbf{k} _{12} \mathbf{Z} \right) \mathbf{A} _{2}+\mathbf{R} _{1}=f_{1}(x(s)), \nonumber \\&\quad \left( \sum \limits ^{2}_{i=0} 2^{i} C\,_{i}(x(s)) \mathbf{T} \mathbf{M} ^{i} -\mathbf{k} _{21} \mathbf{Z} \right) \mathbf{A} _{1}+ \left( \sum \limits ^{2}_{i=0} 2^{i} D\,_{i}(x(s)) \mathbf{T} \mathbf{M} ^{i} -\mathbf{k} _{22} \mathbf{Z} \right) \mathbf{A} _{2}+\mathbf{R} _{2}=f_{2}(x(s)),\nonumber \\ \end{aligned}$$
(3.1)

where

$$\begin{aligned} \mathbf{R} _{j}(y_{1},y_{2})=G_{i}(x(s))\,\mathbf{Y} _{j} ^{(n)}(x(s)) \mathbf{Y} _{j}^{(r)}(x(s))+ \,H_{i}(x(s))\,(\mathbf{Y} _{j}(x(s)) ^{(r)})^{\omega }, \end{aligned}$$

and

$$\begin{aligned} A_{i}(x(s))=\left[ \begin{array}{cccc} a\,_{i}(x(0)) &{} 0 &{}\cdots &{} 0 \\ 0 &{} a\,_{i}(x(1))&{}\cdots &{}0 \\ \vdots &{} \vdots &{} \ddots &{} \vdots \\ 0 &{} 0 &{} \cdots &{} a\,_{i}(x(N+1)) \end{array} \right] , \end{aligned}$$

similarly \( B_{i}(x(s))\), \( C_{i}(x(s))\) ,\(D_{i}(x(s)) \) , \(G_{i}(x(s))\) and \(H_{i}(x(s))\) .

$$\begin{aligned} \mathbf{Z} =\left[ \begin{array}{cccc} z_{00} &{} z_{10}&{} \cdots &{}z_{N0}\\ z_{01} &{} z_{11}&{} \cdots &{}z_{N1}\\ \vdots &{} \vdots &{} \vdots &{} \vdots \\ z_{0N} &{} z_{1N}&{} \cdots &{}z_{NN}\\ \end{array} \right] , \quad \mathbf{Y} _{j}^{(n)}=\left[ \begin{array}{c} y_{j}^{(n)}(x_{0}) \\ y_{j}^{(n)}(x_{1}) \\ \vdots \\ y_{j}^{(n)}(x_{N}) \end{array} \right] ,\end{aligned}$$

and

$$\begin{aligned} \mathbf{F} =\left[ \begin{array}{c} \mathbf{f} _{1}(x_{0}) \\ \vdots \\ \mathbf{f} _{1}(x_{N+1}) \\ \mathbf{f} _{2}(x_{0}) \\ \vdots \\ \mathbf{f} _{2}(x_{N+1}) \\ \end{array} \right] . \end{aligned}$$

With this in mind, we initially aim to find out the matrix form for Y and I in terms of Chebyshev coefficient matrix. Now, it is important to realize the following two lemma

Lemma 3.1

[4] The following relation holds

$$\begin{aligned} \begin{aligned} \left[ \begin{array}{c} y^{(\omega )}(x_{0})y^{(\nu )}(x_{0}) \\ y^{(\omega )}(x_{1})y^{(\nu )}(x_{1}) \\ \vdots \\ y^{(\omega )}(x_{N})y^{(\nu )}(x_{N}) \end{array}\right]&= \left[ \begin{array}{cccc} y^{(\omega )}(x_{0}) &{} 0 &{} \cdots &{} 0 \\ 0 &{} y^{(\omega )}(x_{1}) &{} \cdots &{} 0\\ \vdots &{} \vdots &{} \qquad &{} \vdots \\ 0 &{} 0 &{} \cdots &{}y^{(\omega )}(x_{N}) \\ \end{array} \right] \left[ \begin{array}{c} y^{(\nu )}(x_{0}) \\ y^{(\nu )}(x_{1}) \\ \vdots \\ y^{(\nu )}(x_{N}) \end{array} \right] \\&= \overline{\mathbf{Y }}^{(\omega )}\,\mathbf{Y} ^{(\nu )}\\&=2^{\omega +\nu }(\overline{\mathbf{T }}\, \overline{\mathbf{M }}^{\omega }\overline{\mathbf{A }})\,\mathbf{T} \,\mathbf{M} ^{\nu }{} \mathbf{A} . \end{aligned} \end{aligned}$$

where

$$\begin{aligned} \overline{\mathbf{T }}= \left[ \begin{array}{cccc} \mathbf{T} (x_{0}) &{}0 &{} \cdots &{} 0\\ 0&{}\mathbf{T} (x_{1}) &{} \cdots &{} 0\\ \vdots &{} \vdots &{} \qquad &{} \vdots \\ 0 &{} 0 &{} \cdots &{}\mathbf{T} (x_{N}) \\ \end{array} \right] ,\quad \overline{\mathbf{M }}= \left[ \begin{array}{cccc} \mathbf{M} &{} 0 &{} \cdots &{} 0 \\ 0 &{} \mathbf{M} &{} \cdots &{} 0\\ \vdots &{} \vdots &{} \qquad &{} \vdots \\ 0 &{} 0 &{} \cdots &{}\mathbf{M} \\ \end{array} \right] , \end{aligned}$$

and

$$\begin{aligned} \overline{\mathbf{A }}= \left[ \begin{array}{cccc} \mathbf{A} &{} 0 &{} \cdots &{} 0 \\ 0 &{} \mathbf{A} &{} \cdots &{} 0\\ \vdots &{} \vdots &{} \qquad &{} \vdots \\ 0 &{} 0 &{} \cdots &{}\mathbf{A} \\ \end{array} \right] . \end{aligned}$$

Proof

See [4]. \(\square \)

Lemma 3.2

[21] The following relation holds

$$\begin{aligned} \begin{aligned} \left[ \begin{array}{c} y^{\omega }(x_{0}) \\ y^{\omega }(x_{1}) \\ \vdots \\ y^{\omega }(x_{N}) \end{array}\right]&= \left[ \begin{array}{cccc} y^{\omega }(x_{0}) &{} 0 &{} \cdots &{} 0 \\ 0 &{} y^{\omega }(x_{1}) &{} \cdots &{} 0\\ \vdots &{} \vdots &{} \qquad &{} \vdots \\ 0 &{} 0 &{} \cdots &{}y^{\omega }(x_{N}) \\ \end{array} \right] \\&= \overline{\mathbf{Y }}^{\omega -1}\,\mathbf{Y} \\&=(\overline{\mathbf{T }}\, \overline{\mathbf{A }})^{\omega -1}\,\mathbf{T} {} \mathbf{A} . \end{aligned} \end{aligned}$$

Proof

See [21]. \(\square \)

Similarly,

$$\begin{aligned} (\mathbf{Y} ^{(\omega )})^{\nu }&=(\overline{\mathbf{Y }}^{(\omega )})^{\nu -1}\,\mathbf{Y} ^{(\omega )}\\&\quad = 2^{\omega \nu }(\overline{\mathbf{T }}\, \overline{\mathbf{M }}^{\omega }\overline{\mathbf{A }})^{\nu -1}\,\mathbf{T} \,\mathbf{M} ^{\omega }{} \mathbf{A} . \end{aligned}$$
(3.2)

Hence, we can reduplicate nonlinear system of Fredholm integro-differential of \(2(N+1)\) algebraic equations together with anonymous Chebyshev coefficients into the following compact essential relation

$$\begin{aligned} \mathbf{Q} \mathbf{A} =\mathbf{F} \end{aligned}$$
(3.3)
$$\begin{aligned} \left[ \mathbf{Q} \,;\, \mathbf{F} \right] = \left[ \begin{array}{cccc} \mathbf{Q} _{11}&{} \mathbf{Q} _{12}&{} ;&{}f_{1}(x) \\ \mathbf{Q} _{21}&{}\mathbf{Q} _{22}&{} ;&{}f_{2}(x)\\ \end{array}\right] \end{aligned}$$

In a similar manner, as for the fundamental matrix form of the boundary condition that is attached to Chebyshev coefficients matrix \( \mathbf{A} \) gain the posterior modest form

$$\begin{aligned} \mathbf{V} \mathbf{A} = \theta \end{aligned}$$
(3.4)

In conclusion, the last rows of \(\mathbf{Q} \) and \(\mathbf{F} \) is substituted by the four rows of \(\mathbf{V} \) and \(\theta \) respectively. The augmented matrix of this system is

$$\begin{aligned} \widetilde{\mathbf{Q }} \mathbf{A} =\widetilde{\mathbf{F }} \end{aligned}$$
(3.5)

In that case, solving a nonlinear system of \(2(N+1)\) equation leads to figure out not only the matrix \( \mathbf{A} \) of Chebyshev coefficients but also solution of system (1.11.2) under the the boundary conditions (1.3). We obtain the approximate solution by following the algorithm in [4] using Matlab.

Algorithm

  • Enter (N) with type integer.

  • Enter (tol) with type double.

  • Enter \( \mathbf{x} _{s}\) collocation points vector with dimension \(( N +1 )\).

  • Enter \(\mathbf{T} \) and \(\mathbf{M} \) arrays with dimension \((( N +1 )\times (N +1))\).

  • Enter \(\overline{\mathbf{T }}\) and \(\overline{\mathbf{M }}\) arrays with dimension \(((N +1)\times (N +1)^2)\) and \((( N +1 )^2\times ( N +1 )^2)\) respectively.

  • Enter \(\mathbf{F} \) vector with dimension \(2( N +1 )\).

  • Set initial approximation \(\mathbf{A} _{I}\) to satisfy the boundary conditions. Let \(\mathbf{A} _{old} = \mathbf{A} _{I} \) with \( 2( N +1 )\) dimension .

  • \(\widetilde{\mathbf{Q }} (\mathbf{A} _{old} ) \mathbf{A} _{new} = \widetilde{\mathbf{F }}\) is a linear algebraic \(2(N+1)\) equations system. Then solve this system to find \(\mathbf{A} _{new}\) .

  • If \(|\mathbf{A} _{old} - \mathbf{A} _{new}| < tol\) then \(\mathbf{A} _{new} = \mathbf{A} \), break. The program is ended.

  • Else then \(\mathbf{A} _{old}\longleftarrow \mathbf{A} _{new}.\)

4 Examples and comparison

Five test examples is constructed so as to clarify the accomplishment Chebyshev method in finding a solution for nonlinear system of ordinary differential equation. Each example comprises a particular characteristic problem with the analytical solution that is known in advance. The first and the second examples present nonlinear system of ODE and the results are compared with the reproducing kernel Hilbert space (RKHS) method [1]. In the third example, we solve a fourth order nonlinear system of integro differential fredholm of the second kind with different three cases. Example 4 and example 5 treat with singular linear and nonlinear system of ODE. We measure the performance of Chebyshev method by the maximum absolute error \(E_{Chebyshev}\) which is defined as

$$\begin{aligned} \Vert \mathbf{E} _{Chebyshev}\Vert =\left| y_{exact}(x)-y_{Chebyshev}(x)\right| , \end{aligned}$$

Example 1

[1] This is also a nonlinear system of ODE

$$\begin{aligned} y_{1}''+ 2 y'_{1}+\frac{y_{2}}{1+y_{2}^{2}} = f_{1}(x), \\ y_{2}''+ y'_{2} +\exp (x)y_{1}+xy_{2}^{2}=f_{2}(x) \quad 0<x\le 1, \\ f_{1}(x)=8x(x^{2}-1)+2+\frac{\cos (x(1-x))}{1+(\cos (x(1-x)))^{2}}, \\ f_{2}(x)=(1-2x)(2x-1)\cos (x(1-x))+(2x+1)\sin (x(1-x))\\ +x^{2}(x-1)^{2}\exp (x)+x (\cos (x(1-x)))^{2}, \end{aligned}$$

under the following boundary condition

$$\begin{aligned} \begin{aligned} y_{1}(0)&=0 \qquad y_{1}(1)=0 \\ y_{2}(0)&=1\qquad y_{2}(1)=1 \end{aligned} \end{aligned}$$

whose exact solution is

$$\begin{aligned} \begin{aligned} y_{1}&=x^{2}(x-1)^{2}, \\ y_{2}&= \cos ( x(1-x)). \end{aligned} \end{aligned}$$

Table 1 depicts comparison between maximum absolute errors of the proposed method at \(N=10\) and reproducing kernel Hilbert space method (RKHSM) at \(N=51\) for Example 1.

Table 1 The results of Example 1

Example 2

[1] This is also a nonlinear system of ODE

$$\begin{aligned}&y_{1}''+ 2 y'_{1}+\sinh (y_{1}-(2x^{3}-3x^{2}))-y_{2}^{2} = f_{1}(x), \\&y_{2}''+\frac{x^{3}}{x^{2}(1-x)^{2}+1} y'_{2} +\exp (-y_{2})+y_{1}^{3}=f_{2}(x) \quad 0<x\le 1, \\&f_{1}(x)=12x^{2}-4+\sinh (x)-(\ln (x^{2}(x-1)^{2}+1))^{2}, \\&f_{2}(x)=(2x^{3}-3x^{2}+x)^{3}-2\frac{6x^{4}-4x^{3}-5x^{2}+6x-1}{(x^{2}(x-1)^{2}+1)^{2}}\\&\quad +\frac{1}{x^{2}(x-1)^{2}+1}, \end{aligned}$$

under the following boundary condition

$$\begin{aligned} y_{1}(0)&=0 \qquad y_{1}(1)=0 \\ y_{2}(0)&=0\qquad y_{2}(1)=0 \end{aligned}$$

whose exact solution is

$$\begin{aligned} y_{1}&=2x^{3}-3x^{2}+x, \\ y_{2}&=\ln (x^{2}(x-1)^{2}+1). \\ \end{aligned}$$

Table 2 indicates comparison between maximum absolute errors of the proposed method at \(N=10\) and reproducing kernel Hilbert space method (RKHSM) at \(N=51\).

Table 2 The results of Example 2

Example 3

This is fourth order nonlinear system of integro differential fredholm of the second kind

$$\begin{aligned} y^{(4)}_{1}+y''_{2}y^{(4)}_{2}+y_{1}+A_{1}\int ^{1}_{0} \exp (x-t)y_{1}(t)dt+B_{1}\int ^{1}_{0}\exp ((x+2)t)y_{2}(t)dt=f_{1}(x),\nonumber \\ y^{(4)}_{2}+(y'''_{1})^{3}+y_{2}+A_{2}\int ^{1}_{0} \exp (xt)y_{1}(t)dt+B_{2}\int ^{1}_{0}\exp (x+t)y_{2}(t)dt=f_{2}(x), \quad 0<x\le 1\nonumber \\ \end{aligned}$$
(4.1)

under the following boundary condition

$$\begin{aligned} \begin{aligned} y_{1}(0)&=y'_{1}(0)= 1 \qquad y_{1}(1)=y'_{1}(1)=\exp (1) \\ y_{2}(0)&=-y'_{2}(0) =1 \qquad y_{2}(1)=-y'_{2}(0)=\exp (-1) \end{aligned} \end{aligned}$$

whose exact solution is

$$\begin{aligned} \begin{aligned} y_{1}&=\exp (x), \\ y_{2}&= \exp (-x) . \end{aligned} \end{aligned}$$

Case 1 : \(A_{1}=B_{1}=A_{2}=B_{2}=1\) then the system (4.1) will be fourth order nonlinear system of integro differential fredholm equations

$$\begin{aligned} f_{1}(x) =3\exp (x)+\exp (-2x)+\frac{\exp (x+1)-1}{x+1} \\ f_{2}(x) =\exp (3x)+2\exp (-x)+\exp (x)+\frac{ \exp (x+1)-1}{x+1} \end{aligned}$$

Table 3 demonstrates maximum absolute errors of fourth order nonlinear system of integro differential fredholm equations with various values of \(N=6,8,9,10\). The maximum absolute errors in solutions of our aforementioned method are considerable declined along with the increasing of N.

Table 3 The results of Case 1 in Example 3

Case 2: \(A_{1}=B_{1}=A_{2}=B_{2}=0\) then the system (4.1) will be For systems of nonlinear differential equations

$$\begin{aligned} f_{1}(x) =2\exp (x)+\exp (-2x) \\ f_{2}(x) = \exp (3x)+2\exp (-x) \end{aligned}$$

Table 4 shows maximum absolute errors of systems of nonlinear differential equations with various values of \(N=6,8,9,10\) so as to point out the superiority of our aforementioned method.

Table 4 The results of Case 2 in Example 3

Case 3: \(A_{1}=A_{2}=1\) and \(B_{1}=B_{2}=0\) then the system (4.1) will be nonlinear systems of Fredholm integro-differential equations

$$\begin{aligned}&y^{(4)}_{1}+y''_{2}y^{(4)}_{2}+y_{1}+\int ^{1}_{0} \exp (x-t)y_{1}(t)dt=f_{1}(x), \\&\quad y^{(4)}_{2}+(y'''_{1})^{3}+y_{2}+\int ^{1}_{0} \exp (xt)y_{1}(t)dt=f_{2}(x), \quad 0<x\le 1 \\&\quad f_{1}(x) =2\exp (x)+\exp (-2x)+\frac{\exp (x+1)-1}{x+1} \\&\quad f_{2}(x) =\exp (3x)+2\exp (-x)+\exp (x) \end{aligned}$$

Table 5 illustrate the maximum absolute errors of systems of nonlinear Fredholm integro-differential equations with various values of \(N=6,8,9,10\). The maximum absolute errors in solutions of our aforementioned method are considerable declined along with the increasing of N (Figs. 1, 2 and 3).

Table 5 The results of Case 3 in Example 3
Fig. 1
figure 1

The numerical results for chebyshev solution for Example 3 case 1 at \(N=6\)

Fig. 2
figure 2

The numerical results for chebyshev solution for Example 4 at \(N=10\)

Fig. 3
figure 3

The numerical results for chebyshev solution for Example 5 at \(N=10\)

Example 4

This is a singular nonlinear system of ODE

$$\begin{aligned} y_{1}''+\frac{1}{x} y_{1}'+\frac{1}{x^{2}}y_{1}+y_{2}^{2}\, y''_{2}+y_{2}=f_{1}(x), \end{aligned}$$
$$\begin{aligned} y_{2}''+\frac{1}{x} y_{2}'+\frac{1}{x^{2}}y_{2}+y_{1}=f_{2}(x) \quad 0<x\le 1, \end{aligned}$$

under the following boundary condition

$$\begin{aligned} \begin{aligned} y_{1}(0)&=0 \qquad y_{1}(1)=0 \\ y_{2}(0)&=0 \qquad y_{2}(1)=\exp (1) \end{aligned} \end{aligned}$$

whose exact solution is

$$\begin{aligned} y_{1}= & {} x^{2}(1-x), \\ y_{2}= & {} x^{3}\exp (x). \\ f_{1}(x)= & {} 5-10 x+x^{3} \exp (x)+x^{7}\exp (3x)(x^{2}+6x+6) \\ f_{2}(x)= & {} x^{2}(1-x)+x \exp (x)(x+4)+x \exp (x)(x^{2}+6x+6) \end{aligned}$$

Maximum absolute errors for Example 4 are tabulated in Table 6 together with different value of N.

Example 5

[33] This is a singular linear system of ODE

$$\begin{aligned} y_{1}''+\frac{3}{x} y_{1}'-4(y_{1}+y_{2})=0 , \\ y_{2}''+\frac{2}{x}y_{2}'+3(y_{1}+y_{2})=0 \quad 0<x\le 1, \end{aligned}$$

under the following boundary condition

$$\begin{aligned} \begin{aligned} y_{1}(0)&=1 \qquad y'_{1}(0)=0 \\ y_{2}(0)&=1 \qquad y'_{2}(0)=0 \end{aligned} \end{aligned}$$

whose exact solution is

$$\begin{aligned} \begin{aligned} y_{1}&=1+x^{2}, \\ y_{2}&= 1-x^{2}. \end{aligned} \end{aligned}$$

Table 7 gives an information about the maximum absolute errors for Example 5 in different value of N.

Table 6 The results of Example 4
Table 7 The results of Example 5

5 Conclusion

Nonlinear systems of Fredholm integro-differential equations appear in many important applications in science and engineering. Due to the complexity of such systems, the search for accurate and efficient methods is necessary. In this paper, we presented a simple-to-implement yet accurate method using the Chebyshev collocation scheme. In view of the aforementioned numerical results, the accuracy of this method is considerably manifest.

Although the method was shown to be successful in handling the class of problems considered in this paper, we believe the extension of this work to treat problems in two or more spatial variables is a challenge for future work. Besides, special treatment should be considered if singular kernels are present.