Introduction

To introduce of the chemical concept of cosm-rs, we used from [2, 6, 7, 16] references, which the chemical potential of a surface segment with SCD \(\sigma \) in an ensemble described by normalized distribution function \(p_{s}(\sigma )\) is given by

$$\begin{aligned} \mu _{s}(\sigma )&= {} -RT\ln \left[ \int p_{s}(\sigma ')\right. \nonumber \\&\left. \exp \left\{ \frac{\mu _{s}(\sigma ')-a_{\mathrm{eff}} e(\sigma ,\sigma ')}{RT}\right\} {\mathrm{d}}\sigma '\right] , \end{aligned}$$
(1)

where R is the gas constant, \(\mu _{s}(\sigma )\) is a measure for the affinity of the system S to a surface of polarity \(\sigma \) at temperature T, and

$$\begin{aligned} e (\sigma , \sigma ')= e_{\mathrm{misfit}} (\sigma , \sigma ')+ e_{HB} (\sigma , \sigma '). \end{aligned}$$

In this paper, we focus on (1) and convert it to a suitable form of integral equation in the following steps,

$$\begin{aligned}&\exp \left\{ -\frac{\mu _{s}(\sigma )}{RT}\right\} \nonumber \\&\quad =\left[ \int p_{s}(\sigma ')\exp \left\{ \left( \frac{\mu _{s}(\sigma ')}{RT}\right) \right\} \right. \left. \exp \left\{ \left( \frac{-a_{\mathrm{eff}} e(\sigma ,\sigma ')}{RT}\right) \right\} {\mathrm{d}}\sigma '\right] , \end{aligned}$$
(2)

assuming \(f(\sigma )=\exp \left\{ -\frac{\mu _{s}(\sigma )}{RT}\right\} \) and \(\Omega (\sigma ,\sigma ')=\exp \left\{ (\frac{-a_{\mathrm{eff}} e(\sigma ,\sigma ')}{RT})\right\} \), and we conclude that,

$$\begin{aligned} f(\sigma )=\int p_{s}(\sigma ')(f(\sigma '))^{-1} \Omega (\sigma ,\sigma '){\mathrm{d}}\sigma ', \end{aligned}$$
(3)

let us getting \(\sigma ,\sigma '\in [a,b]\subset {\mathfrak {R}}\), \(k(\sigma ,\sigma ')=p_{s}(\sigma ')\Omega (\sigma ,\sigma ')\) and \(\psi (\sigma ',f(\sigma '))=(f(\sigma '))^{-1}\), and then we can give a Hammerstein nonlinear integral equation as follows:

$$\begin{aligned} f(\sigma )=\int _{a}^{b} k(\sigma ,\sigma ')\psi (\sigma ',f(\sigma ')){\mathrm{d}}\sigma '. \end{aligned}$$
(4)

Existence of solution of Eq. (4) and some of nonlinear integral equations, you can see [3, 4, 12]. Also in [9, 13, 14] introduced some numerical methods to solve Hammerstein nonlinear integral equation. But we decide to solve the above problem by an effective iterative algorithm and comparing it with some other works.

Introducing an iterative algorithm

Homotopy perturbation method is a semianalytic method to solve nonlinear problems which introduced by [5, 8] that it is an important concept of topology and perturbations theory. Some modifications and improvement of the above method can be seen in [10, 11]. Now, we consider the general operator form of nonlinear problem,

$$\begin{aligned} A(f)-h(\sigma )&= {} 0,\quad \sigma \in \Omega \nonumber \\ B\left( f,\frac{\partial f}{\partial n}\right)&= {} 0,\quad n \in \Gamma , \end{aligned}$$
(5)

where A is a general differential operator, B is a boundary operator, h is a known analytic function, and \(\Gamma \) is the boundary of the domain \(\Omega \). We divide the general operator A to two nonlinear operators as \(N_{1}\) and \(N_{2}\). Also, the function h is converted to two functions such as \(h_{1}\) and \(h_{2}\), and thus we have

$$\begin{aligned} N_{1}(f)-h_{1}(\sigma )+N_{2}(f)-h_{2}(\sigma )=0, \end{aligned}$$
(6)

Similar to [10, 11], the modified homotopy perturbation can be introduced as,

$$\begin{aligned} H(\nu ,p)=N_{1}(\nu )-h_{1}(\sigma )+p(N_{2}(\nu )-h_{2}(\sigma ))=0,\quad p\in [0,1] \end{aligned}$$
(7)

where \(\nu \) is an approximation of f and variation p in interval [0, 1] also \(p=0\) to \(p=1\) concludes that \(N_{1}(\nu )=h_{1}(\sigma )\) to \(A(\nu )=0\). In fact, we can find a solution of the (5) for \(p=1\). In the general case, we introduce a form of solution by series,

$$\begin{aligned} \nu (\sigma )&= {} \sum _{j=0}^{\infty }p^{j}\nu _{j}(\sigma ), \end{aligned}$$
(8)
$$\begin{aligned} f(\sigma )\simeq & {} \lim _{p\rightarrow 1}v(\sigma ). \end{aligned}$$
(9)

Similar to (5), we consider the nonlinear integral equation (4) to this form,

$$\begin{aligned} f(\sigma )-\int _{a}^{b} k(\sigma ,\sigma ')\psi (\sigma ',f(\sigma ')){\mathrm{d}}\sigma '=0; \end{aligned}$$
(10)

by using modified homotopy perturbation (7) and Eq. (10), we can get \(N_{1}, N_{2}\) operators in the following form,

$$\begin{aligned} N_{1}(f)&= {} f, \nonumber \\ N_{2}(f)&= {} -\int _{a}^{b} k(\sigma ,\sigma ')\psi (\sigma ',f(\sigma ')){\mathrm{d}}\sigma ', \end{aligned}$$
(11)

because function \(h(\sigma )\) is equal to zero and then \(h_{2}(\sigma )=-h_{1}(\sigma )\), and replacing (11) operators into (7), we can write,

$$\begin{aligned}&(\nu (\sigma )-h_{1}(\sigma ))+p\left( -\int _{a}^{b} k(\sigma ,\sigma ')\psi (\sigma ',\nu (\sigma ')){\mathrm{d}}\sigma '\right. \nonumber \\&\quad \left. +\,h_{1}(\sigma )\right) =0, \end{aligned}$$
(12)

substituting (8) into (12) leads to,

$$\begin{aligned}&\left( \sum _{j=0}^{\infty }p^{j}\nu _{j}(\sigma )-h_{1}(\sigma )\right) \nonumber \\&\quad -\,p\left( \int _{a}^{b} k(\sigma ,\sigma ')\psi \left( \sigma ',\sum _{j=0}^{\infty }p^{j}\nu _{j}(\sigma ')\right) {\mathrm{d}}\sigma ' -h_{1}(\sigma )\right) =0. \end{aligned}$$
(13)

To get rid of the nonlinearity of the function \(\psi \), we use a linear combination of Adomian polynomials in this form,

$$\begin{aligned} \psi \left( \sigma ',\sum _{j=0}^{\infty }p^{j}\nu _{j}(\sigma ')\right) =\sum _{j=0}^{\infty }p^{j}A_{j}(\sigma '). \end{aligned}$$
(14)

Replacing (14) into (13) and sorting out to the power of p, we obtain an iterative algorithm as follows:

Algorithm

$$\begin{aligned} \left\{ \begin{array}{llll} \nu _{0}(\sigma )=h_{1}(\sigma ), \\ \nu _{1}(\sigma )=\int _{a}^{b} k(\sigma ,\sigma ')A_{0}(\sigma '){\mathrm{d}}\sigma '-h_{1}(\sigma ), \\ \\ \nu _{j}(\sigma )=\int _{a}^{b} k(\sigma ,\sigma ')A_{j-1}(\sigma '){\mathrm{d}}\sigma ',\quad j \ge 1 \end{array}\right. \end{aligned}$$
(15)

where Adomian polynomials are given by (see [15]),

$$\begin{aligned} A_{j}(\sigma ')=\frac{1}{j!}\left( \frac{{\mathrm{d}}^{j}}{{\mathrm{d}}p^{j}}\psi \left( \sigma ',\sum _{j=0}^{\infty }p^{j}v_{j}(\sigma ')\right) \right) _{p=0}. \end{aligned}$$
(16)

To find solution of (10), suitable choice of the \(\nu _{0}(s)\) is important and since \(h(\sigma )=0\) so, we set \(\nu _{0}(s)=0\).

Convergence of the proposed method

According to the above explanations, since existence and uniqueness of solution of Eq. (4) is verified, we prove convergence of the series created by algorithm (15) in the proposed method.

Theorem 1

Series (8), which terms of this series are created by algorithm (15), converges to solution of Hammerstein nonlinear integral equation (4) in Banach space \((C [a, b], ||f||_{\infty })\), if the following conditions are held,

  1. (i)

    Let \( k(\sigma ,\sigma '),\; \psi (\sigma ',f(\sigma '))\) and \(\nu _{1}(\sigma )\) functions are in C[ab] space and therefore \( \mid k(\sigma ,\sigma ')\mid \leqslant M.\)

  2. (ii)

    \(\psi (\sigma ,f(\sigma '))\) satisfy in Lipschitz condition respect to second component, \(\mid \psi (\sigma ,f(\sigma '))-\psi (\sigma ,g(\sigma '))\mid \le L \mid f(\sigma ')-g(\sigma '))\mid .\)

  3. (iii)

    \(0\leqslant \alpha =ML(b-a)<1.\)

Proof

According to series (8), we define sequence as,

$$\begin{aligned} S_{0}=\nu _{0}(\sigma ), \quad S_{1}=\sum _{j=0}^{1}\nu _{j}(\sigma ),\ldots ,\quad S_{n}=\sum _{j=0}^{n}\nu _{j}(\sigma ),\ldots \end{aligned}$$

then, with the help of jth step of algorithm (15), we can get

$$\begin{aligned} S_{n}&= {} \nu _{0}(\sigma )+\sum _{j=1}^{n}\nu _{j}(\sigma ), \nonumber \\&= {} \nu _{0}(\sigma )+\int _{a}^{b} k(\sigma ,\sigma ')\left( \sum _{j=1}^{n}A_{j-1}(\sigma ')\right) {\mathrm{d}}\sigma '. \end{aligned}$$
(17)

Now, we show that the above sequence is a Cuachy sequence in Banach space C[ab]. To this end \(\forall n,m \in {\mathbb {N}}; n>m\) and using (i) we have,

$$\begin{aligned} \Vert S_{n}- S_{m}\Vert &= {} \left\| \int _{a}^{b} k(\sigma ,\sigma ')\Big (\sum _{j=1}^{n}A_{j-1}(\sigma ')\right. \\&\left. -\sum _{j=1}^{m}A_{j-1}(\sigma ')\Big ){\mathrm{d}}\sigma '\right\| \\\le & {} M \left| \int _{a}^{b}\sum _{j=m}^{n-1}A_{j}(\sigma '){\mathrm{d}}\sigma ' \right| \\&= {} M \left| \int _{a}^{b}\Big (\sum _{j=0}^{n-1}A_{j}(\sigma ')-\sum _{j=0}^{m-1}A_{j}(\sigma ')\Big ){\mathrm{d}}\sigma ' \right| \end{aligned}$$

using (14) and (ii)–(iii),

$$\begin{aligned}&= {} M \left| \int _{a}^{b}\Big (\psi (\sigma ',\sum _{j=0}^{n-1}\nu _{j}(\sigma '))-\psi (\sigma ',\sum _{j=0}^{m-1}\nu _{j}(\sigma '))\Big ){\mathrm{d}}\sigma ' \right| \\&= {} M \left| \int _{a}^{b}\Big (\psi (\sigma ', S_{n-1})-\psi (\sigma ',S_{m-1})\Big ){\mathrm{d}}\sigma '\right| \\&= {} M\int _{a}^{b} L | S_{n-1}-S_{m-1} | {\mathrm{d}}\sigma '\\&\le {} M L (b-a)\parallel S_{n-1}-S_{m-1} \parallel \\&= {} \alpha \parallel S_{n-1}-S_{m-1} \parallel . \end{aligned}$$

Thus,

$$\begin{aligned} \parallel S_{n}-S_{m} \parallel \le \alpha \parallel S_{n-1}-S_{m-1} \parallel \le \cdots \le \alpha ^{m} \parallel S_{n-m}-S_{0} \parallel . \end{aligned}$$
(18)

In (18) we can choose \(n-m=1\) so,

$$\begin{aligned}&\parallel S_{n}-S_{n-1} \parallel \le \alpha ^{n-1} \parallel S_{1}-S_{0} \parallel \nonumber \\&\quad =\alpha ^{n-1} \parallel \nu _{1}\parallel = \alpha ^{n-1} \max _{a \leqslant \sigma \leqslant b} \mid \nu _{1}(\sigma )\mid , \end{aligned}$$
(19)

and consequently, \(\parallel S_{n-1}-S_{m-1} \parallel \rightarrow 0,\) as \(n\rightarrow \infty \) and easily \( S_{n} \) is a Cauchy sequence in Banach space C[ab], and then it converges to a function in this space, in other words,

$$\begin{aligned} \lim \limits _{n \rightarrow \infty }\sum _{j=0}^{n}\nu _{j}(\sigma )=\sum _{j=0}^{\infty }\nu _{j}(\sigma )=v^{*}_{j}(\sigma ). \end{aligned}$$

Now, we show that \(v^{*}_{j}(\sigma )\) satisfy in Eq. (4). Summation of both sides of algorithm (15) results in,

$$\begin{aligned}\sum _{j=0}^{n}\nu _{j}(\sigma )&=\int _{a}^{b} k(\sigma ,\sigma ')\sum _{j=0}^{n-1}A_{j}(\sigma '){\mathrm{d}}\sigma ' \\&\lim \limits _{n \rightarrow \infty }\sum _{j=0}^{n}\nu _{j}(\sigma )=\int _{a}^{b} k(\sigma ,\sigma ')\lim \limits _{n \rightarrow \infty }\sum _{j=0}^{n-1}A_{j}(\sigma '){\mathrm{d}}\sigma ' \\&v^{*}(\sigma )=\int _{a}^{b} k(\sigma ,\sigma ')\sum _{j=0}^{\infty }A_{j}(\sigma '){\mathrm{d}}\sigma ' \\& = \int _{a}^{b} k(\sigma ,\sigma ')\psi (\sigma ',\sum _{j=0}^{\infty }\nu _{j}(\sigma ')){\mathrm{d}}\sigma '\\& =\int _{a}^{b} k(\sigma ,\sigma ')\psi (\sigma ',v^{*}(\sigma ')){\mathrm{d}}\sigma '. \end{aligned}$$

Thus \(v^{*}(\sigma )=\sum _{j=0}^{\infty }\nu _{j}(\sigma )\) satisfied in Eq. (4), on the other hand, since (4) has unique solution, then \(v^{*}(\sigma )=f(\sigma ).\)\(\square \)

Application of proposed method and comparison with some other works

In this section, we solve two examples to show the applications of the above method.

Example 1

Consider the following cosmo-rs integral equation for a particular case of the energy expression, namely the electrostatic misfit energy [9],

$$\begin{aligned} f(\sigma )=\int ^{3}_{-3} p_{s}(\sigma ')(f(\sigma '))^{-1} \Omega (\sigma ,\sigma '){\mathrm{d}}\sigma ', \end{aligned}$$
(20)

where

$$\begin{aligned} p_{s}(\sigma )= \left\{ \begin{array}{ll} \exp \left\{ -(5\sigma +2.5)^{2}\right\} +\frac{1}{25\sigma ^{2}+1}+ \frac{\sin (5\sigma +2.5)^{2}}{(5\sigma -2.5)^{4}+1}+q(5\sigma ),&{}\quad -2\le \sigma \le 2 \\ \\ 0,&{} \quad o.w \end{array} \right. \end{aligned}$$
(21)

and

$$\begin{aligned} q(\sigma )&= {} \left\{ \begin{array}{ll} -(\sigma -7)(\sigma -9) &{} \quad 7\le \sigma \le 9\\ 0 &{} \quad o.w \end{array} \right. \end{aligned}$$
(22)
$$\begin{aligned} \Omega (\sigma ,\sigma ')&= {} \exp \left\{ -(\sigma +\sigma ')^{2}\right\} . \end{aligned}$$
(23)

So, we consider cosmo-rs integral equation as Hammerstein integral equation as follows:

$$\begin{aligned}&f(\sigma )- \int _{-2}^{2}\left[ \exp \left\{ -(5\sigma '+2.5)^{2}\right\} +\frac{1}{25\sigma '^{2}+1}\right. \nonumber \\&\quad \left. +\,\frac{(\sin (5\sigma ' +2.5))^{2}}{(5\sigma '-2.5)^{4}+1}\right] \frac{\exp \left\{ -(\sigma +\sigma ')^{2}\right\} }{f(\sigma ')} {\mathrm{d}}\sigma ' \nonumber \\&\quad -\,\int _{\frac{7}{5}}^{\frac{9}{5}}(-(5\sigma ' -7)(5\sigma ' -9)\frac{\exp \left\{ -(\sigma +\sigma ')^{2}\right\} }{f(\sigma ')} {\mathrm{d}}\sigma ' =0. \end{aligned}$$
(24)

assuming

$$\begin{aligned} k_{1}(\sigma ,\sigma ')&= {} \Big (\exp \left\{ -(5\sigma '+2.5)^{2}\right\} +\frac{1}{25\sigma '^{2}+1}\\&+\,\frac{(\sin (5\sigma ' +2.5))^{2}}{(5\sigma '-2.5)^{4}+1}\Big )\exp \left\{ -(\sigma +\sigma ')^{2} \right\} , \\ k_{2}(\sigma ,\sigma ')&= {} -(5\sigma ' -7)(5\sigma ' -9)\exp \left\{ -(\sigma +\sigma ')^{2}\right\} , \end{aligned}$$

we can rewrite the Hammerstein integral equation in the following form,

$$\begin{aligned}&f(\sigma )-\int _{-2}^{2}k_{1}(\sigma ,\sigma ')(f(\sigma '))^{-1}{\mathrm{d}}\sigma '\nonumber \\&\quad -\int _{\frac{7}{5}}^{\frac{9}{5}}k_{2}(\sigma ,\sigma ')(f(\sigma '))^{-1}{\mathrm{d}}\sigma '=0. \end{aligned}$$
(25)

According to the “Introducing an iterative algorithm” section , we can define the operators \(N_{1}\) and \(N_{2}\) as,

$$\begin{aligned} N_{1}(f(\sigma ))&= {} f(\sigma ), \nonumber \\ N_{2}(f(\sigma ))&= {} -\int _{-2}^{2}k_{1}(\sigma ,\sigma ')(f(\sigma '))^{-1}{\mathrm{d}}\sigma ' \nonumber \\&-\,\int _{\frac{7}{5}}^{\frac{9}{5}}k_{2}(\sigma ,\sigma ')(f(\sigma '))^{-1}{\mathrm{d}}\sigma '. \end{aligned}$$
(26)

because the function \(h(\sigma )=0\) in problem (20), by choosing \(h_{1}(\sigma )\) therefore \(h_{2}(\sigma )=0-h_{1}(\sigma )\) and also by replacing (26) and (8) in (7),

$$\begin{aligned}&\left( \sum _{i=0}^{\infty }p^{i}\nu _{i}(\sigma )-h(\sigma )\right) +\,p \left( -\int _{-2}^{2}k_{1}(\sigma ,\sigma ')\frac{1}{\sum _{i=0}^{\infty }p^{i}\nu _{i}(\sigma ')}{\mathrm{d}}\sigma '\right. \nonumber \\&\quad \left. -\,\int _{\frac{7}{5}}^{\frac{9}{5}}k_{2}(\sigma ,\sigma ')\frac{1}{\sum _{i=0}^{\infty }p^{i}\nu _{i}(\sigma ')}{\mathrm{d}}\sigma ' +h(\sigma )\right) =0. \end{aligned}$$
(27)

In the above process, to avoid the complex nonlinear terms, we use a linear combination of nonlinear Adomian polynomials,

$$\begin{aligned} \frac{1}{\sum _{i=0}^{\infty }p^{i}\nu _{i}(\sigma ')}=\sum _{i=0}^{\infty }p^{i}A_{i}(\sigma '), \end{aligned}$$
(28)

in which the Adomian polynomials are,

$$\begin{aligned} A_{i}(\sigma ')=\left( \frac{1}{i!}\frac{{\mathrm{d}}^{i}}{{\mathrm{d}}p^{i}}\left( \frac{1}{\sum _{i=0}^{\infty }p^{i}\nu _{i}(\sigma ')}\right) \right) _{p=0}. \end{aligned}$$
(29)

We put the relation (28) in (27),

$$\begin{aligned}&\left( \sum _{i=0}^{\infty }p^{i}\nu _{i}(\sigma )-h(\sigma )\right) +\,p (-\int _{-2}^{2}k_{1}(\sigma ,\sigma ')\sum _{i=0}^{\infty }p^{i}A_{i}(\sigma '){\mathrm{d}}\sigma ' \\&\quad -\,\int _{\frac{7}{5}}^{\frac{9}{5}}k_{2}(\sigma ,\sigma ')\sum _{i=0}^{\infty }p^{i}A_{i}(\sigma '){\mathrm{d}}\sigma ' +h(\sigma ))=0. \end{aligned}$$

By sorting the power of p,

$$\begin{aligned}&(\nu _{0}(\sigma )-h(\sigma )) +p (\nu _{1}(\sigma )-\int _{-2}^{2}k_{1}(\sigma ,\sigma ')A_{0}(\sigma '){\mathrm{d}}\sigma ' \\&\quad -\int _{\frac{7}{5}}^{\frac{9}{5}}k_{2}(\sigma ,\sigma ') A_{0}(\sigma '){\mathrm{d}}\sigma ' +h(\sigma ))+\cdots \\&\quad +\,p^{j} (\nu _{j}(\sigma )-\int _{-2}^{2}k_{1}(\sigma ,\sigma ')A_{j-1}(\sigma '){\mathrm{d}}\sigma '\\&\quad -\,\int _{\frac{7}{5}}^{\frac{9}{5}}k_{2}(\sigma ,\sigma ') A_{j-1}(\sigma '){\mathrm{d}}\sigma ' ) +\cdots =0 \end{aligned}$$

with equalling the coefficients of the power p to zero, we get the following iterative algorithm,

Algorithm 1

$$\begin{aligned} \nu _{0}(\sigma )&= {} h(\sigma ), \\ \nu _{1}(\sigma )&= {} \int _{-2}^{2}k_{1}(\sigma ,\sigma ')A_{0}(\sigma '){\mathrm{d}}\sigma '\\&+\,\int _{\frac{7}{5}}^{\frac{9}{5}}k_{2}(\sigma ,\sigma ') A_{0}(\sigma '){\mathrm{d}}\sigma '-h(\sigma ), \\ \nu _{j}(\sigma )&= {} \int _{-2}^{2}k_{1}(\sigma ,\sigma ')A_{j-1}(\sigma '){\mathrm{d}}\sigma '\\&+\,\int _{\frac{7}{5}}^{\frac{9}{5}}k_{2}(\sigma ,\sigma ') A_{j-1}(\sigma '){\mathrm{d}}\sigma '. \quad j\ge 2 \end{aligned}$$

An appropriate choice for \(\nu _{0}(\sigma )\) can be \(\nu _{0}(\sigma )=1\), thus \(A_{0}(\sigma ')=\frac{1}{\nu _{0}(\sigma ')}=1 \). To calculate the second step of the algorithm, we do, as follows, by simplifying \(\exp \left\{ (\sigma + \sigma ')^{2}\right\} \), and we apply the Maclaurin expansion for \(\exp \left\{ -2\sigma \sigma '\right\} \),

$$\begin{aligned} \exp \left\{ -2\sigma \sigma '\right\} \simeq \sum _{i=0}^{20} \frac{(-2\sigma \sigma ')^i}{i!}, \end{aligned}$$

thus the factor \(\exp \left\{ -\sigma ^{2} \right\} \) can come out from integration,

$$\begin{aligned}&\nu _{1}(\sigma )=\exp \left\{ -\sigma ^{2} \right\} \Big (\int _{-2}^{2} \exp \left\{ -(5\sigma '+2.5)^{2} \right\} \nonumber \\&\qquad \times \exp \left\{ -\sigma '^{2}\right\} \sum _{i=0}^{20} \frac{(-2\sigma \sigma ')^i}{i!}{\mathrm{d}}\sigma ' \nonumber \\&\qquad +\, \int _{-2}^{2}\frac{1}{25\sigma '^{2}+1} \exp \left\{ -\sigma '^{2}\right\} \sum _{i=0}^{20} \frac{(-2\sigma \sigma ')^i}{i!}{\mathrm{d}}\sigma ' \nonumber \\&\qquad +\,\int _{-2}^{2}\frac{(\sin (5\sigma ' +2.5))^{2}}{(5\sigma '-2.5)^{4}+1}\exp \left\{ -\sigma '^{2}\right\} \sum _{i=0}^{20} \frac{(-2\sigma \sigma ')^i}{i!}{\mathrm{d}}\sigma ' \nonumber \\&\qquad -\,\int _{\frac{7}{5}}^{\frac{9}{5}}(5\sigma ' -7)(5\sigma ' -9)\nonumber \\&\qquad \times \exp \left\{ -\sigma '^{2}\right\} \sum _{i=0}^{20} \frac{(-2\sigma \sigma ')^i}{i!}{\mathrm{d}}\sigma ' -\nu _{0}(\sigma )\Big ).\nonumber \\&\quad =-1+e^{ -\sigma ^{2}}\Big (1.0197 -0.00030637 \sigma \nonumber \\&\qquad +\,0.43956 \sigma ^2-0.094481\sigma ^3 \nonumber \\&\qquad +\,0.134337 \sigma ^4-0.0554104 \sigma ^5\nonumber \\&\qquad +\,0.0354431\sigma ^6-0.0138441\sigma ^7\Big ). \end{aligned}$$
(30)

We solve the rest of this example by Mathematica 11.2, where for computing of the above integrals, and we used cubic spline and normal series to approximate of \( \frac{1}{(5\sigma '-2.5)^{4}+1}\) and \((\sin (5\sigma ' +2.5))^{2}\) respectively. Thus we can give an approximation of solution of the electrostatic misfit energy (2023) by two first terms of series (8) as follows,

$$\begin{aligned} \nu (\sigma )&= {} \sum _{i=0}^{1}\nu _{i}(\sigma )\nonumber \\&= {} e^{ -\sigma ^{2}}\Big (1.0197 -0.00030637 \sigma \nonumber \\&+\,0.43956 \sigma ^2-0.094481\sigma ^3 \nonumber \\&+\,0.134337 \sigma ^4-0.0554104 \sigma ^5\nonumber \\&+\,0.0354431\sigma ^6-0.0138441\sigma ^7\Big ). \end{aligned}$$
(31)

Equation (31) is a closed form of the solution, but in [1] and other similar works, some points of solution were given. The plot corresponding to (31) is shown in Fig. 1,

Fig. 1
figure 1

Solution of Eq. (20)

Example 2

Consider the following nonlinear integral equation:

$$\begin{aligned} f(t)=g(t)+\int _{0}^{1}k(t,s)(f(s))^{-1}{\mathrm{d}}s, \end{aligned}$$
(32)

where

$$\begin{aligned} g(t)&= {} \frac{21-11 \exp \left\{ 10\right\} }{100} \exp \left\{ -10(1+t)\right\} +\frac{1}{1+t}, \\ k(t,s)&= {} \exp \left\{ -10(s+t)\right\} \rbrace , \end{aligned}$$

with the exact solution \(f(t)=\frac{1}{1+t}\).

For solving the example, we consider the following equation

$$\begin{aligned}&f(t)-\int _{0}^{1}\exp \left\{ -10(s+t)\right\} (f(s))^{-1}{\mathrm{d}}s\\&\quad -\frac{21-11 \exp \left\{ 10\right\} }{100} \exp \left\{ +10(1+t)\right\} -\frac{1}{1+t}=0. \end{aligned}$$

According to the definition of modified homotopy perturbation (7), we introduce \(N_{1}\) and \(N_{2}\) operators and h(t) to this form,

$$\begin{aligned} N_{1}(f(t))&= {} f(t),\nonumber \\ N_{2}(f(t))&= {} -\int _{0}^{1}\exp \left\{ -10(s+t)\right\} (f(s))^{-1}{\mathrm{d}}s\nonumber \\&-\,\frac{21-11 \exp \left\{ 10\right\} }{100}\exp \left\{ -10(1+t)\right\} ,\nonumber \\ h(t)&= {} \frac{1}{1+t}=h_{1}(t)+h_{2}(t). \end{aligned}$$
(33)

by substituting (33) and (8) into (7) and using Adomian polynomials, we can write

$$\begin{aligned}&\left( \sum _{i=0}^{\infty }p^{i}\nu _{i}(t)-h_{1}(t)\right) \\&\quad +\,p\left( -\int _{0}^{1}\exp \left\{ -10(s+t)\right\} \sum _{i=0}^{\infty }p^{i}A_{i}(s){\mathrm{d}}s\right. \\&\quad \left. -\,\frac{21-11 \exp \left\{ 10\right\} }{100} \exp \left\{ -10(1+t)\right\} \right. \\&\quad \left. -\,\frac{1}{1+t}+h_{1}(t)\right) =0, \end{aligned}$$

where Adomian polynomials are,

$$\begin{aligned} A_{i}(s)=\Big (\frac{1}{i!}\frac{{\mathrm{d}}^{i}}{{\mathrm{d}}p^{i}}\Big (\frac{1}{\sum _{i=0}^{\infty }p^{i}\nu _{i}(s)}\Big )\Big )_{p=0}. \end{aligned}$$
(34)

by sorting and putting the power of p equal to zero, we obtain the following algorithm,

Algorithm 2

$$\begin{aligned} \nu _{0}(t)&= {} h_{1}(t),\\ \nu _{1}(t)&= {} \int _{0}^{1}\exp \left\{ -10(s+t)\right\} A_{0}(s){\mathrm{d}}s\\&\quad +\,\frac{21-11 \exp \left\{ 10\right\} }{100} \exp \left\{ -10(1+t)\right\} \\&\quad +\, \frac{1}{1+t}-h_{1}(t),\\ \nu _{j}(t)&= {} \int _{0}^{1}\exp \left\{ -10(s+t)\right\} A_{j-1}(s){\mathrm{d}}s.\; j\ge 2 \end{aligned}$$

Now, we consider two cases:

Case 1 we assume \(h_{1}(t)=1\), according to the Algorithm 2 for three steps,

$$\begin{aligned} \nu _{0}(t)&= {} 1, \\ \nu _{1}(t)&= {} \int _{0}^{1}\exp \left\{ -10(s+t)\right\} A_{0}(s){\mathrm{d}}s\\&\quad +\,\frac{21-11 \exp \left\{ 10\right\} }{100} \exp \left\{ -10(1+t)\right\} \\&\quad +\, \frac{1}{1+t}-1 \\&= {} -1-0.00999501 \exp \left\{ -10t \right\} +\frac{1}{1+t}, \\ \nu _{2}(t)&= {} \int _{0}^{1}\exp \left\{ -10(s+t)\right\} A_{1}(s){\mathrm{d}}s \\&= {} 0.00893404 \exp \left\{ -10t \right\} . \end{aligned}$$

Now, we see

$$\begin{aligned} f(t)=\nu (t) \approx \sum _{i=0}^{2}\nu _{i}(t)=-0.00106096 \exp \left\{ -10t \right\} +\frac{1}{1+t}, \end{aligned}$$
(35)

By replacing the approximation of solution (35) in Eq. (32) and comparing the two both sides of it, we can show absolute errors in the some points of [0, 1] in Table 1,

Table 1 Absolute errors for Example 2 in the case 1

Case 2 we consider to h(t) as the initial guess of a solution, and so in Algorithm 2 for two steps, we obtain

$$\begin{aligned} \nu _{0}(t)&= {} \frac{1}{1+t}, \\ \nu _{1}(t)&= {} \int _{0}^{1}\exp \left\{ -10(s+t)\right\} A_{0}(s){\mathrm{d}}s\\&\quad +\,\frac{21-11 \exp \left\{ 10\right\} }{100} \exp \left\{ -10(1+t)\right\} =0,\\ \nu _{j}(t)&= {} 0, j\ge 2. \end{aligned}$$

Therefore, in this case, we have provided exact solution in a closed form as follows,

$$\begin{aligned} f(t)=\nu (t) \approx \sum _{i=0}^{\infty }\nu _{i}(t)=\frac{1}{1+t}. \end{aligned}$$
(36)

Although [1] and [9] have high accuracy, the closed form of the solution is not provided. Also we compare our result with [1, 9] and [14] in Table 2.

Table 2 Absolute errors for Example 2 in the case 2

Conclusion

In this paper, we solved the famous chemistry problem that led to the Hammerstein nonlinear integral equation by a modified homotopy perturbation method. We obtained a closed form of solution by converting the nonlinear problem into more simple linear problems and we produced an iterative algorithm with a highly accurate solution. Moreover, we presented another example to compare our method with some other techniques. As it can be seen in Table 2, our method led to the exact solution in this case. This method can be useful to solve other nonlinear integral equations especially those involved chemical and physical problems as well.