The documentation shows that
import mpmath
n = 10
polyroots(taylor(lambda x: legendre(n,x),0,n)[::-1])
computes the roots of the n-th Legendre polynomial to the current precision. However, it seems that beyond n = 21 the system gets a bit flaky:
dps = 15
n = 22
polyroots(taylor(lambda x: legendre(n,x),0,n)[::-1], extraprec=15, maxsteps=1000)
works, but not for n = 23. Why should the system get into strife at n = 23, when it managed n = 22 quite easily?
Thanks very much,
Alasdair