Introduction

Nonlocal boundary value problems (NBVP) for nonlinear differential equations have attracted great research efforts worldwide, as they arise from the study of many important problems in various such as engineering, mechanics, mathematical physics, vehicular traffic theory, queuing theory, fluid flows, electrical networks, rheology, biology and chemical physics. In practical applications and also several real world problems, it is important to establish the conditions for the existence solutions. Hence, many authors have investigated the existence solutions for various functional differential equation NBVP, “such as Srivastava et al. studied a class of nonlinear boundary value problems for an arbitrary fractional-order with the nonlocal integral and infinite-point boundary conditions [29], El-Sayed et al. discussed many various types for functional differential equations see [14,15,16,17]. Also, El-Owaidy et al. studied on an integro-differential equation of arbitrary (fractional) orders [13]. Moreover, different igniters have been studied for the differential equations by several researchers [1,2,3,4,5,6,7,8,9,10,11, 19,20,21,22, 24,25,26, 30,31,32]”. In this paper we study the NBVP for the functional integro-differential equation:

$$\begin{aligned} u''(x)=f\biggl (x,u(x),\int _a^b g(x,t,u'(t) dt)\biggl ), \quad x\in [a,b], \end{aligned}$$
(1)

with

$$\begin{aligned} \sum _{k=1}^m a_k u(\tau _k)=u_0, \quad u'(a)=\zeta , \quad a_k\geqslant 0, \quad \tau _k \in [a, b]. \end{aligned}$$
(2)

The existence of solutions \( u \in C[a,b]\) will be studied. The continuous dependence of the unique solution on \( u_0\), \(\zeta \) and \(a_k\) will be proved.

As applications, the nonlocal problem of Eq. (1) with the integral condition

$$\begin{aligned} \int _a^b u(s) d\mu (s)= u_0, \end{aligned}$$
(3)

will be studied.

In this paper, we discuss the NBVP (1) with (2) and (3). Also, we find the analytical and numerical solutions for Eq. (1) using the modified decomposition method [33] and finite difference-Simpson’s method since we apply the Simpson’s rule on an integral part and finite difference method [12, 27, 28] on the derivative part and therefore the equation will be converted into a system of nonlinear algebraic equations which can be solved together to get the unknown function, we apply the proposed method to some problems. In addition, we present some figures that show the accuracy of the proposed method. The form of the proposed equation has not been studied analytically or numerically before, therefore what we have presented is a clear contribution to this point. Also, most researchers deal with the topic only analytically, with some examples being given, but these examples are not dealt with numerically or analytically.

This paper is organized as follows: In “Integral Representation” section, we discuss the integral representation of the problem. In “Existence of Solution” section, the existence of a solution will be discussed. In “Uniqueness of the Solution” section, the uniqueness of the solution will be discussed. In “Continuous Dependence” section, we study the continuous dependence on the problem. In “Derivation of the Analytical and Numerical Methods” section, the derivation of the analytical and numerical methods introduce. In “Application” section, some examples are presented and we made a comparison between the exact solution to demonstrate the applicability of the method. Finally, we give a conclusion section.

Integral Representation

Consider the NBVP (1)–(2) with the following assumption:

  1. 1.

    \(f : [a,b] \times {\mathbb {R}}^2 \rightarrow {\mathbb {R}}\) satisfies Carathéodory condition. There exist a function \(c_1\in L_1[a,b] \) and a constant \(d_1 > 0\), such that

    $$\begin{aligned} |f(s,\eta ,\phi ) |\le c_1(s)+d_1 |\eta |+d_1|\phi |. \end{aligned}$$
  2. 2.

    \(g : [a,b] \times [a,b] \times {\mathbb {R}} \rightarrow {\mathbb {R}}\) satisfies Carathéodory condition. There exist a function \(c_2: [a,b] \times [a,b] \rightarrow {\mathbb {R}},~~c_2\in L_1[a,b] \) and a constant \(d_2 > 0\), such that

    $$\begin{aligned} |g(s,t,\eta ) |\le c_2(s,t)+d_2 |\eta |. \end{aligned}$$
  3. 3.
    $$\begin{aligned} \sup _{x\in [a,b]} \int _a^x c_1 (s) ds \le M_1,\quad \sup _{x\in [a,b]} \int _a^x c_2 (\theta ,t) dt \le M_2. \end{aligned}$$
  4. 4.

    \((2 d_1b^2+d_1 d_2 b^2) < 1.\)

Lemma 1

Let \( B=\sum _{k=1}^m a_k\ne 0\), the solution of the NBVP (1)–(2), if it exist, then it can be represented by the integral equation

$$\begin{aligned} u(x)= B^{-1}\biggl [u_0- \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v(s) ds\biggl ]+ \int _ a ^x v(s) ds, \end{aligned}$$
(4)

where,

$$\begin{aligned} v(x)=\zeta +\int _a^x f\biggl (\theta , B^{-1}\biggl [ u_0- \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v(s) ds\biggl ]+\int _a^\theta v(s) ds, \int _ a ^b g(\theta , t, v(t)) dt\biggl )d\theta . \end{aligned}$$
(5)

Proof

Integrating both sides of (1), we get

$$\begin{aligned} u'(x)=\zeta +\int _a^x f\biggl (\theta ,u(\theta ), \int _ a ^b g(\theta , t, u'(t))dt\biggl )d\theta ,\quad x\in [a,b]. \end{aligned}$$
(6)

Let \(u'(x)=v(x)\) in (6), we obtain

$$\begin{aligned} v(x)= \zeta + \int _a^x f\biggl (\theta ,u(\theta ), \int _ a ^b g(\theta , t, v(t)) dt\biggl )d\theta ,\quad x\in [a,b], \end{aligned}$$
(7)

where

$$\begin{aligned} u(x)=u(a)+\int _a^x v(s) ds,\quad x\in [a,b], \end{aligned}$$
(8)

using the condition (2), we obtain

$$\begin{aligned} \sum _{k=1}^m a_k u(\tau _k) =u(a) \sum _{k=1}^m a_k +\sum _{k=1}^m a_k \int _ a ^{ \tau _k }v(s) ds, \end{aligned}$$
(9)

then,

$$\begin{aligned} u(a)=B^{-1}\biggl [u_0-\sum _{k=1}^m a_k \int _ a ^{ \tau _k }v(s) ds\biggl ], \end{aligned}$$
(10)

from (7), (8) and (10), we get

$$\begin{aligned} u(x)= B^{-1}\biggl [u_0- \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v(s) ds\biggl ]+ \int _ a ^x v(s) ds, \end{aligned}$$

where,

$$\begin{aligned} v(x)=\zeta +\int _a^x f\biggl (\theta , B^{-1}\biggl [ u_0- \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v(s) ds\biggl ]+\int _a^\theta v(s) ds, \int _ a ^b g(\theta , t, v(t)) dt\biggl )d\theta . \end{aligned}$$

\(\square \)

Existence of Solution

Theorem 2

Let the assumptions 1–4 be satisfied. Then the NBVP (1)–(2) has at least one solution \( u \in C[a,b]\).

Proof

Define the operator G associated with the integral equation (5) by

$$\begin{aligned} G v(x)=\zeta +\int _a^x f\biggl (\theta , B^{-1} \biggl [ u_0- \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v(s) ds\biggl ] +\int _a^\theta v(s) ds, \int _ a ^b g(\theta , t, v(t)) dt\biggl ) d\theta . \end{aligned}$$

Let \(Q_r = \lbrace v \in R : ||v||_C\le r \rbrace \), where \(r=\frac{|\zeta | +M_1 +d_1 b B^{-1} |u_0| +d_1 b M_2}{1-(2 d_1 b^2 +d_1 d_2 b^2)}\).

Then we have, for \(v \in Q_r\).

$$\begin{aligned} |G v(x)|= & {} \biggl |\zeta +\int _a^x f \biggl (\theta , B^{-1}\biggl [ u_0- \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v(s) ds\biggl ]+\int _a^\theta v(s) ds, \int _ a ^b g(\theta , t, v(t)) dt\biggl ) d\theta \biggl |\\\le & {} |\zeta |+\int _a^x \biggl | f\biggl (\theta , B^{-1} \biggl [ u_0- \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v(s) ds\biggl ] +\int _a^\theta v(s) ds, \int _ a ^b g(\theta , t, v(t)) dt\biggl ) \biggl | d\theta \\\le & {} |\zeta |+\int _a^x \biggl [c_1 (\theta )+d_1 B^{-1} \biggl |u_0 -\sum _{k=1}^m a_k \int _ a ^{ \tau _k }v(s) ds\biggl | +d_1 \int _a^\theta | v(s)| ds\\&+d_1 \int _ a ^b |g(\theta , t, v(t))| dt\biggl ] d\theta \\\le & {} | \zeta | +M_1 +\int _a^x\biggl [ d_1 B^{-1}| u_0| +d_1B^{-1}\sum _{k=1}^m a_k\int _a^{\tau _k} |v(s)| ds + d_1 \int _a^\theta |v(s)| ds\\&+ d_1 \int _ a ^b |c_2(\theta ,t)| dt+d_1 d_2 \int _ a ^b |v(t)| dt\biggl ]d\theta \\\le & {} |\zeta |+M_1 +\int _ a ^x[d_1 B^{-1}|u_0| +d_1 b ||v||+d_1 b||v|| +d_1 M_2 +d_1 d_2 b ||v||]d\theta \\\le & {} |\zeta |+ M_1 + d_1 b B^{-1}|u_0| +2 d_1 b^2 r +d_1 b M_2 +d_1 d_2 b^2 r=r. \end{aligned}$$

This is proves that \( G: Q_r\rightarrow Q_r\) and the class of functions \(\lbrace G v \rbrace \) is uniformly bounded in \( Q_r\).

Now, let \(x_1,x_2 \in [a,b]\) such that \( |x_2-x_1|< \delta \), then

$$\begin{aligned}&|G v(x_2)-G v(x_1)|\\&\quad = \biggl | \zeta +\int _a^{x_2} f \biggl (\theta , B^{-1}\biggl [ u_0- \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v(s) ds\biggl ]+\int _a^\theta v(s) ds, \int _ a ^b g(\theta , t, v(t)) dt\biggl ) d\theta \\&\qquad - \zeta -\int _a^{x_1} f\biggl (\theta , B^{-1} \biggl [ u_0- \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v(s) ds\biggl ] +\int _a^\theta v(s) ds, \int _ a ^b g(\theta , t, v(t)) dt\biggl )d \theta \biggl |\\&\quad = \biggl | \int _a^{x_1} f\biggl (\theta , B^{-1} \biggl [ u_0- \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v(s) ds\biggl ] +\int _a^\theta v(s) ds, \int _ a ^b g(\theta , t, v(t)) dt\biggl ) d\theta \\&\qquad +\int _{x_1}^{x_2} f\biggl (\theta , B^{-1} \biggl [ u_0- \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v(s) ds\biggl ] +\int _a^\theta v(s) ds, \int _ a ^b g(\theta , t, v(t)) dt\biggl ) d\theta \\&\qquad -\int _a^{x_1} f\biggl (\theta , B^{-1} \biggl [ u_0- \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v(s) ds\biggl ] +\int _a^\theta v(s) ds, \int _ a ^b g(\theta , t, v(t)) dt\biggl ) d\theta \biggl |\\&\quad \le \int _{x_1}^{x_2} \biggl | f\biggl (\theta , B^{-1} \biggl [ u_0- \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v(s) ds\biggl ] +\int _a^\theta v(s) ds, \int _ a ^b g(\theta , t, v(t)) dt\biggl ) \biggl |d\theta \\&\quad \le \int _{x_1}^{x_2} \biggl [ c_1(\theta )+ B^{-1}d_1|u_0| + B^{-1}d_1\sum _{k=1}^m a_k \int _ a ^{ \tau _k }|v(s)| ds +d_1\int _a^\theta |v(s)| ds\\&\qquad +d_1 \int _ a ^b |g(\theta , t, v(t))| dt\biggl ]d\theta \\&\quad \le \int _{x_1}^{x_2} \biggl [ c_1(\theta )+ B^{-1}d_1|u_0| + d_1\Vert v\Vert +d_1\Vert v\Vert +d_1 \int _ a ^b |c_2(\theta , t)+d_2 |v(t)| dt\biggl ]d\theta \\&\quad \le \int _{x_1}^{x_2}c_1(\theta )d\theta +(B^{-1} d_1 u_0 +2 d_1 b r +d_1 M _2+d_1 d_2 b r) \delta . \end{aligned}$$

This is proves that the class of functions \( \lbrace G v \rbrace \) is equi-continuous in \( Q_r\). \(\square \)

Let \(v_n \in Q_r\), \( v_n \rightarrow v (n\rightarrow \infty )\), then from the continuity of the two functions f and g, we get \( f (x,\eta _n, \phi _n)\rightarrow f (x,\eta , \phi )\) and \( g (x,\eta _n, \phi _n)\rightarrow g (x,\eta , \phi )\) as \(n \rightarrow \infty \).

Also,

$$\begin{aligned} \lim _{n \rightarrow \infty } G v_n (x)&=\lim _{n \rightarrow \infty }\biggl [\zeta +\int _a^x f(\theta , B^{-1} \biggl [ u_0-\sum _{k=1}^m a_k \int _ a ^{ \tau _k }v_n(s) ds\biggl ]\nonumber \\&\qquad \quad +\int _a^\theta v_n(s) ds, \int _ a ^b g (\theta , t, v_n(t)) dt) d\theta \biggl ]. \end{aligned}$$
(11)

Using assumptions 1-2 and Lebesgue dominated convergence Theorem [23], we obtain

$$\begin{aligned} \lim _{n \rightarrow \infty } G v_n (x)&= \zeta +\int _a^x \lim _{n \rightarrow \infty } f\nonumber \\&\quad \biggl (\theta , B^{-1}\biggl [ u_0- \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v_n(s) ds\biggl ]+\int _a^\theta v_n(s) ds, \int _ a ^b g(\theta , t, v_n(t)) dt\biggl ) d\theta = G v(x). \end{aligned}$$
(12)

Then \(G v_n \rightarrow G v\) as \( n \rightarrow \infty \). This mean that the operator G is continuous in \(Q_r\). Then by Schauder Theorem [18] there exist at least one solution \( v\in C[a,b]\) of the Eq. (5). Thus, based on the Lemma 1, the NBVP (1)–(2) possess a solution \(u \in C[a,b]\).

Nonlocal Integral Condition

Theorem 3

Let the assumption 1–4 be satisfied, then the NBVP (1), (3) has at least one solution given by

$$\begin{aligned} u(x)= \frac{1}{\mu (b)-\mu (a)} (u_0- \int _a^b \int _a^\theta v(s) ds d \mu (\theta )+ \int _ a ^x v(s) ds, \end{aligned}$$
(13)

where

$$\begin{aligned} v(x)= & {} \zeta +\int _a^x f\biggl (\theta ,\frac{1}{\mu (b)-\mu (a)} \biggl (u_0- \int _a^b \int _a^\theta v(s) ds d \mu (\theta )\nonumber \\&+\int _a^\theta v(s) ds\biggl ), \int _a ^b g(\theta ,t,v(t))dt\biggl ) d\theta . \end{aligned}$$
(14)

Proof

Let \(v \in C[a,b]\) be the solution of Eq. (5). Let \(a_k=\mu (x_k)-\mu (x_{k-1})\), \(\mu \) is increasing function, \( \tau _k \in (x_{k-1},x_k)\), \( a= x_0< x_1< x_2<x_3<\cdots < x_m =b\) then, as \(m \rightarrow \infty \) the condition (2) will be

$$\begin{aligned} \sum _{k=1}^m (\mu (x_k)-\mu (x_{k-1})) u(\tau _k) =u_0. \end{aligned}$$
(15)

And

$$\begin{aligned} \lim _{m\rightarrow \infty } \sum _{k=1}^m (\mu (x_k)-\mu (x_{k-1})) u(\tau _k)= \int _a^b u(s) d \mu (s)=u_0. \end{aligned}$$
(16)

As \(m\rightarrow \infty \), the solution of the NBVP (1)–(2) will be

$$\begin{aligned} u(x)= & {} \lim _{m\rightarrow \infty }\biggl [ \frac{1}{\sum _{k=1}^m a_k}[u_0- \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v(s) ds]+ \int _ a ^x v(s) ds\biggl ] \\= & {} \frac{1}{\mu (b)-\mu (a)}\biggl [u_0- \sum _{k=1}^m \int _ a ^{\tau _k }v(s) ds(\mu (x_k)-\mu (x_{k-1})\biggl ] +\int _ a ^x v(s) ds \\= & {} \frac{1}{\mu (b)-\mu (a)}\biggl [u_0- \int _ a ^b \int _ a ^{ \tau _k }v(s) dsd\mu (\theta )\biggl ]+\int _ a ^x v(s) ds, \end{aligned}$$

where

$$\begin{aligned} v(x)= & {} \zeta +\int _a^x f\biggl (\theta ,\frac{1}{\mu (b)-\mu (a)} \biggl (u_0- \int _a^b \int _a^\theta v(s) ds d \mu (\theta )\\&+\int _a^\theta v(s) ds\biggl ), \int _a ^b g(\theta ,t,v(t)) dt\biggl ) d\theta . \end{aligned}$$

\(\square \)

Uniqueness of the Solution

Let f and g satisfy the following assumptions

  1. (i)

    \(f: [a,b]\times {\mathbb {R}}^2 \rightarrow {\mathbb {R}}\) is measurable in x for any \(\eta ,\phi \in R \) and satisfies the Carathéodory condition

    $$\begin{aligned} |f(s,\eta ,\phi )-f(s,w,z)|\le d_1 |\eta -w|+d_1 |\phi -z|, \end{aligned}$$
  2. (ii)

    \(g: [a,b]\times [a,b] \times {\mathbb {R}} \rightarrow {\mathbb {R}}\) is measurable in x for any \(\eta ,\phi \in R \) and satisfies the Carathéodory condition

    $$\begin{aligned} |g(s,t,\eta )-g(s,t,\phi )|\le d_2 |\eta -\phi |. \end{aligned}$$

Theorem 4

Let the assumptions \((i){-}(ii)\) be satisfied, then the solution of the NBVP (1)–(2) is unique.

Proof

From assumption (i) we have f is measurable in x for any \(\eta \), \(\phi \in R\) and satisfies the Carathéodory condition, then it is continuous in \(\eta ,\phi \in R\) for all \(x \in [a,b]\), and

$$\begin{aligned} |f(\theta ,\eta ,\phi )|\le d_1 |\eta |+d_1|\phi |+|f(\theta ,0,0)|. \end{aligned}$$

Then the first condition is satisfied. Also by the same we can see that the second condition is satisfied by assumption (ii). Now, from Theorem 2 the solution of the Eq. (5) exists. Let vw be two solutions of the Eq. (5), then

$$\begin{aligned} |v(x)-w(x)|&\le \int _a^x\biggl | f\biggl (\theta ,B^{-1}\biggl [u_0-\sum _{k=1}^m a_k \int _a^{\tau _k} v(s) ds+ \int _a^{\theta } v(s) ds\biggl ],\int _a ^b g(s,t,v(t))dt\biggl )\\&\quad -f\biggl (\theta ,B^{-1}\biggl [u_0-\sum _{k=1}^m a_k \int _a^{\tau _k} w(s) ds\biggl ]+ \int _a^{\theta } w(s) ds, \int _a ^b g(s,t,w(t))dt\biggl )\biggl |d\theta \\&\le \int _a^x\biggl [d_1\biggl |B^{-1}\sum _{k=1}^m a_k \int _a^{\tau _k} ( w(s)-v(s)) ds \\&\quad + \int _a^ \theta (v(s)-w(s)) ds\biggl |+d_1 \biggl |\int _a^b (g(\theta ,t,v(t))-g(\theta ,t,w(t))) dt\biggl |\biggl ] d\theta \\&\le d_1 \int _a^x\biggl [B^{-1}\sum _{k=1}^m a_k \int _a^{\tau _k} |w(s)-v(s)|ds\\&\quad +\int _a^{\theta }|w(s)-v(s)|ds+\int _a^b |g(\theta ,t,v(t)) -g(\theta ,t,w(t)))| dt\biggl ] d\theta \\&\le d_1 ||w-v||b^2 + d_1 ||w-v||b^2 +d_1 \int _a^x \int _a^b d_2|v(t)-w(t)|dt d\theta \\&\le 2 d_1 ||w-v||b^2 + d_1 d_2 b^2 ||w-v|| \\&\le (2 d_1 b^2 +d_1 d_2 b^2) ||w-v||. \end{aligned}$$

Hence

$$\begin{aligned} {[}1-(2 d_1 b^2 +d_1 d_2 b^2)]||w-v||\le 0. \end{aligned}$$

Since \(2 d_1 b^2 +d_1 d_2 b^2 < 1\), then \( w(x)=v(x) \) and the solution of the Eq. (5) is unique. Thus, based on the Lemma 1, the NBVP (1)–(2) possess a unique solution \(u \in C[a,b]\). \(\square \)

Continuous Dependence

Continuous Dependence on \( u_0\)

Definition 5

The solution \( u\in C[a,b]\) of the NBVP (1)–(2) depends continuously on \(u_0\), if

$$\begin{aligned} \forall \epsilon >0,\quad \exists \quad \delta (\epsilon )\quad s.t \quad |u_0-u_0^*|< \delta \Rightarrow \Vert u-u^*\Vert < \epsilon , \end{aligned}$$

where \(u^*\) is the solution of the NBVP

$$\begin{aligned} {u^*}''(x)=f\biggl (x,u^{*}(x),\int _a^bg(x,t,{u^*}'(t) dt)\biggl ), \quad x\in [a, b], \end{aligned}$$
(17)

with the condition

$$\begin{aligned} \sum _{k=1}^{m} a_k u^{*}(\tau _k)=u_{0}^{*}, \quad {u^*}'(a)=\zeta , \quad a_k\geqslant 0, \quad \tau _k \in [a, b]. \end{aligned}$$
(18)

Theorem 6

Let the assumption of the Theorem 4 be satisfied, then the solution of the NBVP (1)–(2) depends continuously on \( u_0.\)

Proof

Let u, \(u^*\) be two solutions of the NBVP (1)–*(2) and (17)–(18) respectively. Then

$$\begin{aligned}&|v(x)-v^*(x)| \\&\quad = \biggl |\zeta + \int _a^x \biggl [f\biggl (\theta , B^{-1}\biggl [ u_0- \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v(s) ds\biggl ]+\int _a^\theta v(s) ds, \int _ a ^b g(\theta , t, v(t)) dt\biggl )\\&\qquad -\zeta - f\biggl (\theta , B^{-1}\biggl [ u_0^*- \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v^*(s) ds\biggl ]+\int _a^\theta v^*(s) ds, \int _ a ^b g(\theta , t, v^*(t)) dt\biggl )\biggl ] d\theta \biggl |\\&\quad \le \int _a^x\biggl | f\biggl (\theta , B^{-1}\biggl [ u_0- \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v(s) ds\biggl ]+\int _a^\theta v(s) ds, \int _ a ^b g(\theta , t, v(t)) dt\biggl )d\theta \\&\qquad - f\biggl (\theta , B^{-1}\left[ u_0^*- \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v^*(s) ds\right] +\int _a^\theta v^*(s) ds, \int _ a ^b g(\theta , t, v^*(t)) dt\biggl )\biggl |d\theta \\&\quad \le \int _a^x \biggl [ d_1 \biggl |B^{-1} (u_0-u_0^*)+B^{-1}\sum _{k=1}^m a_k\int _a^{\tau _k} (v^*(s)-v(s)) ds+\int _a^\theta (v(s)-v^*(s))ds \biggl |\\&\qquad +d_1\biggl |\int _a^b (g(\theta ,t,v(t))-g(\theta ,t,v^*(t))) dt\biggl |\biggl ] d\theta \\&\quad \le \int _a ^x \left[ d_1 B^{-1} |u_0-u_0^*|+ d_1 B^{-1}\sum _{k=1}^m a_k\int _a^{\tau _k}|v^*(s)-v(s)|ds+d_1 \int _a^\theta |v(s)-v^*(s)|ds\right. \\&\qquad \left. + d_1 \int _ a ^b |g(\theta ,t,v(t))-g(\theta , t, v^*(t)) |dt\right] d\theta \\&\quad \le \int _a ^x [d_1 B^{-1} |u_0-u_0^*|+ d_1 B^{-1}\sum _{k=1}^m a_k\int _a^{\tau _k}|v^*(s)-v(s)|ds+d_1 \int _a^\theta |v(s)-v^*(s)|ds\\&\qquad + d_1 d_2\int _ a ^b |v(t)- v^*(t)|dt]d\theta \\&\quad \le d_1 B^{-1} |u_0-u_0^*| b+d_1||v-v^*|| b^2 +d_1||v-v^*|| b^2\\&\qquad + d_1\int _a^x \int _a^b d_2 |v(t)-v^*(t)|dt d\theta \\&\quad \le d_1 bB^{-1} \delta + 2 d_1||v-v^*|| b^2 +d_1 d_2 b^2||v-v^*||. \end{aligned}$$

Hence

$$\begin{aligned} ||v-v^*||\le \frac{d_1 b B^{-1} \delta }{1-(2d_1 b^2+d_1 d_2 b^2)}. \end{aligned}$$

And

$$\begin{aligned} |u(x)-u^*(x)|= & {} |B^{-1}[u_0- \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v(s) ds]+ \int _ a ^x v(s) ds\\&-B^{-1}[u_{0}^{*}- \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v^*(s) ds] + \int _ a ^x v^*(s) ds|\\\le & {} B^{-1}|u_0-u_{0}^{*}|+2b \Vert v-v^*\Vert . \end{aligned}$$

Hence

$$\begin{aligned} \Vert u-u^*\Vert \le B^{-1}\delta +\frac{2d_1 b^2 B^{-1} \delta }{1-(2d_1 b^2+d_1 d_2 b^2)}=\epsilon . \end{aligned}$$

Therefor the solution of the NBVP (1)–(2) depends continuously on \(u_0\). \(\square \)

Continuous Dependence on \( \zeta \)

Definition 7

The solution \( u\in C[a,b]\) of the NBVP (1)–(2) depends continuously on \(\zeta \), if

$$\begin{aligned} \forall \epsilon >0,\quad \exists \quad \delta (\epsilon )\quad s.t \quad |\zeta -\zeta ^*|< \delta \Rightarrow \Vert u-u^*\Vert < \epsilon , \end{aligned}$$

where \( u^*\) is the solution of the NBVP

$$\begin{aligned} {u^*}''(x)=f\biggl (x,u^{*}(x),\int _a^bg(x,t,{u^*}'(t) dt)\biggl ), \quad x\in [a, b], \end{aligned}$$
(19)

with the condition

$$\begin{aligned} \sum _{k=1}^{m} a_k u^{*}(\tau _k)=u_{0}, \quad {u^*}'(a)=\zeta ^{*}, \quad a_k\geqslant 0, \quad \tau _k \in [a, b]. \end{aligned}$$
(20)

Theorem 8

Let the assumption of the Theorem 4 be satisfied, then the solution of the NBVP (1)–(2) depends continuously on \(\zeta \).

Proof

Let u, \(u^*\) be two solutions of the NBVP (1)–(2) and (19)–(20) respectively. Then

$$\begin{aligned}&|v(x)-v^*(x)| \\&\quad = \biggl |\zeta + \int _a^x \biggl [f\biggl (\theta , B^{-1}\biggl [ u_0- \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v(s) ds\biggl ]+\int _a^\theta v(s) ds, \int _ a ^b g(\theta , t, v(t))dt\biggl )\\&\qquad -\zeta ^{*}- f\biggl (\theta , B^{-1}\biggl [ u_0- \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v^*(s) ds\biggl ]+\int _a^\theta v^*(s) ds, \int _ a ^b g(\theta , t, v^*(t)) dt\biggl )\biggl ] d\theta \biggl |\\&\quad \le |\zeta -\zeta ^{*}|\\&\qquad +\int _a^x\biggl | f\biggl (\theta , B^{-1} \biggl [ u_0- \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v(s) ds\biggl ] +\int _a^\theta v(s) ds, \int _ a ^b g(\theta , t, v(t)) dt\biggl )d\theta \\&\qquad - f\biggl (\theta , B^{-1}\left[ u_0- \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v^*(s) ds\right] +\int _a^\theta v^*(s) ds, \int _ a ^b g(\theta , t, v^*(t)) dt\biggl )\biggl |d\theta \\&\quad \le |\zeta -\zeta ^{*}|+\int _a^x \biggl [ d_1 \biggl |B^{-1} \sum _{k=1}^m a_k\int _a^{\tau _k} (v^*(s)-v(s)) ds +\int _a^\theta (v(s)-v^*(s))ds \biggl |\\&\qquad +d_1\biggl |\int _a^b (g(\theta ,t,v(t)) -g(\theta ,t,v^*(t)))dt\biggl |\biggl ] d\theta \\&\quad \le |\zeta -\zeta ^{*}|+\int _a ^x \left[ d_1 B^{-1} \sum _{k=1}^m a_k\int _a^{\tau _k}|v^*(s)-v(s)|ds +d_1 \int _a^\theta |v(s)-v^*(s)|ds\right. \\&\qquad \left. + d_1 \int _ a ^b |g(\theta ,t,v(t)) -g(\theta , t, v^*(t)) |dt\right] d\theta \\&\quad \le |\zeta -\zeta ^{*}|+\int _a ^x \left[ d_1 B^{-1} \sum _{k=1}^m a_k\int _a^{\tau _k}|v^*(s)-v(s)|ds +d_1 \int _a^\theta |v(s)-v^*(s)|ds\right. \\&\qquad \left. + d_1 d_2\int _ a ^b |v(t)- v^*(t)|dt\right] d\theta \\&\quad \le |\zeta -\zeta ^{*}|+d_1||v-v^*|| b^2 +d_1||v-v^*|| b^2\\&\qquad + d_1\int _a^x \int _a^b d_2 |v(t)-v^*(t)|dt d\theta \\&\quad \le \delta + 2 d_1||v-v^*|| b^2 +d_1 d_2 b^2||v-v^*||. \end{aligned}$$

Hence

$$\begin{aligned} ||v-v^*||\le \frac{\delta }{1-(2d_1 b^2+d_1 d_2 b^2)}. \end{aligned}$$

And

$$\begin{aligned} |u(x)-u^*(x)|= & {} |B^{-1}\left[ u_0- \sum _{k=1}^m a_k \int _ a^{\tau _k}v(s) ds\right] + \int _ a ^x v(s) ds\\&-B^{-1}\left[ u_{0}- \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v^*(s) ds\right] +\int _ a ^x v^*(s) ds|\\\le & {} 2b \Vert v-v^*\Vert . \end{aligned}$$

Hence

$$\begin{aligned} \Vert u-u^*\Vert \le \frac{2b\delta }{1-(2d_1 b^2+d_1 d_2 b^2)}=\epsilon . \end{aligned}$$

Therefor the solution of the NBVP (1)–(2) depends continuously on \(\zeta \). \(\square \)

Definition 9

The solution \( u\in C[a,b]\) of the NBVP (1)–(2) depends continuously on \(u_0\) and \(\zeta \), if

$$\begin{aligned} \forall \epsilon >0,\quad \exists \quad \delta (\epsilon )\quad s.t \quad |u_0-u_0^*|<\delta _1 |\zeta -\zeta ^*|< \delta _2 \Rightarrow \Vert u-u^*\Vert < \epsilon , \end{aligned}$$

where \( u^*\) is the solution of the NBVP

$$\begin{aligned} {u^*}''(x)=f\biggl (x,u^{*}(x),\int _a^bg(x,t,{u^*}'(t) dt)\biggl ), \quad x\in [a, b], \end{aligned}$$
(21)

with the condition

$$\begin{aligned} \sum _{k=1}^{m} a_k u^{*}(\tau _k)=u_{0}^*, \quad {u^*}'(a)=\zeta ^{*}, \quad a_k\geqslant 0, \quad \tau _k \in [a, b]. \end{aligned}$$
(22)

Theorem 10

Let the assumption of the Theorem 4 be satisfied, then the solution of the NBVP (1)–(2) depends continuously on \(u_0\) and \(\zeta .\)

Proof

Let u, \(u^*\) be two solutions of the NBVP (1)–(2) and (21)–(22) respectively. Then

$$\begin{aligned}&|v(x)-v^*(x)| \\&\quad = \biggl |\zeta + \int _a^x \biggl [f\biggl (\theta , B^{-1}\biggl [ u_0- \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v(s) ds\biggl ]+\int _a^\theta v(s) ds, \int _ a ^b g(\theta , t, v(t)) dt\biggl )\\&\qquad -\zeta ^{*}- f\biggl (\theta , B^{-1}\biggl [ u_0^*- \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v^*(s) ds\biggl ]+\int _a^\theta v^*(s) ds, \int _ a ^b g(\theta , t, v^*(t)) dt\biggl )\biggl ] d\theta \biggl |\\&\quad \le |\zeta -\zeta ^{*}|\\&\qquad +\int _a^x\biggl | f\biggl (\theta , B^{-1}\biggl [ u_0- \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v(s) ds\biggl ]+\int _a^\theta v(s) ds, \int _ a ^b g(\theta , t, v(t)) dt\biggl )d\theta \\&\qquad - f\biggl (\theta , B^{-1}\left[ u_0^*- \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v^*(s) ds\right] +\int _a^\theta v^*(s) ds, \int _ a ^b g(\theta , t, v^*(t)) dt\biggl )\biggl |d\theta \\&\quad \le |\zeta -\zeta ^{*}|+d_1 B^{-1} |u_0-u_0^*| b\\&\qquad +\int _a^x \biggl [d_1 \biggl |B^{-1}\sum _{k=1}^m a_k \int _a^{\tau _k} (v^*(s)-v(s)) ds+\int _a^\theta (v(s)-v^*(s))ds \biggl |\\&\qquad +d_1\biggl |\int _a^b (g(\theta ,t,v(t))-g(\theta ,t,v^*(t)))dt\biggl |\biggl ] d\theta \\&\le |\zeta -\zeta ^{*}|+d_1 B^{-1} |u_0-u_0^*| b\\&\qquad +\int _a ^x \left[ d_1B^{-1}\sum _{k=1}^m a_k\int _a^{\tau _k}|v^*(s)-v(s)|ds+d_1 \int _a^\theta |v(s)-v^*(s)|ds\right. \\&\qquad \left. + d_1 \int _ a ^b |g(\theta ,t,v(t))-g(\theta , t, v^*(t)) |dt\right] d\theta \\&\quad \le |\zeta -\zeta ^{*}|+d_1 B^{-1} |u_0-u_0^*| b\\&\qquad +\int _a ^x \left[ d_1 B^{-1}\sum _{k=1}^m a_k \int _a^{\tau _k}|v^*(s)-v(s)|ds+d_1 \int _a^\theta |v(s)-v^*(s)|ds\right. \\&\qquad \left. + d_1 d_2\int _ a ^b |v(t)- v^*(t)|dt\right] d\theta \\&\le |\zeta -\zeta ^{*}|+d_1 B^{-1} |u_0-u_0^*| b+d_1||v-v^*|| b^2 +d_1||v-v^*|| b^2\\&\qquad + d_1\int _a^x \int _a^b d_2 |v(t)-v^*(t)|dt d\theta \\&\quad \le d_1 B^{-1} \delta _1 b+\delta _2 + 2 d_1||v-v^*|| b^2 +d_1 d_2 b^2||v-v^*||. \end{aligned}$$

Hence

$$\begin{aligned} ||v-v^*||\le \frac{d_1 B^{-1} \delta _1 b+\delta _2}{1-(2d_1 b^2+d_1d_2 b^2)}. \end{aligned}$$

And

$$\begin{aligned} |u(x)-u^*(x)|= & {} |B^{-1} \left[ u_0- \sum _{k=1}^m a_k \int _ a ^{ \tau _k}v(s) ds\right] + \int _ a ^x v(s) ds\\&-B^{-1}\left[ u_{0}^*- \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v^*(s) ds\right] +\int _ a ^x v^*(s) ds|\\&\le B^{-1}|u_0-u_{0}^{*}|+ 2b \Vert v-v^*\Vert . \end{aligned}$$

Hence

$$\begin{aligned} \Vert u-u^*\Vert \le B^{-1}\delta _1+\frac{2b(d_1 B^{-1} \delta _1 b+\delta _2)}{1-(2d_1 b^2+d_1 d_2 b^2)}=\epsilon . \end{aligned}$$

Therefor the solution of the NBVP (1)–(2) depends continuously on \(u_0\) and \(\zeta \). \(\square \)

Continuous Dependence on \( a_k\)

Definition 11

The solution \( u\in C[a,b]\) of the NBVP (1)–(2) depends continuously on \(a_k\), if

$$\begin{aligned} \forall \epsilon >0,\quad \exists \quad \delta (\epsilon )\quad s.t \quad |a_k-a_k^*|< \delta \Rightarrow \Vert u-u^*\Vert < \epsilon , \end{aligned}$$

where \( u^*\) is the solution of the NBVP

$$\begin{aligned} {u^*}''(x)=f\biggl (x,u^{*}(x),\int _a^bg(x,t,{u^*}'(t) dt)\biggl ), \quad x\in [a, b], \end{aligned}$$
(23)

with the condition

$$\begin{aligned} \sum _{k=1}^{m} a_{k}^{*} u^{*}(\tau _k)=u_{0}, \quad {u^*}'(a)=\zeta , \quad a_k\geqslant 0, \quad \tau _k \in [a, b]. \end{aligned}$$
(24)

Theorem 12

Let the assumption of the Theorem 4 be satisfied, then the solution of the NBVP (1)–(2) depends continuously on \(a_k.\)

Proof

Let \(B^* =\sum _{k=1}^m a^*_k\ne 0\) and \(v,v^*\) be two solutions of the NBVP (1)–(2) and (23)–(24) respectively. Then

$$\begin{aligned}&|v(x)-v^*(x)| \\&\quad \le \int _a^x \biggl |f\biggl (\theta , B^{-1} \biggl [u_0- \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v(s)ds\biggl ] +\int _a^\theta v(s) ds, \int _ a ^b g(\theta , t, v(t))dt\biggl )\\&\qquad - f\biggl (\theta , {B^*}^{-1}\biggl [ u_0- \sum _{k=1}^m a_k^* \int _ a ^{ \tau _k }v^*(s) ds\biggl ]+\int _a^\theta v^*(s) ds, \int _ a ^b g(\theta , t, v^*(t)) dt)\biggl | d\theta \\&\quad \le \int _a^x \left[ d_1 |B^{-1} (u_0) -{B^*}^{-1} (u_0)+{B^*}^{-1} \sum _{k=1}^m a_k^* \int _ a ^{ \tau _k }v^*(s) ds- B^{-1} \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v(s) ds\right. \\&\qquad \left. +\int _a^\theta v(s) ds-\int _a^\theta v^*(s) ds|+d_1|\int _ a ^b(g(\theta , t, v(t))-g(\theta , t, v^*(t)))dt\right] d\theta \\&\quad \le \int _a^x[d_1|B^{-1} (u_0)-{B^*}^{-1}(u_0)|+d_1 {B^*}^{-1} \sum _{k=1}^m a_k^* \int _ a ^{ \tau _k }|v^*(s)-v(s)|ds\\&\qquad + d_1 {B^*}^{-1}\left( \sum _{k=1}^m | a_k^*-a_k|\right) \int _ a ^{ \tau _k }|v(s)| ds+d_1 B^{-1} {B^*}^{-1} \sum _{k=1}^m | a_k-a_k^*| \sum _{k=1}^m a_k \int _ a ^{ \tau _k } |v (s)|ds\\&\qquad +d_1 \int _ a ^\theta |v(s) -v^*(s)|ds +d_1 \int _ a ^b|g(\theta , t, v(t))-g(\theta , t, v^*(t)))|dt]d\theta \\&\quad \le \int _a^x[d_1|B^{-1} (u_0)-{B^*}^{-1}(u_0)|+d_1 {B^*}^{-1} \sum _{k=1}^m a_k^* \int _ a ^{ \tau _k }|v^*(s)-v(s)|ds\\&\qquad + d_1 {B^*}^{-1}\left( \sum _{k=1}^m | a_k^*-a_k|\right) \int _ a ^{ \tau _k }|v(s)| ds+d_1 B^{-1} {B^*}^{-1} \sum _{k=1}^m | a_k-a_k^*| \sum _{k=1}^m a_k \int _ a ^{ \tau _k } |v (s)|ds\\&\qquad +d_1 \int _ a ^\theta |v(s) -v^*(s)|ds +d_1 d_2\int _ a ^b| v(t)- v^*(t)|dt]d\theta \\&\quad \le d_1 B^{-1} {B^*}^{-1} m\delta u_0 +d_1 ||v-v^*|| b^2 +d_1 {B^*}^{-1} m\delta ||v|| b^2+d_1 {B^*}^{-1} m\delta ||v|| b^2 \\&\qquad +d_1 ||v-v^*|| b^2 +d_1 d_2 b^2 ||v-v^*||\\&\quad \le d_1 B^{-1} {B^*}^{-1} m\delta u_0 +(2d_1 b^2+d_1 d_2 b^2)||v-v^*||+2 d_1{B^*} ^{-1} m \delta ||v|| b^2. \end{aligned}$$

Hence

$$\begin{aligned} ||v-v^*|| \le \frac{d_1 m \delta u_0 +2 d_1 B m \delta ||v|| b^2}{[1-(2 d_1 b^2+ d_1 d_2 b^2])B B^*}. \end{aligned}$$

And

$$\begin{aligned} |u(x)-u^*(x)|= & {} \left| \frac{1}{\sum _{k=1}^m a_k}\left[ u_0- \sum _{k=1}^m a_k \int _ a ^{ \tau _k }v(s) ds\right] + \int _ a ^x v(s) ds\right. \\&\left. -\frac{1}{\sum _{k=1}^m a_{k}^{*}}\left[ u_0- \sum _{k=1}^m a_{k}^{*} \int _ a ^{ \tau _k }v^*(s) ds\right] + \int _ a ^x v^*(s) ds\right| \\\le & {} \frac{m\delta |u_0|}{BB^*}+2mb\delta B^{-1}r+2b\Vert v-v^*\Vert . \end{aligned}$$

Hence

$$\begin{aligned} \Vert u-u^*\Vert \le \frac{m\delta |u_0|}{BB^*}+2mb\delta B^{-1}r +2b\frac{d_1 m \delta u_0 +2 d_1 B m \delta r b^2}{[1-(2 d_1 b^2 +d_1 d_2 b^2)]B B^*}=\epsilon . \end{aligned}$$

Therefor the solution of the NBVP (1)–(2) depends continuously on \(a_k\). \(\square \)

Derivation of the Analytical and Numerical Methods

In this section, we present the methods used to study the proposed equation

A Brief Review of the Modified Decomposition Method

In this section we use the modified decomposition method to get the exact solution for nonlocal Fredholm integro differential equation. Firstly, we use the nonlocal condition to put Eq. (1) in the form

$$\begin{aligned} u(x)=\rho (x)+ \lambda \int _{a}^{b} k(x,t)u'(t)dt, \end{aligned}$$
(25)

where \(\rho (x)\) is a known function, k(xt) is the kernel of the integro -differential equation, \(\lambda \) is any constant, u(x) is the unknown function to be determined.

This method depends mainly on splitting the function \(\rho (x)\) into two parts, therefore it cannot be used if the function \(\rho (x)\) consists of only one terms. Now, we can express the procedure as follows

  1. 1

    We substitute \(u(x)=\sum _{l=0}^\infty u_l (x)\) into both sides of Eq. (25).

  2. 2

    We set \(\rho (x)=\rho _1(x)+\rho _2(x)\).

  3. 3

    We use the following recurence relation

    $$\begin{aligned}&u_0(x)=\rho _1(x),\\&u_1(x)=\rho _2(x)+ \lambda \int _{a}^{b} k(x,t)u'_0(t) dt,\\&u_{l+1}(x)=\lambda \int _a^b k(x,t) u'_l(t) dt, \ \ \ l\ge 1. \end{aligned}$$

If we make a proper choise of the function \(\rho _1(x)\), \(\rho _2(x)\), we can obtain the exact solution u(x) by using few iterations, and sometimes by calculating only two components.

Derivation of Numerical Method

To obtain the numerical solution of Eq. (1), we divide the domain [ab] of Eq. (1) into N finite points as \(a = t_0< t_1< \cdots< t_{N-1}< t_N = b\). Using uniform step length \( h = (b-a)/N\) as \(x_i=a+i h\), \(i=0,1,2, \ldots , N\). Then we approximate the integral part of (1) by using the composite Simpson’s as follows

$$\begin{aligned} \int _a^b k(x,t) u' (t) dt&\simeq \frac{h}{3} [k(x,t_0) u' (t_0 )+ 4 k(x,t_1 ) u' (t_1 )+ 2 k(x,t_2 ) u' (t_2 ) + \cdots \\&\quad +2k(x,t_{N-2} ) u' (t_{N-2} ) +4k(x,t_{N-1} ) u' (t_{N-1} ) +\cdots + k(x,t_N ) u'({t_N }) ]. \end{aligned}$$

By taking \( u''_i = u'' (x_i),u'_i=u'(x_i), k(x_i,t_j )=k_{i,j}\), then (1) can be written as

$$\begin{aligned} u''_i-u_i\simeq & {} \rho _i+\frac{h}{3}[k_{i0} ( u'_0)+4 k_{i1} (u'_1)+2 k_{i2} ( u'_2)+\cdots +2k_{i N-2} ( u'_{N-2})\nonumber \\&+4k_{iN-1} (u'_{N-1})+\cdots +k_{i N} ( u'_N )]. \end{aligned}$$
(26)

And, we use centeral difference to approximate the derivative part of (26) as:

$$\begin{aligned}&u''_i \simeq \frac{u_{i+1}-2u_{i}+u_{i-1}}{h^2}, \\&u'_i \simeq \frac{u_{i+1}-u_{i-1}}{2 h}. \end{aligned}$$

Then Eq. (26) can be written as

$$\begin{aligned} \frac{u_{i+1}-2u_{i}+u_{i-1}}{h^2} -u_i&\simeq \rho _i +\frac{h}{3}\left[ k_{i0}\frac{u_1-u_{-1} }{2 h}+4k_{i1} \frac{u_2-u_0}{2 h} +2k_{i2} \frac{u_3-u_1}{2 h} \right. \nonumber \\&\quad + \cdots + 2k_{iN-2}\frac{u_{N-1}-u_{N-3}}{2 h} +4k_{iN-1} \frac{u_N-u_{N-2}}{2 h} \nonumber \\&\quad \left. +\cdots +k_{iN} \frac{u_{N+1}-u_{N-1}}{2h}\right] , \ \ \ \ \ i=0,1,2,3,\ldots N. \end{aligned}$$
(27)

From Eq. (27), we can generate a system of equations for \(u_{-1}, u_{0}, u_1, u_2,\ldots , u_N, u_{N+1}\) which can be represent in a matrix form

$$\begin{aligned}&M U=W \\&\small {M= \begin{pmatrix} 2- C_{00} &{} D &{}2+ C_{00}-B_{02}&{}A_{01}-A_{03}&{}B_{02}-B_{04} &{}\cdots &{} B_{0N-2}+C_{0N} &{}A_{0N-1}&{}C_{0N}\\ -C_{10} &{}2 -A_{11}&{}Z&{}I &{} B_{12}-B{14} &{}\cdots &{}B_{1N-2}+C_{1N}&{}A_{1N-1} &{} C_{1N} \\ -C_{21}&{}-A_{21}&{}2+C_{20}-B_{22}&{}Y &{}E&{}\cdots &{}B_{2N-2}+C_{2N} &{}A_{2N-1}&{}C_{2N}\\ \vdots &{} \vdots &{}\vdots &{} \vdots &{}\vdots &{} \vdots \\ - C_{N0} &{} -A_{N1} &{} C_{N0}-B_{N2}&{}A_{N1}-A_{N3}&{}B_{N2}-B_{N4} &{}\cdots &{} S &{}Q&{}2+C_{NN} \end{pmatrix},} \\&U= \begin{pmatrix} u_{-1}\\ u_0\\ u_1\\ \vdots \\ u_{N}\\ u_{N+1} \end{pmatrix}, \\&W= \begin{pmatrix} 2 h^2 \rho _0\\ 2 h^2 \rho _1\\ 2 h^2 \rho _2\\ \vdots \\ 2 h^2 \rho _N\\ 2 h^2 \rho _{N+1} \end{pmatrix}, \end{aligned}$$

where

\(A_{ij}=\frac{-4 h^2}{3} K_{ij},\quad B_{ij}=\frac{-2 h^2}{3} K_{ij}, \quad C_{ij}=\frac{- h^2}{3} K_{ij}, \quad Z=-4-2 h^2+C_{10}-B_{12},\quad Y=-4-2h^2+A_{21}-A_{23},\quad D=-4-2 h^2-A_{01}, \quad Q= -4-2h^2+A_{NN-1},\quad E=2+B_{22}-B_{24}, \quad I= 2+A_{11}-A_{13},\quad S=2+B_{NN-2}+C_{NN}\).

Error Estimation

Theorem 13

Suppose that \(\sigma _1\), \( \sigma _2 \), \( \sigma _3 \in [a,b]\) such that the errors \( e_1\) of Second order centeral, \( e_2\) of first order central difference, \(e_3\) of Simpson’s rule respectively are given by \( \frac{h^2}{12}u^{(4)} (\sigma _1 ) \), \(\frac{h^{2}}{6}u^{(3)} (\sigma _2 ) \), and \( \frac{(b-a)}{180} h^4 u^{(4)} (\sigma _3 ) \). Then we obtain the error estimation for the Eq. (1) by

$$\begin{aligned} e \le \left| \frac{(b-a)^2}{12 N^2 }\mu \right| , \end{aligned}$$
(28)

where \( \mu =max\{u^{(4)} (\sigma _1), u^{(3)} (\sigma _2) \}, \) and N is the number of subinterval.

Proof

From Eq. (27), the exact solution for \(i=0,1,2,3,\ldots , N \).

$$\begin{aligned}&\frac{u_{i+1}-2u_{i}+u_{i-1}}{h^2} -u_i +\frac{h^2}{12}u^{(4)} (\sigma _1 )\nonumber \\&\quad =\rho _i +\frac{h}{3}\left[ k_{i0} \left( \frac{u_1-u_{-1}}{2 h}\right) +4k_{i1}\left( \frac{u_2-u_0}{2h}\right) +2k_{i2} \left( \frac{u_3-u_1}{2h}\right) \right. \nonumber \\&\qquad +\cdots +2k_{iN-2} \left( \frac{u_{N-1}-u_{N-3}}{2h}\right) +4k_{iN-1} \left( \frac{u_{N}-u_{N-2}}{2h}\right) \nonumber \\&\qquad \left. + k_{iN} \left( \frac{u_{N+1}-u_{N-1}}{2h}\right) \right] +\frac{h^{2}}{6}u^{(3)} (\sigma _2) +\frac{(b-a)}{180} h^4 u^{(4)} (\sigma _3 )]. \end{aligned}$$
(29)

Substracting (27) from (29), we obtain the error terms as follows:

$$\begin{aligned} e&=\left| \frac{h^{2}}{12}u^{(4)} (\sigma _1 )- \frac{h^{2}}{6}u^{(3)} (\sigma _2)- \frac{(b-a)}{180} h^4 u^{(4)} (\sigma _3 )\right| , \\&\le \left| \frac{h^{2}}{12}u^{(4)} (\sigma _1 ) -\frac{h^{2}}{6}u^{(3)}(\sigma _2)\right| . \end{aligned}$$

Let \(\mu _1=u^{(4)} (\sigma _1)\), \(\mu _2=u^{(3)} (\sigma _2 )\), then

$$\begin{aligned} e\le \left| \frac{h^{2}}{12} \mu _1-\frac{h^{2}}{6} \mu _2\right| , \end{aligned}$$

if we take \(\mu =max \{\mu _1, \mu _2\}\), then we have

$$\begin{aligned} e \le \left| \frac{h^{2}}{12} \mu -\frac{h^{2}}{6} \mu \right| =\left| \frac{h^2}{12} \mu \right| . \end{aligned}$$
(30)

Substituting \(h=\frac{b-a}{N} \) in (30), we get

$$\begin{aligned} e \le \left| \frac{(b-a)^2}{12 N^2}\mu \right| . \end{aligned}$$

Which is the error estimation. \(\square \)

Application

In this section, the existence Theorem 2 will be applied on some examples of nonlocal Fredholm integro differential equation and we solve it analytically by using the modified decomposition method, numerically by using the finite difference Simpson approach. The results obtained are tabulated in Tables 12345 and, 6, all results for these examples are performed by using Mathematica.

Example 1

Consider the equation:

$$\begin{aligned} u'' (x)-\frac{1}{5} u(x)&=2+\frac{1}{5} \left( -x^2-x\right) +\frac{1}{25} \left( -x-\frac{7 \cos (x)}{6} -\frac{1}{2}\right) \nonumber \\&\quad +\frac{1}{25}\int _0^1( t+x+t \cos (x) u' (t)) dt, \end{aligned}$$
(31)
$$\begin{aligned} u(0)+u(0.5)&=\frac{3}{4},\quad u'(0)=1. \end{aligned}$$
(32)

The exact solution of this equation is \(u(x)=x+x^2.\)

Firstly, we prove that this example has a continous solution,

$$\begin{aligned} f(x,u(x),\int _{a}^{b} g(x,t,u'(t)dt)&=2+\frac{1}{5} \left( -x^2-x\right) +\frac{1}{25} \left( -x-\frac{7 \cos (x)}{6} -\frac{1}{2}\right) +\frac{1}{5} u(x)\\&\quad +\frac{1}{25}\int _0^1 ( t+x+t \cos (x) u' (t)) dt. \end{aligned}$$

Then,

$$\begin{aligned} \left| f(x,u(x),\int _{a}^{b} g(x,t,u'(t)dt)\right|&\le \left| 2+\frac{1}{5} \left( -x^2-x\right) +\frac{1}{25} \left( -x-\frac{7 \cos (x)}{6} -\frac{1}{2}\right) \right| \\&\quad +\frac{1}{5} |u(x)|+ \frac{1}{5} \int _0^1\frac{1}{5}| t+x+t \cos (x) u' (t)| dt, \end{aligned}$$

and also

$$\begin{aligned} |g(x,t,u'(t)dt)|\le \frac{1}{5}(x+t)+\frac{1}{5}| u' (t)|, \end{aligned}$$

where \(c_1(x)= 2+\frac{1}{5} \left( -x^2-x\right) +\frac{1}{25} \left( -x-\frac{7 \cos (x)}{6}-\frac{1}{2}\right) , c_2(x,t)=\frac{1}{5}(x+t), d_1=\frac{1}{5}, d_2=\frac{1}{5}, b=1,\) then \(2d_1 b^2+d_1 d_2 b^2=\frac{2}{5}+\frac{1}{25}=\frac{11}{25} <1.\) It is clear that the Assumption 1–4 of Theorem 2 is satisfied, therefore the given NBVP has a continuous solution. Then, we use the modified decomposition method to obtain the exact solution of this example. From Eq. (31) we get

$$\begin{aligned} u(x)&\approx 0.038889 \cos (x)+x+x^2-0.036056 \cosh \left( \frac{x}{\sqrt{5}}\right) \\&\quad +\left( 0.030905 \cosh \left( \frac{x}{\sqrt{5}}\right) -0.033333 \cos (x)\right) \int _{0}^{1} t u'(t) dt. \end{aligned}$$

By using the modified decomposition method we can get the following recurrence relation

$$\begin{aligned} u_0(x)&=x+x^2,\\ u_1(x)&\approx 0.03889 \cos (x)-0.036056 \cosh \left( \frac{x}{\sqrt{5}}\right) \\&\quad +\left( 0.030905 \cosh \left( \frac{x}{\sqrt{5}}\right) -0.033333 \cos (x)\right) \int _{0}^{1}t u_0'(t) dt\approx 0, \\ u_{l+1}(x)&= \int _{0}^{1} K(x,t) u'_l(t) dt=0,\quad l\ge 1. \end{aligned}$$

It is clear that each component of \(u_l, l \ge 1 \ \ \) is zero. This, in turn, gives the exact solution by

$$\begin{aligned} u(x)=x+x^2. \end{aligned}$$

Now, we use the finite difference Simpson’s approach to find the numerical solution of this example. Table 1 and Fig. 1 below give the approximate solution of this example and compare with tha exact solution.

Table 1 The exact and numerical solution of Example 1
Fig. 1
figure 1

Comparison between the approximate and exact solutions of Example 1

Now, we study the continous dependence on \(u_0\). If we take \(u^{*}(0)+u^{*}(0.5)=0.75001\), \({u^*}'(0)=1.00001\). Then, the exact solution of Example 1 is given by

$$\begin{aligned} u^{*}(x)=x+x^2+2.44838 \times 10^{-6} \cosh \frac{x}{\sqrt{5}}+2.23607 \times 10^{-5} \sinh \frac{x}{\sqrt{5}}. \end{aligned}$$

Then,

$$\begin{aligned} |u_0-u_0^{*}|&=0.00001 \Longrightarrow \Vert u-u^{*}\Vert =2.44838 \times 10^{-6} \cosh \frac{x}{\sqrt{5}}\\&\quad +2.23607 \times 10^{-5} \sinh \frac{x}{\sqrt{5}}\leqslant 1.3034\times 10^{-5}. \end{aligned}$$

Then, Example 1 is a continous dependence on \(u_0\). It is showing that in Fig. 2.

Fig. 2
figure 2

Comparison between the exact solutions of u and \(u^*\)

Now, we study the continous dependence on \(a_k\). If we take \(1.00001u^{*}(0)+1.00001u^{*}(0.5)=0.75\), \({u^*}'(0)=1\). Then, the exact solution of Example 1 is given by

$$\begin{aligned} u^{*}(x)=x+x^2-3.70348 \times 10^{-6} \cosh \frac{x}{\sqrt{5}}. \end{aligned}$$

Then,

$$\begin{aligned} |a_k-a_k^{*}|=0.00001 \Longrightarrow \Vert u-u^{*}\Vert =-3.70348 \times 10^{-6} \cosh \frac{x}{\sqrt{5}}\leqslant 4.08004\times 10^{-6}. \end{aligned}$$
Fig. 3
figure 3

Comparison between the exact solutions of u and \(u^*\)

Then, Example 1 is a continous dependence on \(a_k\). It is showing that in Fig. 3.

Example 2

Consider the equation:

$$\begin{aligned}&u'' (x)+\frac{1}{3} u(x)=-\frac{2 \sin (x)}{3} +\frac{1}{9}\int _{-1}^1( \sin (t x)+ x t u' (t)) dt, \end{aligned}$$
(33)
$$\begin{aligned}&u(-0.8)+2 u(-1)= \sin (-0.8)+2 \sin (-1),\quad u'(-1)=\cos (-1). \end{aligned}$$
(34)

The exact solution of this equation is \(u(x)= \sin (x).\)

Firstly we apply the assumption of Theorem 2 to prove that this example has a continuous solution:

$$\begin{aligned} f(x,u(x),\int _{a}^{b} g(x,t,u'(t)dt)= -\frac{2 \sin (x)}{3}-\frac{1}{3} u(x)+\frac{1}{9}\int _{-1}^1( \sin (t x)+ x t u' (t)) dt. \end{aligned}$$

Then,

$$\begin{aligned} | f(x,u(x),\int _{a}^{b} g(x,t,u'(t)dt)|\le&\frac{2 \sin (x)}{3}+\frac{1}{3} |u(x)|+ \frac{1}{3} \int _{-1} ^1 \frac{1}{3}|\sin (x t)+x t u' (t)| dt, \end{aligned}$$

and also

$$\begin{aligned} |g(x,t,u'(t)dt)|\le \frac{1}{3}\sin (x t)+\frac{1}{3}| u' (t)|, \end{aligned}$$

where \( c_1(x)=-\frac{2 \sin (x)}{3},c_2(x,t)=\frac{1}{3} \sin (x t), d_1=\frac{1}{3}, d_2=\frac{1}{3}, b=1, \) \(2d_1 b^2+d_1 d_2 b^2=\frac{2}{3}+\frac{1}{3}\frac{1}{3}=\frac{7}{9}<1.\) It is clear that the Assumption 1–4 of Theorem 2 is satisfied, therefore the given NBVP has a continuous solution. Then, we use the modified decomposition to find the exact solution of this example. From Eq. (33) we get

$$\begin{aligned} u(x)&\approx 1.64363\times 10^{-16} \sin \frac{x}{\sqrt{3}}-1.191\times 10^{-17} \cos \frac{x}{\sqrt{3}} +\sin (x) \\&\quad +\biggl (0.333333 x-0.666082 \sin \left( \frac{x}{\sqrt{3}}\right) -0.0352372 \cos \left( \frac{x}{\sqrt{3}}\right) \biggl )\int _{-1}^{1} t u'(t) dt. \end{aligned}$$

By using the modified decomposition method we can get the following recurrence relation

$$\begin{aligned}&u_0(x)=\sin (x),\\&u_1(x)\approx 1.64363\times 10^{-16} \sin \frac{x}{\sqrt{3}}-1.191 \times 10^{-17} \cos \frac{x}{\sqrt{3}} \\&\quad +\biggl (0.333333 x-0.666082 \sin \left( \frac{x}{\sqrt{3}}\right) -0.0352372 \cos \left( \frac{x}{\sqrt{3}}\right) \biggl )\int _{-1}^{1} t u_0'(t) dt\approx 0, \\&u_{l+1}(x)=\int _{-1}^{1} K(x,t) u'_l(t) dt=0,\quad l\ge 1. \end{aligned}$$

It is clear that each component of \(u_l, l \ge 1\) is zero. This in turn gives the exact solution by

$$\begin{aligned} u(x)=\sin (x). \end{aligned}$$

Now, we use the finite diffrence Simpson’s approach to find the numerical solution of this example. Table 2 and Fig. 4 below give the approximate solution of this example and compare it with the exact solution to show the accuracy of the method.

Table 2 The exact and numerical solution of Example 2
Fig. 4
figure 4

Comparison between the approximate and exact solutions of Example 2

Now, we study the continous dependence on \(u_0\). If we take

$$\begin{aligned} u^*(-0.8)+2 u^*(-1)= \sin (-0.8)+2 \sin (-1)+0.00001, (u^*)'(-1) =\cos (-1)+0.00001. \end{aligned}$$

Then, the exact solution of Example 2 is

$$\begin{aligned} u^{*}(x)=1. \sin (x)+0.0000130535 \sin \left( \frac{x}{\sqrt{3}}\right) +0.0000116943 \cos \left( \frac{x}{\sqrt{3}}\right) . \end{aligned}$$

Since

$$\begin{aligned}&|u_0-u_0^*|=0.00001\\&\quad \Longrightarrow \Vert u-u^*\Vert =0.0000130535 \sin \left( \frac{x}{\sqrt{3}}\right) +0.0000116943 \cos \left( \frac{x}{\sqrt{3}}\right) \le 1.69235 \times 10^{-4}. \end{aligned}$$

Then, Example 2 is a continous dependence on \(u_0\). It is showing that in Fig. 5.

Fig. 5
figure 5

Comparison between the exact solutions of u and \(u^*\)

Now, we study the continous dependence on \(a_k\). If we take

$$\begin{aligned} 1.00001u^*(-0.8)+2.00001 u^*(-1)= \sin (-0.8)+2 \sin (-1), (u^*)'(-1)=\cos (-1). \end{aligned}$$

Then, the exact solution of Example 2 is

$$\begin{aligned} u^{*}(x)=\sin (x)-2.84235 \times 10^{-6}\sin \frac{x}{\sqrt{3}} +4.36352 \times 10^{-6} \cos \frac{x}{\sqrt{3}}. \end{aligned}$$

Since

$$\begin{aligned}&|a_k-a_k^*|=0.00001\\&\quad \Longrightarrow \Vert u-u^*\Vert =-2.84235 \times 10^{-6}\sin \frac{x}{\sqrt{3}}+4.36352 \times 10^{-6} \cos \frac{x}{\sqrt{3}}\le 2.10488 \times 10^{-6}. \end{aligned}$$
Fig. 6
figure 6

Comparison between the exact solutions of u and \(u^*\)

Then, Example 2 is a continous dependence on \(a_k\). It is showing that in Fig. 6

Example 3

Consider the equation:

$$\begin{aligned}&u'' (x)-\frac{1}{7} u(x)=\frac{6 \cosh (x)}{7} -\frac{(2+e) x}{28 e}+ \frac{1}{14}\int _0^1(t x+t x u' (t)) dt, \end{aligned}$$
(35)
$$\begin{aligned}&u(1)-u(0)=\cosh (1)-1,\quad u'(0)=0. \end{aligned}$$
(36)

The exact solution of this equation is \(u(x)= \cosh (x)\).

Firstly, we apply the assumption of Theorem 2 to prove that this example has a continuous solution:

$$\begin{aligned} f(x,u(x),\int _{a}^{b} g(x,t,u'(t)dt)= \frac{6 \cosh (x)}{7} -\frac{(2+e) x}{28 e}+\frac{1}{7} u(x)+ \frac{1}{14} \int _0^1(t x+t x u' (t)) dt. \end{aligned}$$

Then,

$$\begin{aligned} |f(x,u(x),\int _{a}^{b} g(x,t,u'(t)dt)|\le |\frac{6 \cosh (x)}{7} -\frac{(2+e) x}{28 e}|+\frac{1}{7} |u(x)|+ \frac{1}{7} \int _0^1 \frac{1}{2} |t x+t x u' (t)| dt, \end{aligned}$$

and also

$$\begin{aligned} |g(x,t,u'(t)dt)|\le \frac{1}{2} t x+\frac{1}{2}| u' (t)|, \end{aligned}$$

where \(c_1(x)=\frac{6 \cosh (x)}{7}-\frac{(2+e) x}{28 e}, c_2(x,t)=\frac{1}{2} t x, d_1=\frac{1}{7}, d_2=\frac{1}{2}, b=1,\) \(2d_1 b^2+d_1 d_2 b^2=\frac{2}{7}+\frac{1}{7}\frac{1}{2} =\frac{5}{14}<1.\) It is clear that the Assumption 1–4 of Theorem 2 is satisfied, therefore the given NBVP has a continuous solution. Then, we use the modified decomposition method to find the exact solution of this example. From Eq. (35) we get

$$\begin{aligned}&u(x) \\&\quad =\cosh (x)+ \frac{e^{-\frac{x}{\sqrt{7}}-1} \left( e^{\frac{x}{\sqrt{7}}} x+2 e^{\frac{x+1}{\sqrt{7}}} x+e^{\frac{x+2}{\sqrt{7}}} x-\sqrt{7} e^{\frac{2 x}{\sqrt{7}}}-\left( \sqrt{7}+1\right) e^{\frac{2 x+1}{\sqrt{7}}}+e^{\frac{1}{\sqrt{7}}} \left( \sqrt{7}-1\right) +e^{\frac{2}{\sqrt{7}}} \sqrt{7}\right) }{2 \left( 1+e^{\frac{1}{\sqrt{7}}}\right) ^2}\\&\qquad -\frac{e^{-\frac{x}{\sqrt{7}}} \left( e^{\frac{x}{\sqrt{7}}} x+2 e^{\frac{x+1}{\sqrt{7}}} x+e^{\frac{x+2}{\sqrt{7}}} x-\sqrt{7} e^{\frac{2 x}{\sqrt{7}}}-\left( \sqrt{7}+1\right) e^{\frac{2 x+1}{\sqrt{7}}}+e^{\frac{1}{\sqrt{7}}} \left( \sqrt{7}-1\right) +e^{\frac{2}{\sqrt{7}}} \sqrt{7}\right) }{2 \left( 1+e^{\frac{1}{\sqrt{7}}}\right) ^2} \\&\qquad \int _{0}^{1} t u'(t) dt. \end{aligned}$$

By using the modified decomposition method we can get the following recurence relation

$$\begin{aligned}&u_0(x)=\cosh (x),\\&u_1(x)=\frac{e^{-\frac{x}{\sqrt{7}}-1} \left( e^{\frac{x}{\sqrt{7}}} x+2 e^{\frac{x+1}{\sqrt{7}}} x+e^{\frac{x+2}{\sqrt{7}}} x-\sqrt{7} e^{\frac{2 x}{\sqrt{7}}}-\left( \sqrt{7}+1\right) e^{\frac{2 x+1}{\sqrt{7}}}+e^{\frac{1}{\sqrt{7}}} \left( \sqrt{7}-1\right) +e^{\frac{2}{\sqrt{7}}} \sqrt{7}\right) }{2 \left( 1+e^{\frac{1}{\sqrt{7}}}\right) ^2}\\&\qquad -\frac{e^{-\frac{x}{\sqrt{7}}} \left( e^{\frac{x}{\sqrt{7}}} x+2 e^{\frac{x+1}{\sqrt{7}}} x+e^{\frac{x+2}{\sqrt{7}}} x-\sqrt{7} e^{\frac{2 x}{\sqrt{7}}}-\left( \sqrt{7}+1\right) e^{\frac{2 x+1}{\sqrt{7}}}+e^{\frac{1}{\sqrt{7}}} \left( \sqrt{7}-1\right) +e^{\frac{2}{\sqrt{7}}} \sqrt{7}\right) }{2 \left( 1+e^{\frac{1}{\sqrt{7}}}\right) ^2} \\&\qquad \int _{0}^{1} t u_0'(t) dt=0,\quad u_{l+1}(x)= -\int _0^1K(x,) u'_l(t)dt=0, \quad l\ge 1. \end{aligned}$$

It is clear that each component of \(u_l, l \ge 1\) is zero. This in turn gives the exact solution by

$$\begin{aligned} u(x)=\cosh (x). \end{aligned}$$

Now, we use the finite difference Simpson’s approach to finding the numerical solution of this example.

Table 3 and Fig. 7 below give the approximate solution of this example and compare it with the exact solution to show the accuracy of the presented method.

Table 3 The exact and numerical solution of Example 3
Fig. 7
figure 7

Comparison between the approximate and exact solutions of Example 3

Example 4

Consider the equation:

$$\begin{aligned} u'' (x)-\frac{1}{4} u(x)&=2\cosh (x)+\frac{1}{8}(-4-\sinh (1))-\sinh (x) +\frac{3}{4} x \sinh (x) \nonumber \\&\quad +\int _{0}^{1} \left( t+\sinh (x) +\frac{1}{8}u' (t)\right) dt, \end{aligned}$$
(37)
$$\begin{aligned} u(0.5)+u(0)&=0.5\sinh (0.5),\quad u'(0)=0. \end{aligned}$$
(38)

The exact solution of this equation is \(u(x)= x \sinh (x)\).

Firstly, we apply the assumption of Theorem 2 to prove that this example has a continuous solution:

$$\begin{aligned} f(x,u(x),\int _{a}^{b} g(x,t,u'(t)dt)&= 2\cosh (x)+\frac{1}{8}(-4-\sinh (1)) -\sinh (x)+\frac{3}{4} x \sinh (x)\\&\quad +\frac{1}{4} u(x)+\int _{0}^{1} \left( t+\sinh (x)+\frac{1}{8} u' (t)\right) dt. \end{aligned}$$

Then

$$\begin{aligned}&|f(x,u(x),\int _{a}^{b} g(x,t,u'(t)dt)|\\&\quad \le |2\cosh (x)+\frac{1}{8}(-4-\sinh (1))-\sinh (x) +\frac{3}{4} x \sinh (x)|+\frac{1}{4} |u(x)|\\&\qquad + \frac{1}{4} \int _0^1 |4 (t+\sinh (x))+\frac{1}{2} u' (t)| dt, \end{aligned}$$

and also

$$\begin{aligned} |g(x,t,u'(t)dt)|\le 4(t+\sinh (x)) +\frac{1}{2}| u' (t)|, \end{aligned}$$

where \(c_1(x)=2\cosh (x)+\frac{1}{8}(-4-\sinh (1))-\sinh (x) +\frac{3}{4} x \sinh (x), c_2(x,t)=4(t+\sinh (x)), d_1=\frac{1}{4}\),

\(d_2=\frac{1}{2}, b=1\), \(2d_1 b^2+d_1 d_2 b^2=2 \frac{1}{4}+\frac{1}{4}\frac{1}{2}=\frac{5}{8}<1.\) It is clear that the Assumption 1–4 of Theorem 2 is satisfied, therefore the given NBVP has a continuous solution. Then, we use the modified decomposition method to obtain the exact solution of this example. From Eq. (37) we get

$$\begin{aligned} u(x)\approx x \sinh (x)+0.5876-0.5785 \cosh \left( \frac{x}{2}\right) +\left( -0.5 + 0.4923 \cosh \left( \frac{x}{2}\right) \right) \int _{0}^{1} u'(t) dt. \end{aligned}$$

By using modified decomposition method we can write the following recurence relation

$$\begin{aligned}&u_0(x)=x \sinh (x),\\&u_1(x)=0.5876-0.5785 \cosh \left( \frac{x}{2}\right) +\left( -0.5 + 0.4923 \cosh \left( \frac{x}{2}\right) \right) \int _{0}^{1} u'(t) dt,\\&u_{l+1}(x)=\int _{0}^{1} K(x,t) u_l(t) dt=0,\quad l\ge 1. \end{aligned}$$

It is clear that each component of \(u_l, l \ge 1\) is zero. This in turn gives the exact solution by

$$\begin{aligned} u(x)=x \sinh (x). \end{aligned}$$

Now, we use the finite difference Simpson’s approach to finding the numerical solution of this example.

Table 4 and Fig. 8 below give the approximate solution of this example and compare it with the exact solution to show the accuracy of the method.

Table 4 The exact and numerical solution of Example 4
Fig. 8
figure 8

Comparison between the approximate and exact solutions of Example 4

Example 5

Consider the equation:

$$\begin{aligned}&u'' (x)-\frac{1}{15} u(x)=-\frac{1}{x^2}-\frac{\ln (x)}{15} +\frac{1}{60}(1-\ln (8x))+\frac{1}{60} \int _{1}^{2} (\ln (x t)+ u' (t)) dt, \end{aligned}$$
(39)
$$\begin{aligned}&u(1)+u(2)=\ln (2) ,\quad u'(1)=1. \end{aligned}$$
(40)

The exact solution of this equation is \(u(x)= \ln (x)\).

Firstly, we apply the assumption of Theorem 2 to prove that this example has a continuous solution:

$$\begin{aligned} f(x,u(x),\int _{a}^{b} g(x,t,u'(t)dt)&= -\frac{1}{x^2} -\frac{\ln (x)}{15}+\frac{1}{60}(1-\ln (8x))+\frac{1}{15} u(x)\\&\quad +\frac{1}{60} \int _{1}^{2} (\ln (x t))+ u' (t) dt. \end{aligned}$$

Then

$$\begin{aligned} | f(x,u(x),\int _{a}^{b} g(x,t,u'(t)dt)|&\le |-\frac{1}{x^2} -\frac{\ln (x)}{15}+\frac{1}{60}(1-\ln (8x))|+\frac{1}{15} |u(x)|\\&\quad +\frac{1}{15} \int _{1}^{2} \frac{1}{4}| (\ln (x t))+ u' (t)|dt, \end{aligned}$$

and also

$$\begin{aligned} |g(x,t,u'(t)dt)|\le \frac{1}{4} \ln (x t)+\frac{1}{4}| u' (t)|, \end{aligned}$$

where \(c_1(x)=-\frac{1}{x^2}-\frac{\ln (x)}{15}+\frac{1}{60} (1-\ln (8x)), c_2(x,t)=\frac{1}{4} \ln (x t), d_1=\frac{1}{15}, d_2=\frac{1}{4}, b=2, 2d_1 b^2+d_1 d_2 b^2= \frac{8}{15} +\frac{1}{15}=\frac{9}{15}<1.\) It is clear that the Assumption 1–4 of Theorem 2 is satisfied, therefore the given NBVP has a continuous solution. Then, we use the modified decomposition to find the exact solution of this example. From Eq. (39) we get

$$\begin{aligned} u(x)&=\frac{e^{-\frac{x}{\sqrt{15}}} \left( e^{\frac{x}{\sqrt{15}}} -2 e^{\frac{2 x}{\sqrt{15}}}+2 e^{\frac{x+1}{\sqrt{15}}} +e^{\frac{x+2}{\sqrt{15}}}-2 e^{\frac{2}{\sqrt{15}}}\right) \ln (2)}{4 \left( 1+e^{\frac{1}{\sqrt{15}}}\right) ^2}+\ln (x)\\&\quad -\frac{e^{-\frac{x}{\sqrt{15}}} \left( e^{\frac{x}{\sqrt{15}}} -2 e^{\frac{2 x}{\sqrt{15}}}+2 e^{\frac{x+1}{\sqrt{15}}} +e^{\frac{x+2}{\sqrt{15}}}-2 e^{\frac{2}{\sqrt{15}}}\right) }{4 \left( 1+e^{\frac{1}{\sqrt{15}}}\right) ^2}\int _1^2 u'(t)\, dt. \end{aligned}$$

By using the modified decomposition method we can get the following recurence relation

$$\begin{aligned}&u_0(x)=\ln (x),\\&u_1(x)=\frac{e^{-\frac{x}{\sqrt{15}}} \left( e^{\frac{x}{\sqrt{15}}} -2 e^{\frac{2 x}{\sqrt{15}}}+2 e^{\frac{x+1}{\sqrt{15}}} +e^{\frac{x+2}{\sqrt{15}}}-2 e^{\frac{2}{\sqrt{15}}}\right) \ln (2)}{4 \left( 1+e^{\frac{1}{\sqrt{15}}}\right) ^2}\\&\quad -\frac{e^{-\frac{x}{\sqrt{15}}} \left( e^{\frac{x}{\sqrt{15}}} -2 e^{\frac{2 x}{\sqrt{15}}}+2 e^{\frac{x+1}{\sqrt{15}}} +e^{\frac{x+2}{\sqrt{15}}}-2 e^{\frac{2}{\sqrt{15}}}\right) }{4 \left( 1+e^{\frac{1}{\sqrt{15}}}\right) ^2}\int _1^2 u'_0(t)dt=0,\\&u_{l+1}(x)=-\int _{1}^{2} K(x,t) u_l(t) dt=0,\quad l\ge 1. \end{aligned}$$

It is clear that each component of \(u_l, l \ge 1\) is zero. This in turn gives the exact solution by

$$\begin{aligned} u(x)=\ln (x). \end{aligned}$$

Now, we use the finite difference Simpson’s approach to finding the numerical solution of this example.

Table 5 and Fig. 9 below give the approximate solution of this example and compare it with the exact solution to show the accuracy of the method.

Table 5 The exact and numerical solution of Example 5

From the results in Table 5 we can say that the proposed method is effective.

Fig. 9
figure 9

Comparison between the approximate and exact solutions of Example 5

Example 6

Consider the equation:

$$\begin{aligned}&u'' (x)-\frac{1}{5} u(x)=-\frac{1}{45} x \left( 2 x+3 \sin ^2(1)\right) -\frac{6 \sin (x)}{5}+\frac{2}{15} \int _0^1 \biggl ((t x)^2+x \sin (t) u'(t) \biggl ) dt, \end{aligned}$$
(41)
$$\begin{aligned}&\int _0^1 u(s) ds=1-\cos (1),\quad u'(0)=1. \end{aligned}$$
(42)

The exact solution of this equation is \(u(x)=\sin (x)\).

Firstly we prove that this example has a continous solution:

$$\begin{aligned} f(x,u(x),\int _{a}^{b} g(x,t,u'(t)dt)&=-\frac{1}{45} x \left( 2 x+3 \sin ^2(1)\right) -\frac{6 \sin (x)}{5}+\frac{1}{5} u(x)\\&\quad +\frac{2}{15} \int _0^1 \biggl ((t x)^2 +x \sin (t) u'(t) \biggl ) dt. \end{aligned}$$

Then,

$$\begin{aligned} |f(x,u(x),\int _{a}^{b} g(x,t,u'(t)dt)|&\le \left| -\frac{1}{45} x \left( 2 x+3 \sin ^2(1)\right) -\frac{6 \sin (x)}{5}\right| +\frac{1}{5} |u(x)|\\&\quad + \frac{1}{5} \int _0^1\frac{2}{3}| (t x)^2+x \sin (t) u'(t)| dt, \end{aligned}$$

and also

$$\begin{aligned} |g(x,t,u'(t)dt)|\le \frac{2}{3} (t x)^2+\frac{2}{3}| u' (t)|, \end{aligned}$$

where \(c_1(x)= -\frac{1}{45} x \left( 2 x+3 \sin ^2(1)\right) -\frac{6\sin (x)}{5}, c_2(x,t)=\frac{2}{3}(t x)^2, d_1=\frac{1}{5}, d_2=\frac{2}{3}, b=1,\) then \( 2d_1 b^2+d_1 d_2 b^2=\frac{2}{5}+\frac{2}{15}=\frac{8}{15}<1.\) It is clear that the Assumption 1–4 of Theorem 2 is satisfied, therefore the given NBVP has a continuous solution. Then, we use the modified decomposition method to obtain the exact solution of this example. From Eq. (41) we get

$$\begin{aligned} u(x)&\approx 0.236024 x+\sin (x)-0.262926 e^{\frac{x}{\sqrt{5}}} +0.264841 e^{-\frac{x}{\sqrt{5}}}\\&\quad +\left( -0.666667 x+0.742651 e^{\frac{x}{\sqrt{5}}} -0.748061 e^{-\frac{x}{\sqrt{5}}}\right) \int _{0}^{1} \sin (t) u'(t) dt. \end{aligned}$$

By using modified decomposition method we can get the following recurence relation

$$\begin{aligned}&u_0(x)=\sin (x),\\&u_1(x)\approx 0.236024 x-0.262926 e^{\frac{x}{\sqrt{5}}} +0.264841 e^{-\frac{x}{\sqrt{5}}}\\&\quad +\left( -0.666667 x+0.742651 e^{\frac{x}{\sqrt{5}}} -0.748061 e^{-\frac{x}{\sqrt{5}}}\right) \int _{0}^{1} \sin (t) u_0'(t) dt\approx 0,\\&u_{l+1}(x)=k(x,t)u'_l(t) dt, \quad l\ge 1. \end{aligned}$$

It is clear that each component of \(u_l, l \ge 1\) is zero. This in turn gives the exact solution by

$$\begin{aligned} u(x)=\sin (x). \end{aligned}$$

Now, we use the finite difference Simpson’s approach to finding the numerical solution of this example.

Table 6 and Fig. 10 below give the approximate solution of this example and compare it with the exact solution to show the accuracy of the presented method.

Table 6 The exact and numerical solution of Example 6
Fig. 10
figure 10

Comparison between the approximate and exact solutions of Example 6

Now, we study the continous dependence on \(u_0\).

If we take \(\int _0^1 u^{*}(s) ds=1.00001-\cos (1),\quad u^{*'}(0)=1.00001.\) then the exact solution of Example 6 is given by

$$\begin{aligned} u^{*}(x)=\sin (x)+4.122539\times 10^{-17} x+2.23607 \times 10^{-5} \sinh \frac{x}{\sqrt{5}}+4.5086196\times 10^{-6}\cosh \frac{x}{\sqrt{5}}. \end{aligned}$$

Since \(|u_0-u_0^*|=0.00001 \Longrightarrow \Vert u-u^*\Vert =4.122539 \times 10^{-17} x+2.23607 \times 10^{-5} \sinh \frac{x}{\sqrt{5}}+4.5086196\times 10^{-6}\cosh \frac{x}{\sqrt{5}}\leqslant 1.53037\times 10^{-5}\).

Then, Example 6 is a continous dependence on \(u_0\). It is showing that in Fig. 9.

Fig. 11
figure 11

Comparison between the d exact solutions of u and \(u^*\)

Conclusion

In this work, the existence, uniqueness and the continuous dependence of the NBVP have been studied. Some examples are introduced to illustrate the benefits of our results, also, by using the modified decomposition method, we get the exact solution. Furthermore a numerical study of this system has been presented, by solving the proposed models numerically using the finite difference Simpson’s method. Some numerical solutions are compared with exact answers to show the accuracy of our methods, and some figures are obtained that illustrate this approach. It is evident from the presented Figs. 12345678910 and 11 that the numerical results that we obtained are entirely consistent with the analytical study that we have carried out. Thus, through the survey that we conducted on some examples, one can say that we have made a clear contribution in solving the integral differential equations in the form of the proposed system analytically and numerically, in full accordance with the analytical study that conducted.