newton_maehly


newton_maehly, a Python code which implements the Newton-Maehly algorithm for computing all the roots of a complex polynomial. The algorithm repeatedly applies the Newton method to determine a root, and then deflation.

Licensing:

The information on this web page is distributed under the MIT license.

Languages:

newton_maehly is available in a MATLAB version and an Octave version and a Python version.

Related Data and Programs:

aberth, a Python code which implements the Aberth-Ehrlich algorithm for computing all the roots of a complex polynomial simultaneously. Convergence is asymptotically cubic. However convergence is not guaranteed.

bisection, a Python code which applies the bisection method to seek a root of f(x) over a change-of-sign interval a <= x <= b.

bisection_rc, a Python code which seeks a solution to the equation F(X)=0 using bisection within a user-supplied change of sign interval [A,B]. The procedure is written using reverse communication.

companion_matrix, a Python code which computes the companion matrix for a polynomial. The polynomial may be represented in the standard monomial basis, or as a sum of Chebyshev, Gegenbauer, Hermite, Laguerre, or Lagrange basis polynomials. All the roots of the polynomial can be determined as the eigenvalues of the corresponding companion matrix.

polynomial_root_bound, a Python code which computes the Cauchy bound on the magnitude of all roots of a polynomial with complex coefficients.

r8poly, a Python code which operates on real polynomials, including evaluation, differentiation, integration, multiplication, synthetic division, shifting the base, computing a power, taking the norm. It also defines Chebyshev, Lagrange and Legendre polynomials.

root_rc, a Python code which seeks a solution of a scalar nonlinear equation f(x) = 0, or a system of nonlinear equations, using reverse communication (RC), by Gaston Gonnet.

roots_rc, a Python code which seeks solutions of a system of nonlinear equations, using reverse communication (RC), by Gaston Gonnet.

test_zero, a Python code which defines some test functions for which zeroes can be sought.

wdk, a Python code which implements the Weierstrass-Durand-Kerner algorithm for computing all the roots of a complex polynomial simultaneously. Convergence is asymptotically quadratic. However convergence is not guaranteed.

zero_brent, a Python code which seeks a solution of a scalar nonlinear equation f(x) = 0, by Richard Brent.

zero_chandrupatla, a Python code which finds a zero of a scalar function of a scalar variable, starting from a change of sign interval, using the Chandrupatla method, which can converge faster than bisection, regula falsi, or Brent's method, by Tirupathi Chandrapatla.

zero_itp, a Python code which finds a zero of a scalar function of a scalar variable, starting from a change of sign interval, using the Interpolate/Truncate/Project (ITP) method, which has faster convergence than the bisection method.

zero_laguerre, a Python code which uses Laguerre's method to find the zero of a function. The method needs first and second derivative information. The method almost always works when the function is a polynomial.

zero_rc, a Python code which seeks solutions of a scalar nonlinear equation f(x) = 0, or a system of nonlinear equations, using reverse communication (RC).

Reference:

  1. Friedrich Bauer, Josef Stoer,
    Algorithm 105: Newton Maehly,
    Communications of the ACM,
    Volume 5, Number 7, pages 387-388, 1962.

Source Code:


Last revised on 13 January 2026.