Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

laguerre

Laguerre's Method


Description

Laguerre's method for finding roots of complex polynomials.

Usage

laguerre(p, x0, nmax = 25, tol = .Machine$double.eps^(1/2))

Arguments

p

real or complex vector representing a polynomial.

x0

real or complex point near the root.

nmax

maximum number of iterations.

tol

absolute tolerance.

Details

Uses values of the polynomial and its first and second derivative.

Value

The root found, or a warning about the number of iterations.

Note

Computations are caried out in complex arithmetic, and it is possible to obtain a complex root even if the starting estimate is real.

References

Fausett, L. V. (2007). Applied Numerical Analysis Using Matlab. Second edition, Prentice Hall.

See Also

Examples

# 1 x^5 - 5.4 x^4 + 14.45 x^3 - 32.292 x^2 + 47.25 x - 26.46
p <- c(1.0, -5.4, 14.45, -32.292, 47.25, -26.46)
laguerre(p, 1)   #=> 1.2
laguerre(p, 2)   #=> 2.099987     (should be 2.1)
laguerre(p, 2i)  #=> 0+2.236068i  (+- 2.2361i, i.e sqrt(-5))

pracma

Practical Numerical Math Functions

v2.3.3
GPL (>= 3)
Authors
Hans W. Borchers [aut, cre]
Initial release
2021-01-22

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.