1 Introduction: multiple roots methods

Iterative methods for solving non-linear equations have been an essential tool in applied mathematics in recent years. Among the classical iterative methods, the most well known is Newton’s method, whose scheme for solving a nonlinear equation \(f(z)=0\) is given by

$$\begin{aligned} z_{n+1}=z_n-\dfrac{f(z_n)}{f'(z_n)}. \end{aligned}$$
(1)

To ensure the convergence to the solution of this method and other classical methods such as Chebyshev, Halley, Traub, the derivative of the function f(z) must exist and must be non zero at the solution (Candela and Marquina 1990; Halley 1694; Hofsommer 1958; Popovski 1980; Traub 1964).

In general, if \(z^*\) is a simple root of \(f(z)=0,\) the derivative of the function does not vanish at \(z^*.\) However, when we look for multiple roots, \(f'(z)\) vanishes at the roots and classical methods cannot be used.

For this reason, many results published in recent years deal with the design and study of iterative methods for finding multiple roots of nonlinear equations (see for example, Amat and Busquier 2016; Behl et al. 2022; Neta 2008; Petkovic et al. 2013 and references therein). Although in most iterative schemes, the multiplicity of the roots is a positive integer, there are papers that deal with non-integer or even negative orders of multiplicity (see Candela and Peris 2015 for example).

If the parameter m representing the multiplicity of the multiple roots we want to approximate is included in the iterative schemes, it implies that the multiplicity m must be known in advance, before approximating the multiple root. Although many papers in the literature present iterative methods for finding multiple zeros with known multiplicities, we can find methods that non only approximate multiple zeros of functions with unknown order of multiplicity, but also approximate the value of the multiplicities. In Petkovic and Neta (2016) the authors generate efficient algorithms that approximate multiple zeros of a given function f when the multiplicity is unknown and, also obtain the exact order of the multiplicity; moreover, they provide numerical examples for different functions and they also build the dynamical planes for the case of polynomial functions, analysing the basins of attraction of the zeros in order to compare the proposed algorithms.

In general, it is observed that multiple root search algorithms work best if all roots have the same multiplicity. However, problems coming from other branches of science or engineering lead to functions whose roots have different multiplicities and, moreover, not only these roots are unknown but also their multiplicities. In that case, the methods could be designed taking into account the existence of different roots with different multiplicities. But that implies to introduce more parameters in the design of the methods, which complicates their implementation. Then, it would be logical to think of iterative schemes that do not depend on any multiplicity. Some methods of this type found in the literature are Schröder’s method (and those derived from it), presented in Schröder (1870); an iterative scheme with memory for multiple roots, studied in Cordero et al. (2021), and Kurchatov’s method for multiple roots, published in Cordero et al. (2022).

The aim of this paper is to analyse if a root finding algorithm designed for finding roots with a given multiplicity m can be efficient for finding roots with different multiplicities. In this manuscript we want to check the suitability of the algorithms of Schröder, Newton, Chebyshev and Halley methods for multiplicity m when the function under analysis have roots with different multiplicities.

In order to investigate if any of these methods have good behaviour when we go after roots with different multiplicities, we first carry out a dynamical study when they are applied for approximating the multiple roots of a polynomial function of the form:

$$\begin{aligned} f\left( z\right) =(z-r_{1})^{m}\ (z-r_{2})^{n}, \end{aligned}$$
(2)

where z is a complex variable.

The fact of considering a family of polynomials, allows us to build parameter planes for the different methods, by considering m complex and by fixing the values of n.

Although we are fully aware that the multiplicity of a root is a real number, in our work we are going to consider the multiplicity m as a complex parameter in order to carry out a more complete dynamical study by constructing the parameter planes. If we consider it as real or more concretely, as a natural number, it is difficult to detect and understand the dynamical behaviour of the system when the parameter varies. In contrast, from the complex dynamical study, we extract results that explain the behaviours on the real line, in particular, when we focus on the natural values of the parameters that are representing multiplicities. One of the main results we obtain from the study of the parameter planes is the verification that the parameter planes are topologically equivalent for different values of the multiplicity n;  this is not easy to deduce from the parameter line. This property allows us to fix the value of the parameter n and carry out a dynamical study for the parameter m without loss of generality.

The success of this decision is also supported by the results obtained in the examples studied, some of which would be difficult to see if we only had considered the real line. For example, the existence of a periodic orbit in Newton’s method could go unnoticed given the small real interval that gives rise to its existence (Lemma 2.4). It would also not be easy to interpret the appearance of a strange fixed point that is attractive for a small interval of the parameter in the case of the Chebyshev method or the 2-period orbit that also appears in this method (Sect. 2.2). Furthermore, we observe these undesired behaviours in the numerical examples presented; some of them even for positive integer values of the multiplicity.

For this reason, we initially consider that m and z are complex for the dynamical study. As we see in the following sections, given a method, the parameter planes obtained for different natural values of n are topologically equivalent; so, we fix the value of n in order to obtain the parameter planes for m. The parameter planes show us the dynamical behaviour of the operators for complex values of m. As said above, from this study we extract conclusions on the real line. In particular, for building examples of dynamical planes we focus on natural values of the multiplicity m.

From this study, we analyse which methods work best for finding the root \(r_2,\) with multiplicity n,  even though some of these methods only consider m in their iterative schemes and they are not designed to find this other root.

As we prove in next section, the dynamics does not depend on the location of the roots; so, we fix the roots on \(z=0\) and \(z=1\) and study the dynamical behaviour of Newton, Chebyshev, Halley and Schröder methods applied on the polynomial:

$$\begin{aligned} p\left( z\right) =z^{m}(z-1)^{n}. \end{aligned}$$
(3)

Moreover, in Sect. 3.4, we also carry out a numerical analysis of these methods when we approximate multiple roots of more general functions.

For a better understanding of the dynamical study, we first recall some basic concepts of complex dynamics (see Beardon 1991; Milnor 2006 for more information).

Given a rational map \(R:\widehat{{\mathbb {C}}}\rightarrow \widehat{{\mathbb {C}}},\) where \(\widehat{{\mathbb {C}}}\) denotes the Riemann sphere, a dynamical discrete system is defined by the iterates of R. The orbit of a point \(z_0\in \widehat{{\mathbb {C}}}\) under R is defined by the sequence

$$\begin{aligned} {\mathcal {O}}(z_0)=\{z_0,\,R\left( z_0\right) ,\,R^{2}\left( z_0\right) ,\ldots ,R^{n}(z_0),\ldots \}. \end{aligned}$$

A point \(z_{0}\in \widehat{{\mathbb {C}}}\) of the rational map R is a fixed point if \(R\left( z_{0}\right) =z_{0}.\) Let us notice that for a rational map \(R:\widehat{{\mathbb {C}}}\rightarrow \widehat{{\mathbb {C}}},\) \(z=\infty \) is a fixed point when the degree of the numerator is bigger than the degree of the denominator. A fixed point that is not a root of the polynomial function on study is called strange fixed point.

A point \(z_{0}\) is periodic of period \(p>1\) if \(R^{p}\left( z_{0}\right) =z_{0}\) and \(R^{k}\left( z_{0}\right) \ne z_{0},\) for \(k<p;\) in this case, the orbit of \(z_{0}\) is called a periodic orbit of period p. A point \(z_{0}\) is a pre-periodic point if it is not periodic but it is eventually mapped under iteration of R to a periodic one.

Fixed points are classified in terms of the value of the multiplier \(\lambda =R^{\prime }(z_0)\): a fixed point \(z_0\) is called attractor if \(|\lambda |<1\) and superattractor if \(|\lambda |=0;\) it is called repulsor if \(|\lambda |>1\) and indifferent if \(|\lambda |=1.\)

The same classification can be used for periodic points of any given period p since they are fixed points of the map \(R^p(z).\)

The basin of attraction \({\mathcal {A}}(z_{0})\) of an attracting point \(z_{0}\) consists of the set of points \(z\in \widehat{{\mathbb {C}}}\) that accumulate on \(z_{0}\) under iteration of R,  i.e.

$$\begin{aligned} {\mathcal {A}}\left( z_{0}\right) =\{z\in \widehat{{\mathbb {C}}}\ :\ R^{n}\left( z\right) {\rightarrow }z_{0}\ \ \text {when}\ \ n{\rightarrow }\infty \}. \end{aligned}$$

The dynamical planes are a representation of the basins of attraction of the different attractors by means of a scale of colours.

The critical points of the rational map R are defined as the \(z\in \widehat{{\mathbb {C}}}\) where R fails to be injective in any neighbourhood of z or, equivalently, the \(z\in \widehat{{\mathbb {C}}}\) such that \(R^{\prime }(z)=0\) (see Beardon 1991, for example). The basins of attraction of attracting and rationally indifferent points contain, at least, a critical point (see Milnor 2006); then, the iterations of the critical points provides the existence of different attractors for a given map.

If a critical point is not a fixed point of R,  it is known as a free critical point. Two or more critical points can satisfy relations among them that imply a symmetry in their dynamics. Therefore, in order to detect all the stable behaviours of the map R it is enough to study the asymptotic behaviour of all the free critical points of R,  up to symmetry. This is the essential property used to draw the parameter planes (Milnor 2006).

When the rational function depends on a parameter, the parameter plane is the representation, by means of different colours, of the asymptotic behaviour of the free critical points for different values of the parameter.

In order to draw a parameter plane we restrict to a grid of points in a given range of parameters and iterate the free critical points up to 75 times. If the orbit of the critical point converges to a root (the distance to the root is smaller than \(10^{-4}\)), we conclude that there can be no stable behaviour other than convergence to the roots. In that case the iteration stops and we draw the point. Let us notice that, for the family (3), Newton’s method has only one free critical point; so, in its parameter plane, red colour corresponds to parameter values where the critical point is in the basins of 0 or \(\infty \) (inside the ring) and black colour corresponds to those parameter values for which the critical point is in the basin of \(z=1\) or goes to another basin of attraction.

Chebyshev’s and Halley’s methods, applied on (3), have two free critical points. We would like to emphasize that the parameter planes when there are two free critical points are built taking into account simultaneously the iteration of both critical points (Figs. 3 and 5). In these cases red colour in the parameter plane corresponds to parameter values where the critical points are in the basins of 0 or \(\infty \) (inside the ring), black colour is associated to those parameter values for which one critical point is in the basin of \(z=0\) and the other goes to other basin of attraction and we paint in green colour those parameter values for which both free critical points are in the basin of attraction of \(z=1.\) We also illustrate this claim with dynamical planes corresponding to values of the parameter where the different cases occur. As commented above, m is considered complex for building parameter planes for fixed values of n.

In Sect. 2, we analyse the information provided by these parameter planes to obtain a better understanding of what happens on the positive real line and more precisely, for integer values of the parameter m,  since it corresponds to a multiplicity. From this section, we observe for the methods considered that \(z=0\) is a superattractive fixed point for any value of m and \(z=\infty \) is a repulsive fixed point for \(m>0.\)

The point \(z=1\) is an attracting fixed point for any value of m only in the case of Halley’s method (Lemma 2.9). For Newton’s and Chebyshev’s methods \(z=1\) is attractive in a given region, Lemmas 2.3 and 2.6, respectively.

On the other hand, there are three fixed points for Schröder’s method, but only those which coincide with the roots of the polynomial are superattractors, the third fixed point is repulsive for all m. However, although both roots \(z=0\) and \(z=1\) are superattractors, we have shown in Lemma 2.10 that the basin of attraction of the root with lower multiplicity can become so small that the number of initial points converging to it is not relevant.

We want to emphasize the fact that conclusions can be drawn from this dynamical study when the multiplicities m and n are considered as natural numbers. Thus, at the end of each of the sections dedicated to the dynamical study of the different methods we have collected the most relevant information for this case. In Sect. 2.1.1 we point out when Newton’s method does not find the root \(z=1\) or the values of the parameter for which a period doubling orbit is attractive. In Sect. 2.2.1 we analyse the values of the parameter for which the Chebyshev’s method finds both roots of the polynomial and those values for which an strange attractor appears. In Sect. 2.3.1 we show that Haley’s method can always find both roots of the original polynomial, as they are always attractive. Finally, in Sect. 2.4.1 we find the basins of attraction of \(z=0\) and \(z=1\) for Schröder’s method, proving that the basin of the root with lower multiplicity is smaller.

Therefore, from this dynamical study, we conclude that Halley’s and Schöder’s methods present a better dynamical behaviour when they are applied on polynomials of the form (2) due to the fact that they are the only methods that find the root \(z=1\) for all m.

To conclude the comparison of the methods, in Sect. 3, we analyse numerically the behaviour and convergence of all of them when we approximate multiple roots with different multiplicities m and n for real functions.

We begin with the numerical study of the polynomial \(f(x)=x^m(x-1)^n\) with \(x\in {\mathbb {R}}\) and \(m,n\in {\mathbb {N}},\) for different values of m and n,  checking numerically the results of Sect. 2.

Afterwards, in Sect. 3.4, we study real functions that combine polynomial, exponential and logarithmic functions. This variety of functions allows us to check if the dynamical behaviour studied for polynomial functions of the methods can be extended to other non-polynomial functions. We observe that Halley’s method is the iterative scheme that presents a higher total percentage of convergence in the four non-polynomial functions studied, finding not only the root with multiplicity m but also the root with multiplicity n. We verify that the same unwanted effects deduced in the case of polynomials also appear for this type of functions.

Let us point out that in numerical experiments, we take initial points within an interval, chosen from previous dynamical information, and we compare if the number of initial points converging to the solutions \(z=0\) and \(z=1\) is maintained, worsen or improved.

2 Dynamical study of the methods

In this section we carry out a dynamical study of Newton, Chebyshev, Halley and Schröder methods when they are applied on a polynomial function having two different roots with different multiplicities.

First, we show that the dynamics of the operators obtained when these methods are applied on the functions given in (2) and (3) are topologically equivalent, being that the map \(h(z)=\frac{z-r_1}{r_2-r_1}\) affinely conjugates both operators.

Lemma 2.1

Let \(O_q\) and \(O_p\) denote the operators obtained by applying Newton,  Chebyshev,  Halley or Schröder method to \(q(z) =(z-r_{1})^{m}\ (z-r_{2})^{n}\) and \(p(z) =z^{m}\ (z-1)^{n},\) respectively. Let \(h(z)=\frac{z-r_1}{r_2-r_1}.\) Then,  fixed any \(m,n \in {\mathbb {C}}\) and \(z\in \widehat{{\mathbb {C}}},\) we have that

$$\begin{aligned} h \circ O_q\circ h^{-1}(z)= O_p(z). \end{aligned}$$

Proof

Let us consider the Möbius transformation \(h(z)=\frac{z-r_1}{r_2-r_1}.\) Note that \(h(r_1)=0,\) \(h(r_2)=1,\) \(h(\infty )=\infty \) and \(h^{-1}(z)=(r_2-r_1)z+r_1.\)

For Newton’s method we have that

$$\begin{aligned} O_q(z)=\frac{r_1 r_2 m+r_1(-m+n)z-n z^2}{r_2 m+r_1 n-(m+n)z}, \end{aligned}$$

then

$$\begin{aligned} h \circ O_q \circ h^{-1}(z)=\frac{n z^2}{-m+(m+n)z}=O_p(z). \end{aligned}$$

For Chebyshev’s method we have that

$$\begin{aligned} O_q(z)=\frac{N(r_1,r_2,z)}{2(r_2 m+r_1 n-(m+n)z)^3}, \end{aligned}$$

then

$$\begin{aligned} h \circ O_q \circ h^{-1}(z)=\frac{n z^3 (-m(m+3n+(m+n)(m+2n)z))}{2(m(-1+z)+n z)^3}=O_p(z) \end{aligned}$$

being

$$\begin{aligned} N(r_1,r_2,z)= & {} r_1 r_2 m(2 r_2^2 m^2 + (6 r_1 r_2 - r_1^2) m n + 3 r_1^2 n^2) \\{} & {} + r_1 (-6 r_2^2 m^3 + (r_1^2 - 9 r_1 r_2 - 6 r_2^2 ) m^2 n\\{} & {} - 3r_1 (r_1 + r_2) m n^2 + 2 r_1^2 n^3)z+ (6r_1 r_2 m^3 + 3 r_1 (r_1 + 3 r_2) m^2 n \\{} & {} + 3r_1 (r_1 - r_2)m n^2 - 6r_1^2 n^3)z^2\\{} & {} +(-2 r_1 m^3 + (-3r_1 + r_2) m^2 n + 3 ( r_1 + r_2) m n^2 + 6 r_1 n^3) z^3 \\{} & {} -(m^2 n + 3 m n^2 + 2 n^3) z^4. \end{aligned}$$

For Halley’s method we have that

$$\begin{aligned} O_q(z)=\frac{2 r_1 r_2 m (r_2 m + r_1 n) - r_1 (r_1 (m - n) n + 2 r_2 m (2 m + n)) z + 2 r_1 (m - n) (m + n)z^2 + n (m + n) z^3}{2 r_2^2 m^2 + (r_1^2 + 2 r_1 r_2) m n + r_1^2 n^2 - 2(2 m + n) (r_2 m + r_1 n)z + (m + n)(2 m + n)z^2}, \end{aligned}$$

then

$$\begin{aligned} h \circ O_q \circ h^{-1}(z)=\frac{n(m+n)z^3}{2m^2+ (-4m^2-2m n)z+(2m^2+ 3 m n +n^2)z^2}=O_p(z). \end{aligned}$$

For Schröder’s method, we have that

$$\begin{aligned} O_q(z)=\frac{r_1 r_2 (r_2 m+r_1n-2r_1 r_2(m+n)z+(r_1 m+r_2 n)z^2)}{r_2^2 m+r_1^2 n-2(r_2 m+r_1 n)z+(m+n)z^2}, \end{aligned}$$

then

$$\begin{aligned} h \circ O_q \circ h^{-1}(z)=\frac{n z^2}{m(-1+z)^2+n z^2}=O_p(z). \end{aligned}$$

\(\square \)

Taking into account this result, as the dynamics does not depend on the location of the roots, we study the dynamical behaviour of the operators \(O_p\) for Newton, Chebyshev, Halley and Schröder methods.

Given that the dynamical planes are built by drawing the basins of attraction of the different attractors, it is interesting to know which values of the parameters give rise to attractors that do not coincide with the roots of the polynomial under study. This is the reason of studying the regions in the parameter planes where the strange fixed points are attractive.

2.1 Newton’s method

Newton’s method is one of the most widely used and well-known methods for approximating the simple roots of non-linear equations because it is an optimal, efficient and simple method and has quadratic order of convergence. Moreover, it is one of the first methods that was modified with the aim of using it for approximating the multiple roots of an equation. Its iterative scheme is given by:

$$\begin{aligned} z_{n+1}=z_{n}-m \frac{f\left( z_{n}\right) }{f^{\prime }\left( z_{n}\right) }. \end{aligned}$$

Despite the introduction of m in its iterative scheme, in Schröder (1870) it is shown that it preserves the quadratic order of convergence of the original Newton’s method. However, this scheme has many limitations since, its own definition for approximating unknown roots implies knowing a priori the multiplicity of such roots. Moreover, it is defined for only one multiplicity m,  while the roots of an equation might have different multiplicities.

For this reason, in this section we study the efficacy of the method for approximating multiple roots with different multiplicities. To do so, we study the dynamics of Newton’s method for multiple roots when we apply the scheme on the polynomial (3). The operator we obtain has the form:

$$\begin{aligned} O\left( z,m,n\right) = \frac{n z^2}{(m+n)z-m}. \end{aligned}$$
(4)

As commented above, we want to study the dynamics of this rational map in terms of the parameter m for fixed values of n. Firstly, we have to calculate the fixed and the critical points of the operator \(O\left( z,m,n\right) \) and obtain the parameter and dynamical planes.

Fixed points are defined as the points satisfying \(O\left( z,m,n\right) =z.\) Solving this equation, we obtain the fixed points \(z=0,\) \(z=\infty \) and \(z=1.\) The fixed points \(z=0\) and \(z=1\) coincide with the roots of the polynomial p. The point \(z=\infty \) is called a strange fixed point, as it does not coincide with a root of the polynomial p.

The critical points are those points where the first derivative of the rational operator vanishes. The derivative of operator (4) is:

$$\begin{aligned} O^{\prime }\left( z,m,n\right) = \frac{n z \left( -2m+(m+n)z\right) }{\left( -m+(m+n)z\right) ^2}. \end{aligned}$$
(5)

From (5), we obtain the critical points \(z=0\) and \(z=\dfrac{2m}{m+n}.\) As \(z=0\) is a fixed point, there is only one free critical point.

Following the iterations of this free critical point we obtain the parameter planes for fixed real values of n and considering m as complex parameter (see Fig. 1).

Fig. 1
figure 1

Parameter planes of Newton method for values of \(n=1,2,3\)

Now, we obtain the stability of the fixed points analysing the value of the multipliers.

As \(O^{\prime }\left( 0,m,n\right) =0,\) the fixed point \(z=0\) is a superattractor for every value of the parameters m and n.

The stability of the other fixed points changes depending on the values of the parameter m and for the different values of n.

Lemma 2.2

The fixed point \(z=\infty \) satisfies the following statements : 

  • The point \(z=\infty \) is an attractor inside the circle \(C_1\) defined by

    $$\begin{aligned} (\alpha +n)^2+\beta ^2=n^2, \end{aligned}$$

    with \(m=\alpha + i \beta \) and \(n\in {\mathbb {R}}.\) In particular,  it is a superattractor for \(m=-n.\)

  • The point \(z=\infty \) is indifferent on the circle \(C_1.\)

  • The point \(z=\infty \) is a repulsor outside the circle \(C_1.\)

Proof

For the point \(z=\infty ,\) the value of the multiplier is given by

$$\begin{aligned} \left| \dfrac{1}{\lim \limits _{z\rightarrow 0}\left( O^{\prime }\left( \frac{1}{z},m,n\right) \right) } \right| =\left| \dfrac{m+n}{n}\right| . \end{aligned}$$

Let us write \(m=\alpha + i \beta \) and \(n\in {\mathbb {R}}\) in equation \(\left| \dfrac{m+n}{n}\right| =1.\) Then,

$$\begin{aligned} \left| \dfrac{\alpha + i \beta +n}{n}\right| =1, \end{aligned}$$
(6)

that yields to \(\alpha ^2 + 2 \alpha n+ \beta ^2=0\) which defines the circle \((\alpha +n)^2+\beta ^2=n^2,\) the curve where the point \(z=\infty \) is indifferent. Inside this circle, the value of the multiplier is less than 1,  then the point \(z=\infty \) is attractive and it is repulsive outside the circle, where the value of the multiplier is greater than 1. \(\square \)

The circle \(C_1: (\alpha +n)^2+\beta ^2=n^2,\) centered at \(-n\) with radius n,  can be observed in the parameter planes of Fig. 1. If we focus on the real line, then \(z=\infty \) is attractive for \(-2n<m<0,\) indifferent for \(m=0\) and \(m=-2n\) and repulsive in other case. As we consider m and n as positive multiplicities, the point \(z=\infty \) is always a repulsive fixed point.

Lemma 2.3

The stability of the fixed point \(z=1\) satisfies the following statements : 

  • The point \(z=1\) is an attractor inside the circle \(C_2\) defined

    $$\begin{aligned} (\alpha -n)^2+\beta ^2=n^2, \end{aligned}$$

    with \(m=\alpha + i \beta \) and \(n\in {\mathbb {R}}.\) In particular,  it is a superattractor for \(m=n.\)

  • The point \(z=1\) is indifferent on the circle \(C_2.\)

  • The point \(z=1\) is a repulsor outside the circle \(C_2.\)

Proof

For the point \(z=1\) we have that \(\left| O^{\prime }(1,m,n)\right| =\left| \dfrac{n-m}{n}\right| .\)

If we write \(m=\alpha + i \beta \) in equation \(\left| \dfrac{n-m}{n}\right| =1\) we obtain

$$\begin{aligned} \left| \dfrac{n-\alpha - i \beta }{n}\right| =1, \end{aligned}$$
(7)

that yields to \(\alpha ^2 -2 \alpha n+ \beta ^2=0\) which defines the circle \(C_2\) centered at n with radius n. Then, on this circle, the point \(z=1\) is indifferent; inside this circle, \(z=1\) is attractive and it is repulsive outside \(C_2.\) Moreover, \(O^{\prime }(1,m,n)=0\) for \(m=n;\) then, \(z=1\) is a superattractor for \(m=n.\) \(\square \)

The circle \(C_2\) can be observed in the parameter planes of Fig. 1, centered at n with radius n. In particular, if we consider real values for the parameter m,  we have that \(z=1\) is attractive for \(0<m<2n,\) indifferent for \(m=0\) and \(m=2n\) and repulsive in other case.

We can also identify the bulbs located on the real line at the left and at the right of these circles.

Lemma 2.4

There is an attractive periodic orbit of period two \(\{p_1,p_2\}\) given by : 

$$\begin{aligned} \left\{ \frac{m(m+2n-\sqrt{m^2-4n^2})}{2n(m+2n)}, \frac{m(m+2n+\sqrt{m^2-4n^2})}{2n(m+2n)}\right\} \end{aligned}$$
(8)

inside de curve \(C_3\) defined by : 

$$\begin{aligned} (\alpha ^2+\beta ^2)^2+10n^2(\beta ^2-\alpha ^2)+24n^4=0 \end{aligned}$$

with \(m=\alpha + i \beta \) and \(n\in {\mathbb {R}}.\)

Proof

Solving the equation \(O\left( O\left( z,m,n\right) ,m,n\right) =z,\) we obtain

$$\begin{aligned} m z(z-1)(m^2-(m^2+2m n)z+(m n+2n^2)z^2=0. \end{aligned}$$

As \(z=0\) and \(z=1\) are fixed points, we find a periodic orbit of period two \(\{p_1,p_2\}\) given by (8).

The stability of the 2-periodic orbit is given by the value of \(\left| O^{\prime }\left( p_1,m,n\right) *O^{\prime }\left( p_2,m,n\right) \right| =\left| \ 5-\dfrac{m^2}{n^2}\right| .\) If we consider \(m=\alpha + i\beta ,\) we obtain that the periodic orbit is attractive inside \(C_3,\) corresponding to such bulbs.\(\square \)

Let us observe, that for real values of m and n,  the 2-periodic orbit is attractive for \(-\sqrt{6}n<m<-2n\) and \(2n<m<\sqrt{6}n.\)

2.1.1 Analysing dynamical planes for natural values of m and n

As observed, the parameter planes for different values of \(n>0\) are topologically equivalent. So, we consider the parameter plane for \(n=3\) and we show some dynamical planes in Fig. 2 in order to analyse different behaviours. In these figures, the dark region corresponds to the basin of attraction of \(z=0.\) For \(0<m<6,\) the point \(z=1\) is attractive and the free critical point is in its basin of attraction, coloured in blue. For \(m=6\) the point \(z=1\) becomes an indifferent point that bifurcates to the 2-periodic orbit and it is located in the common boundary of the two basins of attraction. For \(m=7,\) the point \(z=1\) is repulsive and it is located in the boundary of the two attractive petals of the 2-periodic orbit

$$\begin{aligned} \left\{ \frac{7}{78}(13-\sqrt{13}),\frac{7}{78}(13+\sqrt{13})\right\} , \end{aligned}$$

that becomes attractive; in this case the green region corresponds to the basin of attraction of the 2-periodic orbit. For \(m\ge 8,\) the critical point is in the basin of attraction of \(z=0\) and, therefore, the dynamical plane has only one colour.

Fig. 2
figure 2

Dynamical planes for \(n=3\) and different values of m

We can observe that, for \(m=n=3,\) we have the case for which the method was designed, when all the roots have the same multiplicity. In this case, the operator (4) does not depend on the multiplicities. For this reason, we obtain the dynamical plane of Newton’s method for simple roots applied to a quadratic polynomial.

Moreover, we observe that for \(m\ge 7\) the fixed point \(z=1\) does not have a basin of attraction and the method does not find it.

2.2 Chebyshev’s method

Chebyshev’s method is the classical method of order three most commonly used to approximate the simple roots of nonlinear equations. This is due to the fact that, although it is not an optimal method, it has good characteristics such as its dynamics.

Chebyshev’s method for multiple roots, studied in Neta (2008) is defined by:

$$\begin{aligned} z_{n+1}=z_{n}-\frac{m(3-m)}{2}\frac{f\left( z_{n}\right) }{f^{\prime }\left( z_{n}\right) }-\frac{m^{2}}{2}\frac{f\left( z_{n}\right) ^{2}f^{\prime \prime }\left( z_{n}\right) }{f^{\prime }\left( z_{n}\right) ^{3}}, \end{aligned}$$

where m is the multiplicity of the root.

As studied in Neta (2008), this scheme preserves the cubic convergence order of the original method. However, as we discuss in this section, the dynamics of Chebyshev’s method for simple roots is not preserved when we apply the method for multiple roots on polynomial (3). This is mainly due to the presence of a unique multiplicity m in its algorithm.

Our aim is, again, to perform the exhaustive dynamical study mentioned when applying this method to the polynomial (3), with two different multiplicities. Thus, we want to see how effective it is to approximate the root with multiplicity n. Applying the method on this polynomial, we obtain the following operator:

$$\begin{aligned} O\left( z,m,n\right) =z^{3}\frac{n}{2}\frac{m(m+3n)-(m+n)(m+2n)z}{(m-(m+n)z)^{3}}. \end{aligned}$$
(9)

In this case, the fixed points obtained are \(z=0,\) \(z=1,\) \(z=\infty \) and the points

$$\begin{aligned} z_{1}=\frac{m(2m+3n)-m\sqrt{2mn+3n^{2}}}{(m+n)(2m+3n)} \end{aligned}$$

and

$$\begin{aligned} z_{2}=\frac{m(2m+3n)+m\sqrt{2m n+3n^{2}}}{(m+n)(2m+3n)}. \end{aligned}$$

The points \(z=\infty ,\) \(z_{1}\) and \(z_{2}\) are strange fixed points. Note that the point \(z_{2}\) coincides with \(z=1\) for \(m=3n.\)

The critical points are those points where the first derivative of the rational operator is cancelled. In this case,

$$\begin{aligned} O^{\prime }\left( z,m,n\right) =z^{2}\frac{n}{2}\frac{3m^{2}(m+3n)-4m(m+n)(m+2n)z+(m+n)^{2}(m+2n)z^{2}}{(m-(m+n)z)^{4}}, \end{aligned}$$
(10)

and the critical points are \(z=0\) and the free critical points

$$\begin{aligned} c_{1}=\frac{2m(m+2n)-m\sqrt{(m-n)(m+2n)}}{(m+n)(m+2n)} \end{aligned}$$

and

$$\begin{aligned} c_{2}=\frac{2m(m+2n)+m\sqrt{(m-n)(m+2n)}}{(m+n)(m+2n)}. \end{aligned}$$

Iterating simultaneously both free critical points, we obtain the parameter planes for m complex and fixed different values of n (see Fig. 3). In these figures, red colour means that the critical points are in the basins of attraction of \(z=0\) or \(z=\infty \) (inside the ring), black colour means that one critical point is in the basin of attraction of \(z=0,\) while the other critical point is in the basin of attraction of another attractor and green colour means that both critical points are in the same basin of attraction of \(z=1\) or another strange attractor.

Fig. 3
figure 3

Parameter planes for Chebyshev methods and for values of \(n=1,2,3\)

Now, we calculate the value of the multiplier \( \left| O^{\prime }\left( z,m,n\right) \right| \) for each fixed point in order to study their stability.

As \(O^{\prime }\left( 0,m,n\right) =0\) the fixed point \(z=0\) is a superattractor for every value of the parameters m and n.

The stability of the other fixed points changes depending on the values of the parameter m and for different values of n.

Lemma 2.5

The fixed point \(z=\infty \) satisfies the following statements : 

  • The point \(z=\infty \) is an attractor inside the curve \(C_1\) defined by

    $$\begin{aligned} 4\beta ^{4}+(8\alpha ^{2}+16\alpha n+9n^{2})\beta ^{2}+(4\alpha ^{4}+16\alpha ^{3}n+23\alpha ^{2}n^{2}+12\alpha n^{3})=0, \end{aligned}$$

    with \(m=\alpha + i \beta \) and \(n\in {\mathbb {R}}.\) In particular,  it is a superattractor for \(m=-2n.\)

  • The point \(z=\infty \) is indifferent on the curve \(C_1.\)

  • The point \(z=\infty \) is a repulsor outside the curve \(C_1.\)

Proof

For the case of \(z=\infty ,\) the value of the multiplier is given by

$$\begin{aligned} \left| \dfrac{1}{\lim \limits _{z\rightarrow 0}\left( O^{\prime }\left( \frac{1}{z},m,n\right) \right) } \right| = \left| \dfrac{n(m+2n)}{2(m+n)^2}\right| . \end{aligned}$$

If we write \(m=\alpha +\beta i\) and equal the above multiplier to 1,  we obtain the equation of curve \(C_1\) given by

$$\begin{aligned} 4\beta ^{4}+(8\alpha ^{2}+16\alpha n+9n^{2})\beta ^{2}+(4\alpha ^{4}+16\alpha ^{3}n+23\alpha ^{2}n^{2}+12\alpha n^{3})=0 \end{aligned}$$

where the point \(z=\infty \) is indifferent. The point \(z=\infty \) is attractive inside \(C_1\) and it is repulsive outside \(C_1.\) Moreover, it is superattractive for \(m=-2n.\) \(\square \)

If we focus on the real line, we have that \(z=\infty \) is attractive for \(-\dfrac{3n}{2}<m<0\) and repulsive in other case. Then, for multiplicities m and n represented as natural numbers, the point \(z=\infty \) is repulsive.

Lemma 2.6

The stability of the fixed point \(z=1\) satisfies the following statements : 

  • The point \(z=1\) is an attractor inside the curve \(C_2\) defined by : 

    $$\begin{aligned} \beta ^{4}+(2\alpha ^{2}-6\alpha n+5n^{2})\beta ^{2}+(\alpha ^{4}-6\alpha ^{3}n+13\alpha ^{2}n^{2}-12\alpha n^{3})=0, \end{aligned}$$
    (11)

    with \(m=\alpha + i \beta \) and \(n\in {\mathbb {R}}.\) In particular,  it is a superattractor for \(m=n\) and \(m=2n.\)

  • The point \(z=1\) is indifferent on the curve \(C_2.\)

  • The point \(z=1\) is a repulsor outside the curve \(C_2.\)

Proof

The stability of the fixed point \(z=1\) is given by:

$$\begin{aligned} \left| O^{\prime }\left( 1,m,n\right) \right| =\left| \frac{(m-2n)(m-n)}{2n^{2}}\right| . \end{aligned}$$

If we write \(m=\alpha +\beta i\) we obtain the equation for the curve \(C_2:\)

$$\begin{aligned} (\beta ^{2}+\alpha ^{2}-2\alpha n+n^{2})(\beta ^{2}+\alpha ^{2}-4\alpha n+4n^{2})-4n^{2}=0 \end{aligned}$$

that gives Eq. (11). \(\square \)

This curve \(C_2\) delimits the values of the parameter m where \(z=1\) is attractive. In Fig. 3 we can locate this region intersecting the real line between the values \(0<Re(m)<3n.\)

For \(z=1,\) if we consider real values of m,  it is easy to obtain that:

  • If \(0<m<3n,\) the point \(z=1\) is attractive. Moreover, for \(m=n\) or \(m=2n,\) the point \(z=1\) is a superattractor.

  • If \(m<0\) or \(m>3n,\) the point \(z=1\) is repulsive. For \(m=0\) or \(m=3n,\) the point \(z=1\) is indifferent.

For the case of the stability of the strange fixed points \(z_{1}\) and \(z_{2},\) we have the following results. For complex values of the parameter m,  the solutions of

$$\begin{aligned} \left| O^{\prime }\left( z_{1},m,n\right) \right| =1, \end{aligned}$$
(12)

define the closed curve \(C_3\) in the complex plane where \(z_{1}\) is indifferent. Inside this curve, \(z_{1}\) is an attractor and \(z_{1}\) is a repulsor outside that curve. If we consider real values of the parameters, the solutions of Eq. (12) are \(m=-\dfrac{3n}{2}\) and another solution \(m^{*}\) located close at the left of this one. For these values, the strange fixed point \(z_{1}\) is indifferent and it is attractive when the parameter is located between these values. For example, for \(n=1,\) the solution of (12) are \(m=-\dfrac{3}{2}\) and \(m=-1.6457515.\) The point \(z_{1}\) is a repulsor in other case; in particular, the strange fixed point \(z_{1}\) is always repulsive for \(m>0.\)

For the strange fixed point \(z_{2},\) and for complex values of the parameter m,  the solutions of

$$\begin{aligned} \left| O^{\prime }\left( z_{2},m,n\right) \right| =1, \end{aligned}$$
(13)

define the curves in the complex plane where \(z_{2}\) is indifferent. In this case, we obtain the same region of attraction obtained for \(z_{1}\) delimited by the curve \(C_3\) and another region of attraction delimited by the curve \(C_4\) located between the real values \(m=3n\) and \(m=k n\) where

$$\begin{aligned} k=\frac{1}{2}+\frac{26\root 3 \of {2}}{\root 3 \of {3}\root 3 \of {1305+7\sqrt{321}}}+ \frac{\root 3 \of {1305+7\sqrt{321}}}{2\root 3 \of {2}\root 3 \of {9}}\approx 4.66548. \end{aligned}$$

Moreover, the point \(z_{2}\) is superattractive for \(m=k_{o}n,\) where

$$\begin{aligned} k_{o}=\frac{1}{24}\left( 5+\frac{1801}{\root 3 \of {76517+144\sqrt{633}}}+\root 3 \of { 76517+144\sqrt{633}}\right) \approx 3.74529. \end{aligned}$$

Remark 2.7

For real m and n,  let us notice that the strange fixed point \(z_1\) is always repulsive for \(m>0.\) Nevertheless, the strange fixed point \(z_2\) is attractive for \(3n<m<kn,\) where \(k\approx 4.66548,\) which corresponds, in the parameter plane of Fig. 3, to the bulb located at the right of the region where \(z=1\) is attractive.

2.2.1 Analysing dynamical planes for natural values of m and n

As we have seen, the parameter planes for different values of n are topologically equivalent. So, we consider the parameter plane for \(n=3\) (Fig. 3c), and we build some dynamical planes in order to analyse different behaviours.

Fig. 4
figure 4

Chebyshev’s dynamical planes for \(n=3\)

From the previous study, we know that \(z=1\) is attractive for \(0< m < 9.\) From \(m=0\) to \(m=5,\) the parameter m is located in the green zone of the parameter plane; this means that both critical points are in the basin of attraction of \(z=1\) and the dynamical planes are divided into two basins of attraction, the corresponding to \(z=0\) in red colour and the basins of attraction of \(z=1\) in black colour; see the dynamical planes (a), (b) and (c) in Fig. 4. This case corresponds to a good behaviour of Chebyshev’s method for finding both multiple roots. Moreover, we can also observe the symmetry that presents the dynamical plane in the case of \(m=n=3.\) Notice that, analogous to the Newton’s study, the multiplicity disappears in the operator (9) for \(m=n=3\) and this operator corresponds to the Chebyshev’s method applied on a quadratic polynomial with simple roots.

For \(m=6, 7, 8\) and 9,  the parameter m is located in the black zone of the parameter plane corresponding to values for which \(z=1\) is attractive and there is only one critical point in the basin of attraction of \(z=1.\) Analysing the dynamical planes, we see that the other critical point is in the basin of \(z=0\) (see Fig. 4d). Although in this case, Chebyshev’s method can find both multiple roots, the region of initial conditions leading to \(z=1\) is smaller than before.

For \(m=9,\) we have a bifurcation point, the strange fixed point \(z_2\) coincides with \(z=1.\) For \(9< m < 13.996,\) the strange point \(z_2\) becomes attractive; its value is close to 1 and the point \(z=1\) is on the boundary of its basin of attraction. We show the dynamical planes for \(m=10, 11\) and 12 in Fig. 4. Furthermore, in Fig. 4f and g we can observe a different behaviour for \(m=11\) with respect to the other dynamical planes. Numerically, we have observed that, when taking values in that area, the method does not present a good behaviour.

The value \(m=13.996\) is a bifurcation point: \(z_2\) becomes a repulsor and an attractive 2-periodic orbit appears. As we can see in the parameter plane of Fig. 3c, for \(m=15\) the parameter is located in the right bulb of the figure and, therefore, there is an attractive periodic orbit of period two, like the one shown in Fig. 4i.

For \(m=16,\) the parameter m is placed on the antenna and, therefore, a new behaviour occurs (see Fig. 4j and k).

For \(m=17,\) the parameter is outside the antenna. For this reason, for larger values of m,  only the point \(z=0\) is attractive, as can be seen in Fig. 4l. This implies that, for \(m\ge 17,\) Chebyshev’s method only finds the root \(z=0.\)

2.3 Halley’s method

Halley’s method is a well-known method in the field of iterative methods for approximating simple roots of nonlinear equations. It is a method of order three that is part of the Chebyshev–Halley family of methods.

The Halley method for multiple roots is designed in paper (Hansen and Patrick 1977) and is defined by the scheme:

$$\begin{aligned} z_{n+1}=z_{n}-\frac{f\left( z_{n}\right) }{\frac{(m+1)f^{\prime }\left( z_{n}\right) }{2m}-\frac{f\left( z_{n}\right) f^{\prime \prime }\left( z_{n}\right) }{2f^{\prime }\left( z_{n}\right) }}, \end{aligned}$$

where m is the multiplicity of the root.

Halley’s method for multiple roots, as Chebyshev’s method, has cubic convergence, which allows us to make a good comparison between these two methods as they are similar.

Applying this method on the polynomial (3), we obtain the operator:

$$\begin{aligned} O\left( z,m,n\right) =z^{3}\frac{n(n+m)}{2m^2-2m(n+2m)z+(n+m)(n+2m)z^2}. \end{aligned}$$
(14)

In order to study the dynamics of this operator in terms of the parameter m,  we first calculate fixed and critical points.

Solving \(O\left( z,m,n\right) =z,\) the fixed points obtained are \(z=0,\) \(z=1,\) \(z=\infty \) and the point \(z=\dfrac{m}{n+m}.\) The points \(z=\infty \) and \(z=\frac{m}{n+m}\) are strange fixed points, as they do not coincide with the roots of the polynomial p.

The critical points are those points where the first derivative of the rational operator is zero. Then, since the derivative of the operator is

$$\begin{aligned} O^{\prime }\left( z,m,n\right) =z^{2}\frac{n(n+m)(6m^2-4m(n+2m)z+(n+m)(n+2m)z^2)}{(2m^2-2m(n+2m)z+(n+m)(n+2m)z^2)^2}, \end{aligned}$$
(15)

the critical points are \(z=0\) and the free critical points

$$\begin{aligned} c_{1}=\frac{2m(n+2m)-m\sqrt{2(m-n)(2m+n)}}{(m+n)(2m+n)} \end{aligned}$$

and

$$\begin{aligned} c_{2}=\frac{2m(n+2m)+m\sqrt{2(m-n)(2m+n)}}{(m+n)(2m+n)}. \end{aligned}$$

Iterating the critical points, we obtain the parameter planes for three fixed values of n,  where \(m\in {\mathbb {C}}\) is the parameter that varies in each of the planes (see Fig. 5). Red colour means that the critical points are in the basins of attraction of \(z=0\) or \(z=\infty \) (inside the ring), black colour means that one critical point is in the basin of attraction of \(z=0,\) while the other critical point is in the basin of attraction of another attractor and green colour means that both critical points are in the same basin of attraction of \(z=1\) or another strange attractor. The Fig. 5 shows a gradation of colors from red to light green depending on the number of iterations the critical point takes for to be in the basin of \(z=0.\)

Fig. 5
figure 5

Parameter planes of Halley method for values of \(n=1,2,3\)

We calculate the value of the multiplier \( \left| O^{\prime }(z,m,n) \right| \) for each fixed point in order to study their stability.

As in the previous methods, the fixed point \(z=0\) is a superattractor for every value of the parameters m and n.

Lemma 2.8

The fixed point \(z=\infty \) satisfies the following statements : 

  • The point \(z=\infty \) is an attractor inside the circle \(C_1\) defined by

    $$\begin{aligned} \left( \alpha +\frac{n}{2}\right) ^2+ \beta ^2=\left( \frac{n}{2}\right) ^2, \end{aligned}$$

    with \(m=\alpha + i \beta \) and \(n\in {\mathbb {R}}.\)

  • The point \(z=\infty \) is indifferent on the curve \(C_1.\)

  • The point \(z=\infty \) is a repulsor outside the curve \(C_1.\)

Proof

For the case of \(z=\infty ,\) the value of the multiplier is given by

$$\begin{aligned} \left| \dfrac{1}{\lim \limits _{z\rightarrow 0}\left( O^{\prime }\left( \frac{1}{z},m,n\right) \right) } \right| = \left| \dfrac{2m+n}{n}\right| . \end{aligned}$$

If we consider complex values for the parameter \(m=\alpha +\beta i,\) we find a closed curve defined by \(\alpha ^2+\alpha n + \beta ^2 =0,\) where \(z=\infty \) is indifferent, it is attractive inside this curve and it is repulsive outside this curve. \(\square \)

If we focus on real values of m,  we have that \(z=\infty \) is repulsive for \(m>0.\)

For the fixed point \(z=1\) we have the following result.

Lemma 2.9

The point \(z=1\) is an attractor for \(Re(m)>0,\) it is indifferent for \(Re(m)=0\) and it is a repulsor for \(Re(m)<0.\)

Proof

For \(z=1\) we have that

$$\begin{aligned} \left| O^{\prime }(1,m,n) \right| = \left| \dfrac{n-m}{n+m} \right| . \end{aligned}$$

Then, \(\left| O^{\prime }(1,m,n) \right| =1\) when \(\left| n-m \right| =\left| n+m\right| .\) If we consider complex values of the parameter m,  that is \(m=\alpha +i\beta ,\) we obtain that \(z=1\) is attractive for \(\alpha >0,\) repulsive for \(\alpha <0\) and indifferent for \(\alpha =0.\) \(\square \)

If we focus on real values of m,  we have that \(z=1\) is attractive for \(m>0.\)

Finally, the strange fixed point \(z=\dfrac{m}{n+m}\) is always repulsive since \(\left| O^{\prime }\left( \dfrac{m}{n+m},m,n\right) \right| =3.\)

2.3.1 Analysing dynamical planes for natural values of m and n

As we have seen, the parameter planes for different values of n are topologically equivalent. As before, we consider the parameter plane for \(n=3\) (see Fig. 5c) and we build some dynamical planes for positive integer values of m in order to analyse different behaviours (see Fig. 6).

In these cases, the point \(z=1\) is always attractive, so at least one of the critical points must be in its basins of attraction. We observe that, for values of m inside the green zone, both critical points are in the basin of attraction of \(z=1,\) which is connected for \(1 \le m \le 8\) (see Fig. 6). For values of m outside this green region, only one critical point belongs to the basin of attraction of \(z=1\) and the other is in the basin of attraction of \(z=0;\) as we can observe in the last two pictures of Fig. 6, the basin of attraction of \(z=1\) becomes disconnected.

In particular, for \(m=n=3,\) the dynamical plane coincides with Halley’s plane for simple roots.

Fig. 6
figure 6

Halley’s dynamical planes for \(n=3\)

We observe that for values of the multiplicities corresponding to the green regions in the parameter planes, the Halley’s method presents a good behaviour for finding both roots. Moreover, this method can always find both roots of the original polynomial, as they are always attractive.

2.4 Schröder’s method

Schröder’s method is a method of order two, defined in Schröder (1870) as a multiple root version of Newton’s method and which does not include in its definition the multiplicities of the roots to be approximated. The idea of this method to avoid that \(f'(z^*)=0\) and, therefore, to be a method for multiple roots, consists of defining the function of Newton’s scheme for simple roots (1) as

$$\begin{aligned} g(z_n)=\dfrac{f(z_n)}{f'(z_n)}. \end{aligned}$$

By derivation, we obtain the expression

$$\begin{aligned} g'(z_n)=\dfrac{(f'(z_n))^2-f(z_n)f''(z_n)}{(f'(z_n))^2}. \end{aligned}$$

Substituting in Newton’s method the expressions for \(g(z_n)\) and \(g'(z_n),\) Schröder’s method is obtained:

$$\begin{aligned} z_{n+1}=z_{n}-\frac{f\left( z_{n}\right) f^{\prime }\left( z_{n}\right) }{(f^{\prime }\left( z_{n}\right) )^2- f\left( z_{n}\right) f^{\prime \prime }\left( z_{n}\right) }. \end{aligned}$$

This method has a quadratic order of convergence and, unlike the three classical methods above, it is a pure multiple root method that does not depend on the multiplicity of the roots it approximates.

A dynamical study of this method applied on a polynomial with two multiple roots can be found in Galilea and Gutiérrez (2021). We include here our dynamical study for completeness in the comparison of the methods and also for taking into account the basins of attraction in the next section.

The importance of studying this method and comparing it dynamically and numerically with the other three classical methods resides in understanding why the use of this type of method has not been exploited more, since they seem to be more useful. That is to say, a method that does not require predefining the multiplicity of the root to approximate is, a priori, a more efficient method since it approximates any root, whatever its multiplicity.

On the other hand, we want to check if in practice the advantages of methods such as Schröder’s are preserved in all situations and extend to any non-polynomial function. After applying this scheme to polynomial (3), we obtain the operator

$$\begin{aligned} O\left( z,m,n\right) = \frac{n z^2}{ m(z-1)^2+n z^2}. \end{aligned}$$
(16)

As before, in order to study the dynamics of this operator in terms of the parameter m,  we first calculate the fixed and the critical points.

Solving \(O\left( z,m,n\right) =z,\) the fixed points obtained are \(z=0,\) \(z=1\) and \(z=\dfrac{m}{m+n}.\) Let us notice that the point \(z=\infty \) is not a fixed point of this method.

The derivative of operator (16) is

$$\begin{aligned} O^{\prime }\left( z,m,n\right) = \frac{2m n (1-z)z}{( m-2m z+(m+n)z^2)^2}. \end{aligned}$$
(17)

From this derivative, we obtain that the solutions of \(O^{\prime }\left( z,m,n\right) =0\) are \(z=0\) and \(z=1.\) Then, the critical points are \(z=0\) and \(z=1,\) which are superattractive fixed points for any value of m and n.

On the other hand, as

$$\begin{aligned} O^{\prime }\left( \dfrac{m}{m+n},m,n\right) =2, \end{aligned}$$

the point \(z=\frac{m}{m+n}\) is repulsive for any value of m and n.

2.4.1 Analysing dynamical planes for natural values of m and n

As this operator does not have free critical points, the parameter plane, presents only one colour and we do not show it. Some examples of dynamical planes for \(n=3\) are shown in Fig. 7.

Fig. 7
figure 7

Dynamical planes of Schöder’s method for \(n=3\)

The dynamical conclusions we get from this method is that it seems to be an effective method to find two multiple roots with different multiplicities. This is because both roots, \(z=0\) and \(z=1,\) are superattractive roots for any value of m and n. In Fig. 7 we can observe the basins of attraction of \(z=0\) (dark green) and \(z=1\) (cyan), for \(n=3\) and different values of m.

If we had finished our analysis of the methods at this point, we would probably declare Schröder’s method as one of the best methods for approximating multiple roots since it presents a good dynamical behaviour and, furthermore, it is the only one of the four methods that does not need to know a priori any information of the roots to be approximated. But in Fig. 7, we observe that the basin of attraction of the root with the lowest multiplicity decreases rapidly. The following lemma gives us a general expression of the basins of attraction of both roots.

Lemma 2.10

The basins of attraction for the fixed points \(z=0\) and \(z=1\) are : 

  • For \(m<n\)

    $$\begin{aligned} {\mathcal {A}}(0)= & {} \left\{ z=\alpha +i \beta \in \widehat{{\mathbb {C}}}\ : \left( \alpha +\frac{m^2}{n^2-m^2}\right) ^2 +\beta ^2<\left( \frac{ m n}{n^2-m^2}\right) ^2\right\} \\ {\mathcal {A}}(1)= & {} \left\{ z=\alpha +i \beta \in \widehat{{\mathbb {C}}}\ :\left( \alpha +\frac{m^2}{n^2-m^2}\right) ^2 +\beta ^2>\left( \frac{ m n}{n^2-m^2}\right) ^2\right\} \end{aligned}$$
  • For \(m=n\)

    $$\begin{aligned} {\mathcal {A}}(0)= & {} \left\{ z=\alpha +i \beta \in \widehat{{\mathbb {C}}}\ :\alpha <1/2\right\} \\ {\mathcal {A}}(1)= & {} \left\{ z=\alpha +i \beta \in \widehat{{\mathbb {C}}}\ :\alpha >1/2\right\} \end{aligned}$$
  • For \(m>n\)

    $$\begin{aligned} {\mathcal {A}}(0 )= & {} \left\{ z=\alpha +i \beta \in \widehat{{\mathbb {C}}}\ :\left( \alpha +\frac{m^2}{n^2-m^2}\right) ^2 +\beta ^2>\left( \frac{ m n}{n^2-m^2}\right) ^2\right\} \\ {\mathcal {A}}(1)= & {} \left\{ z=\alpha +i \beta \in \widehat{{\mathbb {C}}}\ :\left( \alpha +\frac{m^2}{n^2-m^2}\right) ^2 +\beta ^2<\left( \frac{ m n}{n^2-m^2}\right) ^2\right\} . \end{aligned}$$

Proof

It can be easily verified by induction that the kth iteration of the operator (16) is

$$\begin{aligned} O^k \left( z,m,n\right) = \frac{n^{2^k-1} z^{2^k}}{ m^{2^k-1}(z-1)^{2^k}+n^{2^k-1} z^{2^k}}=\frac{1}{\frac{n}{m}\left( \frac{m(z-1)}{n z}\right) ^{2^k}+1}. \end{aligned}$$

A point z belongs to the basin of attraction of \(z=0\) if \(\lim \limits _{k \rightarrow +\infty } O^k \left( z,m,n\right) =0 ,\) that implies

$$\begin{aligned} \lim \limits _{k \rightarrow +\infty } \left[ \frac{n}{m}\left( \frac{m(z-1)}{n z}\right) ^{2^k} \right] = +\infty , \end{aligned}$$

that yields to

$$\begin{aligned} \left| \frac{m(z-1)}{nz}\right| >1. \end{aligned}$$

Now, we write \(z=\alpha +i \beta \) and develop the previous equation.

  • For \(m=n\) we have

    $$\begin{aligned} \left| \frac{z-1}{z}\right| >1 \Rightarrow (\alpha -1)^2+\beta ^2<\alpha ^2+\beta ^2 \Rightarrow \alpha <\frac{1}{2}. \end{aligned}$$
  • For \(m \ne n,\) we have

    $$\begin{aligned} (m^2-n^2) \left( \left( \alpha -\frac{m^2}{m^2-n^2} \right) ^2+\beta ^2 \right) > \frac{m^2 n^2}{m^2-n^2} \end{aligned}$$

    which leads to the results of the basin of attraction of \(z=0\) by considering \(m>n\) or \(m<n.\)

Similarly, the basin of attraction of \(z=1\) is obtained by making \(\lim \limits _{k \rightarrow +\infty } O^k \left( z,m,n\right) =1 ,\) that implies

$$\begin{aligned} \lim \limits _{k \rightarrow +\infty } \left[ \frac{n}{m}\left( \frac{m(z-1)}{n z}\right) ^{2^k} \right] = 0 \end{aligned}$$

that yields to

$$\begin{aligned} \left| \frac{m(z-1)}{n z}\right| <1 \end{aligned}$$

and the complementary regions are obtained for each case. \(\square \)

Moreover, in the next section, we check numerically the good extension of the dynamics of this method from polynomials (2) to other type of functions.

3 Numerical experiments

In this section, we approximate the roots of different type of real functions \(f:{\mathbb {R}}\rightarrow {\mathbb {R}}\) in order to check the suitability of the methods for approximating multiple roots with different multiplicities. We first begin by analysing some of the polynomials studied in the previous sections and, after that, we consider non-polynomial functions, combination of exponential, polynomial and logarithmic functions.

For the calculations, we use MATLAB R2022a in arithmetic of variable precision with 100 digits, iterating from an initial estimate \(x_0\in {\mathbb {R}},\) which is iterated up to a distance between consecutive iterations plus the norm of the function evaluated in the last iteration less than \(tol=10^{-100}\) or until getting to the maximum number of iterations, which in this case is 50. This process is repeated with different initial estimations based on the dynamical studies made above.

In order to compare the methods, we do not only compare the usual numerical measures, but also take into account the robustness of the methods to find the roots whatever their multiplicities. Among the measures we use to compare numerically methods is the ACOC,  known as the approximate computational order of convergence, a computational criterion used in Mathematical Analysis to obtain an approximation of the theoretical order of convergence p. This measure is defined by Cordero and Torregrosa in Cordero and Torregrosa (2007) to computationally measure the convergence speed of the methods using the last four iterations \(x_{n-1},\) \(x_n,\) \(x_{n+1},\) \(x_{n+2}\) obtained by each method. The expression used to calculate ACOC is the following:

$$\begin{aligned} p\approx ACOC =\frac{\ln \left( \Vert x_{n+1}-x_n\Vert _2/\Vert x_n-x_{n-1}\Vert _2\right) }{\ln \left( \Vert x_n-x_{n-1}\Vert _2/\Vert x_{n-1}-x_{n-2}\Vert _2\right) }, \end{aligned}$$
(18)

where \(\Vert \cdot \Vert _2\) represents the 2-norm between two vectors to calculate the distance between them. In this particular case, since we are working with non-linear equations, the iterations obtained are not vectors and, therefore, to calculate the ACOC,  we consider the norm as the absolute value between two real values.

3.1 Example 1

Let us consider the function

$$\begin{aligned} f(x)=x^7(x-1)^3,\quad x\in {\mathbb {R}}. \end{aligned}$$

In order to compare the methods, we take different initial estimates \(x_0,\) taking into account the dynamical planes of the Newton, Chebyshev and Halley, Figs. 2g, 4d and 6g, respectively. Table 1 shows the numerical results obtained by the methods when trying to approximate the solutions of the function F\(x=0\) and \(x=1,\) with multiplicities \(m=7\) and \(n=3,\) respectively. From left to right, the results shown in the table are: the method used, the initial approximation chosen, the final iteration, the number of iterations needed to converge, the approximate computational convergence order (ACOC),  the distance between the last two iterations, \(\Vert x_n-x_{n-1}\Vert ,\) and the function evaluated at the last iteration, \(\Vert F(x_n)\Vert .\)

Table 1 Numerical results of Example 1

In Table 1, we can see that some of the methods present certain number of irregularities such as the high number of iterations and wrong values of the ACOC. This occurs because we are approximating two roots with different multiplicities using methods that are designed for approximating multiple roots for only one multiplicity, \(m=7.\)

Despite these irregularities, we observe that, when the methods end up finding the root \(x=0,\) the numerical results are close to the theoretical results, because the ACOC of the methods is very close to the theoretical order of convergence an the number of iterations is not very high. As we can see in the table, for \(x_0=-2,\) the method that better approximates \(x=0\) is Halley’s method.

However, when we are approximating the root \(x=1,\) Newton’s, Chebyshev’s and Halley’s methods give quite deficient numerical results. This is not necessarily due to the fact that they work badly, it is because they are searching for the root with multiplicity n,  the root that does not appear in the iterative scheme of the methods.

Despite these measures, it is a great success that methods such as Chebyshev and Halley, methods designed to find the root with multiplicity m,  are able to approximate \(x=1.\)

It is curious to note that Schröder’s method, a method with no dependence on the multiplicity m,  cannot converge to the root \(x=1,\) which is a superattractor fixed point, even if we start with initial estimates as close to it as \(x_0=2.\)

On the other hand, from Table 1, we like to note the behaviour of Newton’s method. We see that for certain values, it can approximate the root \(x=0,\) but it never approximates the root \(x=1\) since, as we have studied in its dynamics, after \(m=6,\) this fixed point is repulsor. Moreover, as we discussed in the dynamical section of this method, for \(m=7\) and \(n=3,\) there is a 2-periodic orbit in its dynamical plane defined by the expression (8). For these values of m and n,  we obtain the following 2-periodic orbit:

$$\begin{aligned} \left\{ 0.843092,1.490240\right\} . \end{aligned}$$

For this reason, for Newton’s method, the initial estimates \(x_0=2,4,19,23\) are attracted by points which are not roots of the polynomial.

Finally, we want to check how many initial estimates \(x_0\) converge to \(x=0,\) how many converge to \(x=1\) and how many converge to other points (or do not converge) for each method. To do this, we choose an interval containing a larger number of initial points near \(x=1\) and that corresponds to the interval in which irregular dynamical behaviours happen in the dynamical planes of the methods. Specifically, we use the methods, iterating them from \(x_{0,i}=-2+ih,\) \(i=0,\ldots ,nx\) with \(h=0.1\) and \(nx=250.\) Thus, we take a grid of points within the interval \([-2,23]\) and check how many initial estimates in percentage end up converging to the solutions or to strange attractors and the mean number of iterations needed to converge.

Table 2 Percentage and mean of Example 1

In Table 2, we can see that Chebyshev’s approximates very well the multiple root whose multiplicity is involved in its iterative scheme; however, sometimes it is not able to find \(x=1\) even if we start with \(x_0\) closer to this root than to \(x=0.\) Halley’s method presents an expected behaviour since, working in an interval of initial estimates with more points near \(x=1\) than \(x=0,\) it is logical that there are more points converging to this root. On the other hand, the results presented by Schröder are rather disappointing since the difference between the value of the multiplicities makes the basin of attraction of \(x=1\) very small. Finally, for Newton’s method, we see that, contrary to what we thought, there is a small number of initial points \(x_0\) that tend to \(x=1.\) Moreover, within this interval, most points tend to the 2-periodic orbit.

3.2 Example 2

In this example, we are going to approximate the roots of the polynomial

$$\begin{aligned} f(x)=x^{11}(x-1)^3, \end{aligned}$$

to see what happens to the initial points that are located inside the green area of the Chebyshev’s dynamical plane of the Fig. 4f. Moreover, as we see in Chebyshev’s dynamical study, for \(9<m<13.996\) we have that \(z_2=1.0301\) is a strange attractor point and that \(z=1\) is repulsive; so, we also calculate the percentage of points converging to \(x=0,\) \(x=1\) and \(x=1.030138\) for this method and the mean of iterations needed to converge. On the other hand, as in the previous example, we have compared the methods numerically with a similar table to Table 1.

As we see in Table 3, Chebyshev’s method has a behaviour quite different from Example 1 for certain values of \(x_0.\) If we choose an initial approximation in the green zone of Fig. 4f, for example \(x_0=2,\) the method finishes the 50 iterations without converging. In fact, the last approximation is so far away from the two solutions that we could say that it does not converge for this initial estimate even though \(x_0\) is so close to both solutions. On the other hand, we see that if we take \(x_0=1.07,\) an initial estimate in the black zone in Fig. 4f, we end up converging to the strange fixed point \(z_2=1.030138.\) This is a sign that Chebyshev’s method for multiple roots does not work very well in this case. If we focus now on the other methods, we observe in Table 4 that the Halley and Schröder methods for multiple roots are the only ones able to find the root \(x=1\) since in their dynamics we have seen that this point is an attractor and a superattractor, respectively.

Table 3 Numerical results of Example 2
Table 4 Percentage and mean of Example 2

3.3 Example 3

For the function

$$\begin{aligned} f(x)=x^{15}(x-1)^3, \end{aligned}$$

we are going to design a table similar to Table 4 to show that Halley’s and Schröder’s methods are still the only methods that find the root \(x=1\) (Table 5). Furthermore, we highlight the behaviour of the points inside the black area of the Chebyshev’s dynamical plane, Fig. 4m, since it can be observed that there are certain initial points that do not converge to \(x=0\) because they are trapped by the 2-periodic orbit

$$\begin{aligned} \left\{ 1.0327003, 1.085298\right\} . \end{aligned}$$
Table 5 Percentage and mean of Example 3

This numerical example allows us to observe that for Schröder’s method, although the basin of attraction of \(x=1\) decreases as the difference between m and n increases, there will always be a small percentage of points converging to this root.

3.4 Example 4

In this last example, we have studied how the dynamical and numerical deductions for polynomials of the form \(f(x)=x^m(x-1)^n\) can be extended to another type of real functions.

  1. (1)

    To approximate the solutions of the function

    $$\begin{aligned} f_1(x)=(e^x-1)^{11}(x-1)^3, \end{aligned}$$

    we study the same initial estimates \(x_0\) as in Example 2. Then, to compare the methods numerically, we construct a table similar to Table 3.

Table 6 Numerical results of the function \(f_1(x)\)

In Table 6, we can see that the method that retains a similar behaviour to that seen in Example 2 is Halley’s method. However, both Chebyshev’s and Newton’s method for multiple roots have many faults since, in many cases, they find the root \(x=0\) very few times. Finally, Schröder’s method is the one that shines numerically since, whether it approximates \(x=0\) or \(x=1,\) the number of iterations is quite small and so are the errors.

On the other hand, as we have done in previous examples, we check how many initial estimates \(x_0\) converge to \(x=0\) or \(x=1\) for each method. To do this, we use the methods, starting by iterating them from \(x_{0,i}=-2+ih,\) \(i=0,\ldots ,nx\) with \(h=0.1\) and \(nx =170,\) and with a maximum number of 50 iterations. Thus, we take a grid of points within the interval \([-2,15]\) and check the numerical results of the Table 7. From this results, we conclude that Schröder and Halley methods converge in \(98.8303\%\) to one of the solutions.

Table 7 Percentage and mean of \(f_1(x)\)
  1. (2)

    For the second function

    $$\begin{aligned} f_2(x)=(e^x-1)^{15}(e^x-e)^3, \end{aligned}$$

    we only show the table of percentage and average iterations of each method to converge to the solutions.

Table 8 Percentage and mean \(f_2(x)\)

This numerical example is of great importance because it completely changes our perception of Schröder’s method. In it, we see that the dynamical behaviour shown by Schröder for polynomial functions does not necessarily extend to all type of functions.

On the other hand, in Table 8, we find another remarkable numerical behaviour since, after the study of \(f_1(x),\) we did not expect Newton’s method to obtain such a high percentage of convergence when studying non-polynomial functions. Note that this percentage reflects exclusively the starting points that end up converging to \(x=0.\)

Finally, note that both Chebyshev’s and Halley’s methods show similar numerical results to those studied for \(f_1(x).\)

  1. (3)

    For the third function

    $$\begin{aligned} f_3(x)=(e^x-1)^{6}\ln (x+2), \end{aligned}$$

    we only study the percentage and average number of iterations of each method to check whether, again, Schröder’s method shows a deficiency in the number of points converging to solutions. Since the domain of the function \(f_3(x)\) is \(D_f=\{x\in {\mathbb {R}}/-2<x<\infty \},\) we take a different mesh: \(x_{0,i}=-2+ih,\) \(i=1,\ldots ,nx\) with \(h=0.1\) and \(nx =169.\) Then, we take a grid of initial points within the half-open interval \((-2,15]\) and check the numerical results of the methods in Table 9.

Table 9 Percentage and mean \(f_3(x)\)

As Table 9 shows, Schröder’s method has again a small percentage of \(x_0\) points converging to one of the two solutions of the problem. On the other hand, we observe that, using Chebyshev’s method, \(95.9063\%\) of the initial points converge to one of the two solutions. As for Halley’s method, we again obtain a percentage of total convergence that coincides with that obtained for \(f_1(x)\) and \(f_2(x).\) Note that, in this example, there are fewer points converging to the simple root \(x=-1\) due to the location of this root within the interval \((-2,15].\) Finally, note that both, Newton’s and Chebyshev’s methods sometimes find the simple root \(x=-1\) because the difference between the multiplicities is not very large.

  1. (4)

    The last function we study,

    $$\begin{aligned} f_4(x)=(\ln (x+1))^{11}(e^x-e)^3, \end{aligned}$$

    has as domain \(D_f=\{x\in {\mathbb {R}}/-1<x<\infty \}.\) For this reason, we work with a mesh with step size \(h=0.1\) over the interval \((-1,16].\) In this way, we obtain the Table 10, which shows the numerical results for each of the four methods.

Table 10 Percentage and mean \(f_4(x)\)

In this last example, we recover the numerical behaviour that could be expected a priori from Schröder’s method. However, in all the examples analysed, Halley’s method is the method with the highest percentage of total convergence and, furthermore, it finds the root \(x=1\) the most times.

4 Conclusions

The main conclusion we get from both studies, the dynamical analysis and the numerical experiments, of some classical multiple roots finding methods applied for finding roots with different multiplicities is that Halley’s method for multiple roots finds the two roots of the nonlinear function we are working with, even though they have different multiplicities.

This does not happen in the case of the Newton and Chebyshev methods, since the root with the lowest multiplicity can even be repulsive, so the method does not find it. In addition, the method can present other attractors different from the roots, so the result can be completely wrong.

On the other hand, although both roots are superattractive in Schröder’s method, we have proved in Lemma 2.10 that the basin of attraction of the root with the lowest multiplicity can become so small that the number of points tending to this root is not relevant.

In Sect. 3 we numerically check the results previously predicted for the polynomial \(f(x)=x^m(x-1)^n\) with \(x\in {\mathbb {R}}\) and \(m,n\in {\mathbb {N}}.\)

Finally, in Sect. 3.4 we study real functions that combine polynomial, exponential and logarithmic functions to find out if the dynamical behaviour can be extended to other non-polynomial functions. We conclude that Halley’s method is the iterative scheme that presents a higher total percentage of convergence for the four non-polynomial functions studied, finding all the roots of our functions.