[Math] Given a cubic equation, how can you determine a range that contains all roots without solving

algorithmspolynomialsroots

I am trying to code an algorithm that does not use the cubic formula in order to determine a cubic function $(ax^{3} + bx^{2} + cx + d)$ roots. I came across an algorithm (https://rosettacode.org/wiki/Roots_of_a_function#Java) where a range is given for where the roots may lie. From then, the algorithm searches inbetween this range. (If anyone knows the name of this algorithm that will also be a massive help!)

However, I would like to improve this somehow by calculating a suitable range for the algorithm to search within so that this does not rely on input and so that many different coefficients can be input and an effective range can be chosen. Is there any way to do this reasonably quickly, looking at coefficients and not actually solving it? I'm not looking for you to write the program for me, just to point me to a way to do this. Thank you 😀

Best Answer

If $|x| > 1$ and $|x| > (|b|+|c|+|d|)/|a|$, then

$|ax^3| > (|b|+|c|+|d|)|x^2| > |bx^2| + |cx| + |d| \ge |bx^2+cx+d|$

and so $|f(x)| \ge |ax^3| - |bx^2+cx+d| > 0$.

This shows that the roots $x$ of $f$ satisy $|x| \le \max \{1, (|b|+|c|+|d|)/|a| \}$

Related Question