1 Introduction

Finding rapidly and accurately the zeros of nonlinear functions is a common problem in the field of computational mathematics. The subject of root-finding of nonlinear equations play a significant role in numerical analysis and optimization. We need fast iterative algorithms to approximate the solution of nonlinear equations arising from the application of shooting methods to solve boundary value problems. In this study, we consider iterative methods for solving a nonlinear equation \(f(x)=0,\) where f  : D \(\subseteq \mathbb {R}\) \(\rightarrow \) \(\mathbb {R}\) is a scalar function defined on an open interval D. Most solution methods for finding a solution \(\alpha \) of a nonlinear equation are iterative, since closed form solutions can be found only in special cases [124]. Newton’s method [22] is one of the most famous and basic method for solving such equations, which is given by

$$\begin{aligned} x_{n+1}=x_n-\frac{f(x_n)}{f'(x_n)}, \quad n=0,1,2, \ldots . \end{aligned}$$

It converges quadratically for simple roots and linearly for multiple roots. In order to improve the local order of convergence of Newton’s method, a number of modified methods have been developed and analyzed in the literature, see for example [120] and references therein. The most efficient existing root-solvers are based on multipoint iteration techniques since they overcome the theoretical limitations of one-point methods regarding their convergence order and computational efficiency. Kung and Traub [10] conjectured that convergence order of any multipoint method without memory consuming n functional evaluations can not exceed the upper bound \(2^{n-1}\). Multipoint methods with this property are usually called optimal methods. Therefore, optimal efficiency index [22] of an iterative method is defined by \(E=p^{1/d}\), where p denotes the order of convergence and d is the total number of function evaluations required per full iteration. King’s family [9] and Ostrowski’s method [12] are one of the most efficient fourth-order multipoint iterative methods without memory. In spite of being optimal, they require the evaluation of first order derivative at one or two points and hence cannot be applied to non-smooth functions. However, there are many practical situations in which the calculations involving derivatives is very expensive from computational point of view. Therefore, the idea of removing derivatives from the iteration process is very significant. Recently, many researchers have developed the idea of removing derivatives from the iteration function in order to avoid defining new functions such as the first or second derivative, and calculate iterates only by using the function that describes the problem, and obviously trying to preserve the order of convergence. In particular, when the first-order derivative \(f'(x_n)\) in Newton’s method is replaced by forward-difference approximation \(\frac{f(x_n+f(x_n))-f(x_n)}{f(x_n)}\), we get the well-known Steffensen’s method [17] as follows:

$$\begin{aligned} x_{n+1}=x_n-\frac{f(x_n)}{f[x_n, u_n]}, \end{aligned}$$

where \(u_n=x_n+f(x_n)\) and \(f[\cdot , \cdot ]\) denotes the first order divided difference. As a matter of fact, both methods maintain quadratic convergence using only two functional evaluations per full step, but Steffensen method is derivative free, which is very useful in optimization problems. Therefore, many higher-order derivative-free methods are built according to the Steffensen’s method, see [3, 7, 14, 1921, 24] and references therein. In this paper, we intend to propose two optimal eighth-order derivative-free families of King’s and Ostrowski’s methods requiring only four function evaluations, viz., \(f(x_n),~f(w_n),~f(y_n),~\text {and}~f(z_n)\) per full iteration. Both families are constructed by using different type of weight functions and consequently, they can be applied to solve non-smooth functions. All the proposed methods considered here are found to be more effective and comparable to the existing robust methods available in literature.

2 A new Steffensen-Ostrowski type family with optimal order of convergence

In this section, we intend to derive a new eighth-order derivative-free optimal family based on Ostrowski’s method. For this, we consider a three-step iteration scheme as follows:

$$\begin{aligned} \left\{ \begin{array}{ll} &{}y_n=x_n-\frac{f(x_n)}{f'(x_n)},\\ &{}z_n=y_n-\frac{f(y_n)}{2f[y_n,x_n]-f'(x_n)},\\ &{}x_{n+1}=z_n-\frac{f(z_n)}{f'(z_n)},\\ \end{array} \right. \end{aligned}$$
(2.1)

where first two steps of well-known Ostrowski’s method are composed with the Newton step. The above method is not optimal according to the Kung-Traub conjecture, because it has eighth-order convergence and requires five functional evaluations per full iteration. However, we can reduce the number of function evaluations by using some suitable approximations of derivatives that use available data. Following Cordero-Torregrosa conjecture [3], we approximate

$$\begin{aligned} \left\{ \begin{array}{ll} &{}f'(x_n)\approx f[x_n,w_n],\\ &{}f'(z_n)\approx f[y_n,z_n]+f[w_n,y_n,z_n](z_n-y_n),\\ \end{array} \right. \end{aligned}$$
(2.2)

\(\text {where}~ w_n=x_n+\beta f(x_n)^3 ,~ \beta \in \mathbb {R}\backslash \{0\}\) and f[xy],  f[xyz] denote the first and second order divided differences (without index n), respectively.

Substituting the approximations (2.2) in (2.1), we get

$$\begin{aligned} \left\{ \begin{array}{ll} &{}y_n=x_n-\frac{f(x_n)}{ f[x_n,w_n]},\\ &{}z_n=y_n-\frac{f(y_n)}{2f[y_n,x_n]- f[x_n,w_n]},\\ &{}x_{n+1}=z_n-\frac{f(z_n)}{ f[y_n,z_n]+f[w_n,y_n,z_n](z_n-y_n)}.\\ \end{array} \right. \end{aligned}$$
(2.3)

It satisfies the following error equation

$$\begin{aligned} e_{n+1}=&\frac{c_2^2 c_3 \left( -c_2^2+c_1 c_3\right) e_n^7}{c_1^5}+\frac{c_2 \left( c_2^6+4 c_1 c_2^4 c_3+c_1^2 c_2^2 \left( \beta c_1^4-11 c_3\right) c_3+4 c_1^3 c_3^3-c_1^2 c_2^3 c_4+3 c_1^3 c_2 c_3 c_4\right) e_n^8}{c_1^7}+O(e_n^9). \end{aligned}$$

Again, the above method is not optimal according to the Kung-Traub conjecture. To this end, by introducing a two-variable weighting function in the third step of (2.3), we propose a higher-order family of three-point methods in the following form:

$$\begin{aligned} \left\{ \begin{array}{lll} &{}y_n=x_n-\frac{f(x_n)}{ f[x_n, w_n]}, \quad w_n=x_n+\beta f(x_n)^3 ,\\ &{}z_n=y_n-\frac{f(y_n)}{2f[y_n,x_n]- f[x_n,w_n]} ,\\ &{}x_{n+1}=z_n-\frac{f(z_n)}{ f[y_n,z_n]+f[w_n,y_n,z_n](z_n-y_n)}H(\tau , \phi ), \\ \end{array} \right. \end{aligned}$$
(2.4)

where \(\beta \in \mathbb {R}\backslash \{0\}\) and \(H:\mathbb {C}^2\rightarrow \mathbb {C}\) is an analytic function in the neighborhood of (0,0) with \( \tau =\frac{f(z_n)}{f(y_n)}=O(e_n^2),~\phi =\frac{f(y_n)}{f(x_n)}=O(e_n)\). If we closely examine the relation \(w_n=x_n+\beta f (x_n)^3\) in (2.4), we find that \(f (x_n)^3\) becomes smaller than \(f (x_n)\) near the root. As a consequence, \(y_n\) rapidly approaches \(x_n\), provided \(\beta \) is kept fixed. Theorem 1 illustrates that under what conditions on weight function, convergence order of three-step family (2.4) will arrive at the optimal level eight.

Theorem 1

Assume that function \(f: D \subseteq \mathbb {R} \rightarrow \mathbb {R} \) is sufficiently differentiable and f has a simple zero \(\alpha \in D\). If an initial guess \(x_0\) is sufficiently close to \(\alpha \in D\), then the iterative three-step class of methods (2.4) is of optimal order eight when

$$\begin{aligned} \left\{ \begin{array}{ll} &{}H_{00}=H_{11}=1, H_{10}=H_{01}=H_{02}=0, \\ &{}H_{03}=-6, H_{12}=-16, H_{20}=10, \end{array} \right. \end{aligned}$$
(2.5)

where \(H_{ij}=\left[ \frac{1}{i!j!} \frac{\partial H(\tau ,\phi )}{\partial \tau ^{i}\phi ^{j}}\right] _{(0,0)}, ~\text {i, j}=0,1,2,3.\)

It satisfies the following error equation

$$\begin{aligned} e_{n+1}=\frac{c_2 \left( c_2^2-c_1 c_3\right) \left( \beta c_1^3 c_2^2-5 c_3^2+c_2 c_4\right) e_n^8}{c_1^5}+O(e_n^9), \end{aligned}$$
(2.6)

where \(e_n=x_n-\alpha ~~\text {and} ~ c_j=\frac{f^{(j)}(\alpha )}{j!},~~j=1,2,3,\ldots \).

Proof

Using Taylor’s series and symbolic computation, we can determine the asymptotic error constant of family (2.4). Furthermore, taking into account that \(f(\alpha )=0,\) we can expand \(f(x_n)\) around the simple zero \(\alpha \). Therefore, we get,

$$\begin{aligned} f(x_n)=c_1e_n+c_2e_n^2+c_3e_n^3+c_4e_n^4+c_5e_n^5+c_6e_n^6+c_7e_n^7+c_8e_n^8+O(e_n^9) \end{aligned}$$
(2.7)

and

$$\begin{aligned} f(w_n)=c_1b_n+c_2b_n^2+c_3b_n^3+c_4b_n^4+c_5b_n^5+c_6b_n^6+c_7b_n^7+c_8b_n^8+O(b_n^9), \end{aligned}$$
(2.8)

where \(e_n=x_n-\alpha \) and \(b_n=w_n-\alpha \).

Hence, substituting (2.7) and (2.8) in the first step of (2.4), we get

$$\begin{aligned} y_n-\alpha =\frac{c_2 e_n^2}{c_1}+\frac{2 \left( -c_2^2+c_1 c_3\right) e_n^3}{c_1^2}+\left( \frac{c_2 \left( \beta c_1^5+4 c_2^2-7 c_1 c_3\right) }{c_1^3}+\frac{3 c_4}{c_1}\right) e_n^4+O(e_n^5)\nonumber \\ \end{aligned}$$
(2.9)

and in the combination of Taylor series expansion of \(f\left( x_n-\frac{f(x_n)}{f[x_n,w_n]}\right) \) about \(x_n=\alpha \), we have

$$\begin{aligned} f(y_n)=f\left( x_n-\frac{f(x_n)}{f[x_n,w_n]}\right)&=c_2e_n^2+(\frac{-2c_2^2}{c_1}+2c_3)e_n^3+\cdots +O(e_n^9). \end{aligned}$$
(2.10)

Furthermore, we have

$$\begin{aligned} \phi =\frac{f(y_n)}{f(x_n)}=\frac{c_2 e_n}{c_1}+\frac{\left( -3 c_2^2+2 c_1 c_3\right) e_n^2}{c_1^2}+\frac{\left( \beta c_1^5 c_2+8 c_2^3-10 c_1 c_2 c_3+3 c_1^2 c_4\right) e_n^3}{c_1^3}+\cdots +O(e_n^9) \end{aligned}$$
(2.11)

and for the second substep of (2.4), we get

$$\begin{aligned} z_n-\alpha =\frac{\left( c_2^3-c_1 c_2 c_3\right) e_n^4}{c_1^3}-\frac{\left( \beta c_1^5 c_2^2+4 c_2^4-8 c_1 c_2^2 c_3+2 c_1^2 \left( c_3^2+c_2 c_4\right) \right) e_n^5}{c_1^4}+\cdots +O(e_n^9). \end{aligned}$$
(2.12)

Moreover, we find

$$\begin{aligned} f(z_n)=\frac{\left( c_2^3-c_1 c_2 c_3\right) e_n^4}{c_1^2}-\frac{\left( \beta c_1^5 c_2^2+4 c_2^4-8 c_1 c_2^2 c_3+2 c_1^2 \left( c_3^2+c_2 c_4\right) \right) e_n^5}{c_1^3}+\cdots +O(e_n^9) \end{aligned}$$
(2.13)

and

(2.14)

Since, it is clear from (2.11) and (2.14) that \(\phi \) and \(\tau \) are of order \(e_n\) and \(e_n^2\), respectively. Therefore, we can expand weight function \(H(\tau , \phi )\) in the neighborhood of origin by Taylor series expansion up to third order terms as follows:

$$\begin{aligned} H(\tau , \phi )= & {} H_{00}+H_{10}\tau +H_{01}\phi +\frac{1}{2!}\left( H_{20}\tau ^2+2H_{11}\tau \phi +H_{02}\phi ^2\right) \nonumber \\&+\frac{1}{3!}\left( H_{30}\tau ^3+3H_{21}\tau ^2 \phi +3H_{12}\tau \phi ^2+H_{03}\phi ^3\right) . \end{aligned}$$
(2.15)

Using (2.11), (2.13), (2.14) and (2.15) in the last step of (2.4) yields

$$\begin{aligned} e_{n+1}= & {} \frac{(-1+H_{00}) c_2 \left( -c_2^2+c_1 c_3\right) e_n^4}{c_1^3}\nonumber \\&+\frac{\left( \beta (-1+H_{00}) c_1^5 c_2^2+(-4+4 H_{00}-H_{01}) c_2^4+(8-8 H_{00}+H_{01}) c_1 c_2^2 c_3+2 (-1+H_{00}) c_1^2 \left( c_3^2+c_2 c_4\right) \right) e_n^5}{c_1^4}\nonumber \\&+\cdots +O(e_n^9). \end{aligned}$$
(2.16)

This implies that the derivative free class of methods arrives at eighth-order of convergence by choosing the weight function as follows:

$$\begin{aligned} \left\{ \begin{array}{ll} &{}H_{00}=H_{11}=1, H_{10}=H_{01}=H_{02}=0, \\ &{}H_{03}=-6, H_{12}=-16, H_{20}=10. \end{array} \right. \end{aligned}$$
(2.17)

Finally, using (2.17) in (2.16), we get the following error equation

$$\begin{aligned} \begin{array}{ll} e_{n+1}=\frac{c_2 \left( c_2^2-c_1 c_3\right) \left( \beta c_1^3 c_2^2-5 c_3^2+c_2 c_4\right) e_n^8}{c_1^5}+O(e_n^9). \end{array} \end{aligned}$$

This reveals that the three-step derivative-free class (2.4) reaches the optimal convergence order eight by using only four functions evaluations per full iteration. \(\square \)

Table 1 Some particular types of weight functions \(H(\tau ,\phi ),P(t) ~\text {and}~ Q(s)\),  where,  \(\mu ,~\nu ,\omega ,~\eta ,~\eta _1,~\eta _2, \gamma \in \mathbb {R}\)

Note that some particular forms of different weight functions satisfying the above conditions (2.17) are displayed in Table 1. Finally, implementing the conditions on weight function as given in Theorem 1, we get the most simplest case of our three-step optimal eighth-order derivative-free class as follows:

$$\begin{aligned} \left\{ \begin{array}{lll} &{}y_n=x_n-\frac{f(x_n)}{ f[x_n, w_n]}, \quad w_n=x_n+\beta f(x_n)^3 , \beta \in \mathbb {R}\backslash \{0\},\\ &{}z_n=y_n-\frac{f(y_n)}{2f[y_n,x_n]- f[x_n,w_n]} ,\\ &{}x_{n+1}=z_n-\frac{f(z_n)}{ f[y_n,z_n]+f[w_n,y_n,z_n](z_n-y_n)}\left\{ 1\!-\!\left( \frac{ f(y_n)}{f(x_n)}\right) ^3-8\frac{ f(y_n)f(z_n) }{f(x_n)^2}+ \frac{ f(z_n)}{f(x_n)}+5\left( \frac{ f(z_n)}{f(y_n)}\right) ^2\right\} . \end{array} \right. \nonumber \\ \end{aligned}$$
(2.18)

It satisfies the following error equation

$$\begin{aligned} e_{n+1}=\frac{c_2 \left( c_2^2-c_1 c_3\right) \left( \beta c_1^3 c_2^2-5 c_3^2+c_2 c_4\right) e_n^8}{c_1^5}+O(e_n^9). \end{aligned}$$

3 A new Steffensen-King’s type family with optimal order of convergence

Now, we extend the idea of previous section to King’s family schemes, which contains Ostrowski’s method for a specific value of the parameter. Here, we use the same approximations for the first order derivatives as given in (2.2) to obtain a parametric family of optimal derivative-free methods of order eight. Therefore, we suggest a more general class of eighth-order Steffensen-King’s type methods without memory as follows:

$$\begin{aligned} \left\{ \begin{array}{lll} &{}y_n=x_n-\frac{f(x_n)}{ f[x_n, w_n]}, \quad w_n=x_n+\beta f(x_n)^3 ,~~\beta \in \mathbb {R}\backslash \{0\}, \\ &{}z_n=y_n-\frac{f(x_n)+\gamma f(y_n)}{f(x_n)+(\gamma -2) f(y_n)}\frac{f(y_n)}{f[x_n,w_n]} ,\\ &{}x_{n+1}=z_n-\frac{f(z_n)}{ f[y_n,z_n]+f[w_n,y_n,z_n](z_n-y_n)}\left\{ P(t)+Q (s)\right\} , \quad t=\frac{f(z_n)}{f(x_n)},~~s=\frac{f(y_n)}{f(x_n)}, \\ \end{array} \right. \end{aligned}$$
(3.1)

where \(\gamma \) is a free disposable parameter and P(t) and Q(s) are two single variable real-valued weight functions such that its order of convergence reaches at the optimal level eight without using any more functional evaluations. Theorem 2 illustrates that under what conditions on weight functions, convergence order of three-step derivative-free family (3.1) will arrive at the optimal level.

Theorem 2

Assume that function \(f: D \subseteq \mathbb {R} \rightarrow \mathbb {R} \) is sufficiently differentiable and f has a simple zero \(\alpha \in D\). If an initial guess \(x_0\) is sufficiently close to \(\alpha \in D\), then the iterative three-step class of methods (3.1) is of optimal order eight when

$$\begin{aligned}&P(0)=1-Q(0), Q'(0)=Q''(0)=0, P'(0)=1,\nonumber \\&Q'''(0)=-6-12\gamma , |P''(0)|\le \infty , |Q^{(4)}(0)|\le \infty . \end{aligned}$$
(3.2)

It satisfies the following error equation

$$\begin{aligned} e_{n+1}= & {} \frac{c_2^2 \left( (1+2 \gamma ) c_2^2-c_1 c_3\right) \left( 24 \beta c_1^5 c_2+\left( -72-48 \gamma +48 \gamma ^2-Q^{(4)}(0)\right) c_2^3-48 c_1 c_2 c_3+24 c_1^2 c_4\right) e_n^8}{24 c_1^7}\nonumber \\&\quad +O(e_n^9), \end{aligned}$$
(3.3)

Proof

The proof is similar to the proof of Theorem 1. Hence, it is omitted here. \(\square \)

4 Special cases

Now, applying the conditions on weight functions according to Theorem 2, we can build different three-step optimal eighth-order iteration schemes of King’s type which are totally free from derivatives. Some easy to implement methods of our proposed class (3.1) are given below:

$$\begin{aligned} \left\{ \! \begin{array}{llll} &{}y_n=x_n-\frac{f(x_n)}{ f[x_n, w_n]}, \quad w_n=x_n+\beta f(x_n)^3 ,~~\beta \in \mathbb {R}\backslash \{0\}, \\ &{}z_n=y_n-\frac{f(x_n)+\gamma f(y_n)}{f(x_n)+(\gamma -2) f(y_n)}\frac{f(y_n)}{f[x_n,w_n]} ,\\ &{}x_{n+1}=z_n-\frac{f(z_n)}{ f[y_n,z_n]+f[w_n,y_n,z_n](z_n-y_n)}\left\{ \mu \left( \frac{f(z_n)}{f(x_n)}\right) ^2+\frac{f(z_n)}{f(x_n)}+ \left( -1-2\gamma \right) \left( \frac{f(y_n)}{f(x_n)}\right) ^3+1\right\} , \\ \end{array} \right. \nonumber \\ \end{aligned}$$
(4.1)

where \(\mu \) and \(\gamma \) are free disposable parameters. This is a new optimal eighth-order derivative-free family of King’s method. It satisfies the following error equation

$$\begin{aligned} e_{n+1}=\frac{c_2^2 \left( (1+2 \gamma ) c_2^2-c_1 c_3\right) \left( \beta c_1^5 c_2+\left( -3-2 \gamma +2 \gamma ^2\right) c_2^3-2 c_1 c_2 c_3+c_1^2 c_4\right) e_n^8}{c_1^7}+O(e_n^9). \end{aligned}$$

It is interesting to note that one can easily get many new higher order iteration schemes of King’s type methods by choosing different values of the disposable parameters \(\beta \), \(\gamma \) and \(\mu \).

4.1 Sub special cases

(i) For \(\gamma =0\), family (4.1) reads as

$$\begin{aligned} \left\{ \begin{array}{ll} &{}y_n=x_n-\frac{f(x_n)}{ f[x_n, w_n]}, \quad w_n=x_n+\beta f(x_n)^3 ,~~\beta \in \mathbb {R}\backslash \{0\}, \\ &{}z_n=y_n-\frac{f(x_n)}{f(x_n)-2 f(y_n)}\frac{f(y_n)}{f[x_n,w_n]} ,\\ &{}x_{n+1}=z_n-\frac{f(z_n)}{ f[y_n,z_n]+f[w_n,y_n,z_n](z_n-y_n)}\left\{ \mu \left( \frac{f(z_n)}{f(x_n)}\right) ^2+\frac{f(z_n)}{f(x_n)}-\left( \frac{f(y_n)}{f(x_n)}\right) ^3+1\right\} .\\ \end{array} \right. \end{aligned}$$
(4.2)

This is a new modified optimal eighth-order Steffensen-King’s type family. It satisfies the following error equation

$$\begin{aligned} e_{n+1}=-\frac{c_2^2 \left( -c_2^2+c_1 c_3\right) \left( \beta c_1^5 c_2-3 c_2^3-2 c_1 c_2 c_3+c_1^2 c_4\right) e_n^8}{c_1^7}+O(e_n^9). \end{aligned}$$

(ii) For \(\gamma =-\frac{1}{2}\), family (4.1) reads as

$$\begin{aligned} \left\{ \begin{array}{lll} &{}y_n=x_n-\frac{f(x_n)}{ f[x_n, w_n]}, \quad w_n=x_n+\beta f(x_n)^3 ,~~\beta \in \mathbb {R}\backslash \{0\}, \\ &{}z_n=y_n-\frac{2f(x_n)-f(y_n)}{2f(x_n)-5f(y_n)}\frac{f(y_n)}{f[x_n,w_n]} ,\\ &{}x_{n+1}=z_n-\frac{f(z_n)}{ f[y_n,z_n]+f[w_n,y_n,z_n](z_n-y_n)}\left\{ \mu \left( \frac{f(z_n)}{f(x_n)}\right) ^2+\frac{f(z_n)}{f(x_n)}+1 \right\} . \\ \end{array} \right. \end{aligned}$$
(4.3)

This is another optimal eighth-order Steffensen-King’s type family of King’s method. It satisfies the following error equation

$$\begin{aligned} e_{n+1}=\frac{c_2^2 c_3 \left( -2\beta c_1^5 c_2+3 c_2^3+4 c_1 c_2 c_3-2 c_1^2 c_4\right) e_n^8}{2 c_1^6}+O(e_n^9). \end{aligned}$$

Remark 1

Note that the scheme (4.1) can produce many more new optimal derivative-free families of King’s and Ostrowski’s method for simple roots by choosing different kind of weight functions as given in Table 1 and different values of free disposable parameters. The beauty of this modified Steffensen-King’s scheme is that it has optimal eighth-order convergence, in spite of being derivative-free . Therefore, these techniques can be used as an alternative to King’s and Ostrowski’s techniques or in the cases where King’s and Ostrowski’s techniques are not successful.

Table 2 Comparison of different eighth-order methods for test function \(f_1(x)\)
Table 3 Comparison of different eighth-order methods for test function \(f_2(x)\)
Table 4 Comparison of different eighth-order methods for test function \(f_3(x)\)
Table 5 Comparison of different eighth-order methods for test function \(f_4(x)\)
Table 6 Comparison of different eighth-order methods for test function \(f_5(x)\)
Table 7 Comparison of different eighth-order methods for test function \(g_1(x)\)
Table 8 Comparison of different eighth-order methods for test function \(g_2(x)\)

5 Numerical examples and conclusion

In this section, we shall check the effectiveness of the new optimal methods. We employ the presented methods (2.18), (4.2), (4.3) denoted by \(SOM^1_8\), \( SKM^1_8\), \( SKM^2_8\) (for \(\beta =0.001\)) respectively to solve some nonlinear equations. Comparison of different eighth-order derivative-free iterative methods with respect to the same number of iterations (TNE=12) is provided in Tables 2, 3, 4, 5, 6 7, 8. All computations have been performed using the programming package Mathematica  9 with multiple precision arithmetic. We use \(\epsilon =10^{-35}\) as a tolerance error. We are going to use the following test functions, the first five ones are smooth functions and the other are non-smooth ones.

$$\begin{aligned} f_1(x)= & {} (x-1)^3-1,~~\alpha =2,~~x_0=1.8 \\ f_2(x)= & {} \exp {(-x)}+\sin x -2,~~\alpha =-1.05412 \ldots ,~~x_0=-1.3\\ f_3(x)= & {} \sin ^2 x-x^2+1,~~\alpha =1.4044916 \ldots ,~~x_0=1.8\\ f_4(x)= & {} \exp {(x^2+x\cos x-1)}\sin {\pi x}+x\log {(x\sin x+1)},~~\alpha =0,~x_0=0.6\\ f_5(x)= & {} \log {(x^2-2x+2)}+e^{x^2-5x+4}\sin {x-1},~~\alpha =1,~x_0=1.35\\ g_1(x)= & {} |x^2-4|,~~\alpha =2,~x_0=2.55\\ g_2(x)= & {} {\left\{ \begin{array}{ll} x(x-1)&{} \text{ if }~~ x\le 0\\ -2x(x+1)&{} \text{ if }~~ x\ge 0, \quad \alpha =0,~x_0=0.5. \end{array}\right. } \end{aligned}$$

For demonstration, we have compared our new proposed schemes with the different eighth-order methods given below:

Concrete Method 1 The method by Kung and Traub, see [10], denoted by \(KTM_8\), is

$$\begin{aligned} \left\{ \begin{array}{ll} y_n&{}=x_n+\beta f(x_n), \quad \quad \beta \in \mathbb {R}\backslash \{0\}\\ z_n&{}=y_n-\beta \frac{f(x_n)f(y_n)}{f(y_n)-f(x_n)},\\ w_n&{}=z_n-\frac{f(x_n)f(y_n)}{f(z_n)-f(x_n)}\left[ \frac{1}{ f[y_n, x_n]}-\frac{1}{ f[z_n, y_n]}\right] , \\ x_{n+1}&{}=z_n-\frac{f(x_n)f(y_n)f(z_n)}{f(w_n)-f(x_n)}\left[ \frac{1}{ f[y_n, x_n]}\left\{ \frac{1}{ f[w_n, z_n]}-\frac{1}{ f[z_n, y_n]}\right\} \right. \\ &{}\left. \quad -\frac{1}{ f[z_n, x_n]}\left\{ \frac{1}{ f[z_n, y_n]}-\frac{1}{ f[y_n, x_n]}\right\} \right] . \end{array} \right. \end{aligned}$$
(5.1)

Concrete Method 2 The method by M. Sharifi et al., see [16], denoted by \(MSM_8\), is

$$\begin{aligned} \left\{ \begin{array}{lll} &{}y_n=x_n-\frac{f(x_n)}{ f[x_n, w_n]}, \quad w_n=x_n+ \beta f(x_n)^3 ,\\ &{}z_n=x_n-\left( \frac{f(x_n)f(x_n)}{ f[x_n, w_n](f(x_n)-f(y_n))}\right) \times \left( 1+\left( \frac{f(y_n)}{f(x_n)}\right) ^2+3\left( \frac{f(y_n)}{f(x_n)}\right) ^3\right) , \\ &{}x_{n+1}=z_n-\frac{f(z_n)}{ f[z_n, y_n]+\phi _{z_n,x_n,x_n}(z_n-y_n)}\left[ 1+2\frac{f(z_n)}{f(x_n)}-18\left( \frac{f(y_n)}{f(x_n)}\right) ^4+\left( \frac{f(z_n)}{f(y_n)}\right) ^3 \right] . \end{array} \right. \end{aligned}$$
(5.2)

Concrete Method 3 The method by Soleymani, see [20], denoted by \(SM_8\), is

$$\begin{aligned} \left\{ \begin{array}{ll} &{}y_n=x_n-\frac{f(x_n)}{f'(x_n)} ,\\ &{}z_n=y_n-\frac{f(y_n)}{ 2f[y_n, x_n]-f'(x_n)}, \\ &{}x_{n+1}=z_n-\frac{f(z_n)}{ 2f[y_n, x_n]-f'(x_n)+f(z_n,x_n,x_n)(z_n-y_n)}\left[ 1+\frac{f(z_n)}{f(y_n)}+2\frac{f(z_n)}{f(x_n)}-2\left( \frac{f(y_n)}{f(x_n)}\right) ^3 \right] . \end{array} \right. \end{aligned}$$
(5.3)

Concrete Method 4 The method by Zheng et al., see [24], denoted by \(ZM_8\), is

$$\begin{aligned} \left\{ \begin{array}{lll} &{}y_n=x_n-\frac{f(x_n)}{ f[x_n, w_n]}, \quad w_n=x_n+\beta f(x_n) ,\\ &{}z_n=y_n-\frac{f(y_n)}{ f[x_n, y_n]+f[y_n, w_n]-f[x_n, w_n]}, \\ &{}x_{n+1}=z_n-\frac{f(z_n)}{ f[z_n, y_n]+f[z_n, x_n,x_n](z_n-y_n)+f[z_n, y_n,x_n,w_n](z_n-y_n)(z_n-x_n)}. \end{array} \right. \end{aligned}$$
(5.4)

The errors of approximations to the corresponding zeros of test functions are displayed in Tables 2, 3,4, 5, 6 7, 8, where \(A(-h)\) denotes \( A \times 10^{-h}\) and \(\mathbf {D}\) stands for divergent. On the accounts of results obtained in the Tables 2, 3,4, 5, 6 7, 8 it can be concluded that the proposed methods are highly efficient as compared to the existing robust methods, when the accuracy is tested in the multi-precision digits.

Remark 2

Similar numerical experiments have been performed on various test problems by selecting different values for the free non-zero parameter \(\beta \). We observe that the convergence behavior is better using values of \(\beta \) close to zero, as the estimation of the derivative is more precise in this case. Also, from the Taylor’s expansions of the first-order divided difference and the derivative about the solution \(\alpha \) of nonlinear equation \(f(x)=0\), we obtain

$$\begin{aligned} f'(x_n)&= c_1+2c_2e_n+3e_n^2c_3+4e_n^3c_4+5e_n^4c_5+6e_n^5c_6+\cdots ,\nonumber \\ f[x_n,w_n]&=\frac{f(w_n)-f(x_n)}{w_n-x_n}=c_1+2c_2e_n+3c_3e_n^2+(\beta c_1^3c_2+4c_4)e_n^3\nonumber \\&\quad +(3\beta c_1^2c_2^2+3\beta c_1^3c_3+5c_5)e_n^4 \nonumber \\&\quad +3(\beta c_1c_2^3+4\beta c_1^2c_2c_3+2\beta c_1^3c_4+2c_6)e_n^5+\cdots , \end{aligned}$$
(5.5)

where \(w_n=x_n+\beta f(x_n)^3\). Note that as \(\beta \rightarrow 0\), both Taylor expansions coincide. For more details, see [8].

6 Basins of attractions of different eighth-order derivative-free methods

Studying the dynamical behavior, using basins of attractions, of the rational functions associated to an iterative method gives important information about the convergence and stability of the scheme. Therefore, we investigate here the comparison of the attained simple root finders in the complex plane using the idea of basins of attraction. The basin of attraction is a method to visually comprehend how an algorithm behaves as a function of the various starting points. In other words, it tells us how demanding is the method on the initial approximation of the root. In the literature, a number of iterative root-finding methods were compared from a dynamical point of view by Amat et al. [1, 2], Neta et al. [11], Scott et al. [15], Stewart [18], Vrscay and Gilbert [23]. To this end, some basic concepts are briefly recalled. Given a rational map \( \psi : \mathbb {\hat{C}}\rightarrow \mathbb {\hat{C}}\) , where \(\mathbb {\hat{C}}\) is the Reimann sphere, the orbit of a point \(z_0 \in \mathbb {\hat{C}}\) is defined as\(:\)

$$\begin{aligned} \{z_0, \psi (z_0), \psi ^2(z_0),\ldots , \psi ^n(z_0),\ldots \}. \end{aligned}$$

A point \(z_0 \in \mathbb {\hat{C}}\) is called periodic point with minimal period m if \(\psi ^{m}(z_0) = z_0\), where m is the smallest integer with this property. A periodic point with minimal period 1 is called fixed point. Moreover, a point \(z_0\) is called attracting if \(|\psi '(z_0)| < 1\), repelling if \(|\psi '(z_0)| > 1\), and neutral otherwise. The Julia set of a nonlinear map \(\psi (z)\), denoted by \(J(\psi )\), is the closure of the set of its repelling periodic points. The complement of \(J(\psi )\) is the Fatou set \(F(\psi )\), where the basins of attraction of the different roots lie. From the dynamical point of view, we take a \(250 \times 250\) grid of the square \(D=[-4,4]\times [-4,4]\in \mathbb {C}\) and we assign a color to each point \(z_0\in D\) according to the simple root at which the corresponding iterative method starting from \(z_0\) converges, and we mark the point as black if the method does not converge. In this section, we consider the stopping criterion for convergence to be less than \(10^{-3}\), wherein the maximum number of full cycles for each method is considered to be 150. In this way, we distinguish the attraction basins by their colors for different methods. We have compared our newly developed methods (4.1) with different values of free disposable parameters denoted by \(MM_8^1\), \(MM_8^2\) and \(MM_8^3\), respectively. We use different colors for different roots. In the basins of attraction, the number of iterations needed to achieve the root is shown by the brightness of the color. Brighter color means less number of iterations are required for convergence. Here, we paint the initial point \(z_0\) by black color if the particular method fails to converge to any of the roots (starting from \(z_0\)) within the prescribed tolerance. This happens, in particular, when the method converges to a fixed point that is not a root of the given equation or if it ends in a periodic cycle. From these pictures, we can easily judge the behavior and suitability of any method depending on the circumstances. If we choose an initial point \(z_0\) in a zone where different basins of attraction touch each other, it is impossible to predict which root is going to be reached by the iterative method that starts in \(z_0\).

Fig. 1
figure 1

The basins of attraction for \(KTM_8\) (5.1) (left), \(ZM_8\) (5.4) (center) and \(MSM_8\) (5.2) (right) in test 1

Fig. 2
figure 2

The basins of attraction for \(MM_8^1\) (left), \(MM_8^2\) (center) and \(MM_8^3\) (right) in test 1

In what follows, we consider four test problems.

Test problem 1: For the first test, we have taken the function \(p_1(z)=z^2-1\) with roots \(-1.,1.\) Based on Figs. 1 and 2, we can see that our proposed methods namely \(MM_8^1\), \(MM_8^2\), \(MM_8^3\) shows the best performance as compared to other methods. The performance of method \(MSM_8\) is worst in this case.

Test problem 2 : The second test problem is \(p_2(z)=z^3-1\) with the simple zeros \(-0.5-0.866025 I, -0.5 + 0.866025 I, 1.\) Based on Figs. 3 and 4, methods \(MM_8^1\), \(MM_8^2\), \(MM_8^3\) and \(ZM_8\) perform very well. The method \(KTM_8\) shows some diverging points, while the method \(MSM_8\) shows a chaotic behavior in this case.

Test problem 3: The third test problem is taken into account as \(p_3(z)=z^4-\frac{1}{z}\) with simple roots \(0.309017 + 0.951057 I, 0.309017 - 0.951057 I, 1., -0.809017 + 0.587785 I, -0.809017 - 0.587785 I\). It is interesting to note from Figs. 5 and 6 that all methods except the method \(MSM_8\) perform nicely, although the chaotic behavior is too much due to inappropriate values of the free nonzero parameter.

Fig. 3
figure 3

The basins of attraction for \(KTM_8\) (5.1) (left), \(ZM_8\) (5.4) (center) and \(MSM_8\) (5.2) (right) in test 2

Fig. 4
figure 4

The basins of attraction for \(MM_8^1\) (left), \(MM_8^2\) (center) and \(MM_8^3\) (right) in test 2

Fig. 5
figure 5

The basins of attraction for \(KTM_8\) (5.1) (left), \(ZM_8\) (5.4) (center) and \(MSM_8\) (5.2) (right) in test 2

Fig. 6
figure 6

The basins of attraction for \(MM_8^1\) (left), \(MM_8^2\) (center) and \(MM_8^3\) (right) in test 3

Fig. 7
figure 7

The basins of attraction for \(KTM_8\) (5.1) (left), \(ZM_8\) (5.4) (center) and \(MSM_8\) (5.2) (right) in test 2

Test problem 4 : The last test problem under consideration is \(p_4(z)=z^4-1\) with the simple zeros \(-1., 0. - 1. I, 0. + 1. I, 1.\) Figures 7 and 8 demonstrates that our methods shows the best performance in contrast to other methods.

Fig. 8
figure 8

The basins of attraction for \(MM_8^1\) (left), \(MM_8^2\) (center) and \(MM_8^3\) (right) in test 4

Table 9 Results of chaotic comparisons for various derivative-free methods

In order to summarize these results, we have attached a weight to the quality of the results obtained by each method. The weight of 1 is for the smallest Julia set and a weight of 4 for scheme with chaotic behavior alongside the convergence behavior. We then averaged those results to come up with the smallest value for the best method overall and the highest for the worst. This data is presented in Table 9. The results shown in Table 9 show that the methods \(MM_8^2\) (center) and \(MM_8^3\) are the best methods and the method \(MSM_8\) (5.2) is worst one.

7 Conclusions

In this study, we contribute further to the development of the theory of iteration processes and propose new accurate and efficient higher-order derivative-free methods for solving nonlinear equations numerically. Furthermore, by choosing appropriate weight functions provided in Table 1, we can develop several new optimal families of eight-order multipoint methods. In terms of computational cost, each member of the family requires only four function evaluations, viz., \(f(x_n),~f(w_n),~f(y_n),~f(z_n)\) per iteration to achieve optimal index of efficiency \(E=8^{1/4}\approx 1.682\). We have also given a detailed proof to prove the theoretical order of convergence of the presented families. The asserted superiority of proposed methods is also corroborated by numerical results displayed in the Table 2, 3,4, 5, 6 7, 8. The numerical experiments suggests that the new class would be valuable alternative for solving nonlinear equations. Finally, we have also compared the basins of attraction of various eighth-order derivative free methods in the complex plane.