Root Solver: Finding all roots

8 次查看(过去 30 天)
KT
KT 2020-9-30
Hi all,
I was wondering if there is a predefined root solver which finds ALL zero roots of an equation between a certain interval?
I am currently using a script which incrementally increases the interval until it finds a roots, then it gets saves in an array and then searches for the next one, but this takes ages as I need to find hundreds of roots.
Roots finders such as bisection, newton raphson and so on stop after they have found one root.
Is there a function I can use which is fast and finds ALL roots between a certain interval?
Any advice will be appreciated.

回答(1 个)

Walter Roberson
Walter Roberson 2020-9-30
I was wondering if there is a predefined root solver which finds ALL zero roots of an equation between a certain interval?
No. It can be proven that such a root solver is impossible to create for general equations.
It is possible to create a numeric solver for certain forms of equations, given symbolic representation, with all the coefficients expressed as "algebraic numbers" -- Yes, I know there is an asymmetry there of requiring exact coefficients but only giving numeric solutions, but the degree 5 and higher polynomials do not necessarily have algebraic numbers as their roots.
The reason I am disallowing floating point representation of the equations for this purpose is that in certain cases where there are multiple roots that are very close together but not identical, it might not be possible to properly distinguish the roots when you are working in floating point.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by