7
$\begingroup$

Suppose I have a cubic equation as $$15x^3-4x^2-25x+14=0$$

By Hit and Trial method I know that one of the roots is $x=1$.

And hence I can solve the cubic equation wit ease as it will take the form of $$(x-1)(ax^2+bx+c)=0$$


But what if the cubic equation is $$15 x^3-64 x^2-69 x+70 = 0$$

One of the roots is $x=5$

How do I guess that? Like...I have to try for $x=0,1,-1,2,-2,3,4,5$. It takes time and huge calculations...

I am only talking about simple roots like $x \in \mathbb{Z}$ (integers) and maybe $x \in [-5,5]$ or maybe $x=\frac{1}{2}$ or $x=\frac{-1}{2}$


The methods I am aware of is drawing an approx graph of the cubic equation using maxima/minima or using Newton's method with maybe 2 iterations and check for integers near that.

So are there any easy yet reliable methods of guessing one root.

$\endgroup$
1

4 Answers 4

17
$\begingroup$

You can use the rational root theorem to guess some roots.

Rational root theorem. All rational roots have the form $\frac{p}{q}$,with $p$ a divisior of the constant term and $q$ a divisior of the first coefficient.

For example, in the integer case, one can take $q=1$, and one only has to test $p = \pm 1$, $p = \pm 2$, $p= \pm 5$, and then you have it. (you of course could test $\pm 7$, $\pm 10$, $\pm 14$, $\pm 35$ and $\pm 70$ as well, but it would be less work to just divide by the $x-5$)

Another technique:

Descartes rule of Signs. The number of positive roots of $P(x)$ is equal to the number of sign changes is the sequence formed by the coefficients of $P(x)$ or it is less by an even number.

The number of negative roots of $P(x)$ is equal to the number of sign changes is the sequence formed by the coefficients of $P(-x)$ or it is less by an even number.

Roots with multiplicity $n$ are counted $n$ times.

In this case it is useless. But if it is a polynomial like $x^3+3x^2+4x+2$, you now know that there are no positive roots.

Last technique:

Estimating roots. If you've tested all eligible roots that are smaller than, say, 10, then you can use this. If the first two coefficients are not extremely small compared to the last two, then its a good idea to look to you eligible roots near to $$-\frac{\mathrm{second} \; \mathrm{coefficient}}{\mathrm{first} \; \mathrm{coefficient}}$$

If the root is larger than 10, the $x^3$ and $x^2$ term are large enough to be able to ignore the smaller terms, thus this is a good estimation. Write $a$ for the first coefficient and $b$ for the second, $c$ for the third and $d$ for the fourth.

Now, if $x$ is large, then $ax^3+bx^2+cx+d \sim ax^3+bx^2$. Therefore the roots will be comparable. But $ax^3+bx^2=0$ gives $x^2=0$ or $ax+b=0$. In the first case $x$ isn't large enough. In the second case we have $ax+b=0$, thus $ax=-b$, thus $x=\frac{-b}{a}=-\frac{\mathrm{second} \; \mathrm{coefficient}}{\mathrm{first} \; \mathrm{coefficient}}$.

$\endgroup$
14
  • $\begingroup$ The constant term is $70$, so a priori there are several more integers to check: $\pm 7, \pm 10, \ldots$. $\endgroup$ Jul 6, 2015 at 8:48
  • 2
    $\begingroup$ @Travis, yes, but then you hit the first integer root and you don't need it anymore. $\endgroup$
    – wythagoras
    Jul 6, 2015 at 8:49
  • $\begingroup$ Ah, I see, yes, if you take that order, you're done for this polynomial. (+1) $\endgroup$ Jul 6, 2015 at 8:52
  • 1
    $\begingroup$ @NeilRoy In your cubic equation, the constant term is 70. 4 and 6 are no divisiors of 70. $\endgroup$
    – wythagoras
    Jul 6, 2015 at 9:09
  • 1
    $\begingroup$ @NeilRoy I added something for that as well. $\endgroup$
    – wythagoras
    Jul 6, 2015 at 9:40
6
$\begingroup$

You could work by locating the roots approximately by computing at some easy values and noting sign changes - Sturm's Theorem is a heavy duty resource, and Descartes Rule of Signs can be indicative. There are more basic observations too, which can help to narrow the search amongst rational roots - using changes in the sign of the value and the intermediate value theorem.

In this example the polynomial is positive at $x=0, x=-1$ but negative at $x=1$ - so that's located a small positive root. And the polynomial is positive for large $x$ and negative for small (large negative) $x$. Choose $x=\pm10$ as easy to calculate - the value is positive for $x=10$ and negative for $x=-10$.

So if there is an integer root (noting that we've located all three roots approximately) it is greater than $1$ and less than $10$, or less than $-1$ and greater than $-10$ and is a factor of $70$. And every calculation we've done so far has been very easy.

The calculations for $\pm n$ can be done together, because the terms have the same magnitude, and with the options being $2,5,7$ you do $\pm 5$ first because that tells you whether to do $2$ or $7$ if $5$ is a miss.

$\endgroup$
1
  • $\begingroup$ Wow... Thanks for the answer! $\endgroup$
    – NeilRoy
    Jul 6, 2015 at 9:43
6
$\begingroup$

To expand on wythagoras' excellent answer, let me point out that when some of the coefficients are reasonably large (as in this case), we can sometimes relatively quickly extract some more information by reducing the given polynomial $f$ modulo a small integer $m$. This exploits the idea that if $r$ is a root of $f$, so that $f(r) = 0$, then $f(r) \equiv 0 \pmod m$.

Recall (again from wythagoras' answer) that, by the Rational Root Theorem, any integer solution must be a factor of $70$ (or the negative thereof), giving the possibilities $$\pm 1, \pm 2, \pm 5, \pm 7, \pm 10, \pm 14, \pm 35, \pm 70.$$

Now, for example, reducing $f$ modulo $9$ gives $$x \equiv 4, 5 \pmod 9,$$ and this condition leaves only $$\pm 5, \pm 14,$$ already a major reduction.

At this point, we can check these directly, or take another small $m$. (For example, reducing modulo $8$ gives $$x \equiv 1, 5, 6 \pmod 8,$$ which leaves only $$5 \text{ and } 14 .)$$ In short, by making judicious choices, we can radically reduce the number of unpleasant computations involving larger numbers at the cost of doing some easier computations modulo $m$. (Of course, this is begging the question in a way, as we've partially replaced a choice of roots to test with a choice of integers $m$ by which to reduce, but with some practice, the latter computations are very fast anyway, and so even testing increasing small $m$ consecutively perhaps isn't too inefficient.)

$\endgroup$
-1
$\begingroup$

Considering the equation to be $ax^3+bx^2+cx+d=0$ check for $d$ is product of roots. so you can take the divisors of $d$ for trial Example : $15x^3-64x^2-69x+70=0$ Here the product of the roots is $70$ divisors of $70$ are $1,2,5,7,10,14,35,70$ so you can try these numbers instead of $1,2,3,4,5,6,7,8,9,10$. Make sure you try the negative numbers too.

$\endgroup$
4
  • $\begingroup$ Welcome to math.SE! Your argument is a bit fuzzy. You may want to elaborate it in order to make it actually useful for the OP. Also, you migh use some tip on the use of MathJax. $\endgroup$
    – user228113
    Jul 6, 2015 at 10:05
  • $\begingroup$ Hope that helps $\endgroup$
    – user252718
    Jul 6, 2015 at 10:26
  • 1
    $\begingroup$ This is the Rational Root theorem. $\endgroup$
    – wythagoras
    Jul 6, 2015 at 10:59
  • 2
    $\begingroup$ It is not true that $d$ is product of the roots. What is true is that $x_1x_2x_3 = - \frac da$. (See Vieta's formulas.) $\endgroup$ Jul 6, 2015 at 11:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .