# Ken Ward's Mathematics Pages

## Solving Cubics Using Various Methods

On this page, we use various methods, factorisation, rational root theorem, Descartes rule of Signs, Vieta's Root Theorem, to try to solve cubic equations. While we can sometimes figure out the factors of a cubic, I won't deal with this directly.
Every cubic with real coefficients has either one real root or three. Alternatively, it has 2 complex roots or none.

In the real world, cubic equations will not be so easy to solve as they are on this page, because the roots may not be easy integers.

## Example 1

f(x)=x3+4x2+x-6=0 [1]

## Descartes' Rule of Signs

The signs of the coefficients are:
+ + + -
Therefore there is one positive real root of the equation. We know every cubic has at least one real root, and now we know that for this cubic, the root is positive.
As every cubic has 3 roots, then, we know immediately that this one has 2 negative real roots or none.
Just for the record, the signs of the coefficients for f(-x) are:
- + - -
Showing two sign changes and indicating 2 or no negative real roots.

## Rational Root theorem

If the equation has rational roots, p/q, then p|-6=1.2.3, and q|1, where "|" means "is a factor of".
This means any rational roots would be: ±(1/1, 2/1, 3/1, or 6/1).
In this case, we can quickly check that 1 is a root. Because we must use all the factors in our roots, if one factor is 1, then the other two must be ±2 or ±3, or ±1 and ±6, if the roots are rational.
We might at this stage realise that the equation can be easily factorised.

## Vieta's Root Theorem

α+β+γ=-4
αβγ=6
With one positive root, the possible roots could be -2, -3 and 1, by inspecting the possibilities from the rational root theorem.
Other possibilities, such as 1, 1, -6 do not fit as Descartes has said there is only one positive real root. Naturally, 1 is easy to check and we find that f(1)=1+4+1-6=0, so 1 is indeed a root.

## Horner's Scheme

We can use Horner's scheme to check our roots, dividing first by 1, and then by -2.
 1 4 1 -6 1 0 1 5 6 1 5 6 0 -2 0 -2 -6 1 3 0

The last line is 1,3, or x+3=0, so we see the last root is indeed -3. Alternatively, after dividing by 1, we find that the result of division by x+1 is 1,5,6, or x2+5x+6=0, which is easily solved [(x+2)(x+3)=0]
The original equation,
x3+4x2+x-6=(x-1)(x+2)(x+3)=0

## Graph

The graph tells the whole story, clearly indicating roots around -3, -2 and 1.

2x3-4x2+3x-27

## Descartes' Rule of Signs

The signs for a positive are:
+ - + -
So there are 3 or 1 real positive roots. There can't be any real negative roots, as cubics have only 3 roots. However, these are the signs for f(-x):
- - - -
As expected, no negative roots. So we are sure there is one positive real root, and perhaps three of them.

## Rational Roots Theorem

If there are any rational roots for this equation, p/q are such that p|27=1.33 and q|2=1.2.
So amongst the possibilities are 1, 3, 9, 27, and 1/2, 3/2, 9/2, 27/2.

## Vietas Root Theorem

α+β+γ=4/2=2
αβγ=27/2=13.5
According to Descartes, all the real roots are positive. Considering our possible rational roots from above, it seems hard to find a possible combination. We know for sure that at least one root is real and positive, so perhaps the other roots are complex numbers of the form a+bi and a-bi, where a is negative.
In this case, our real root must be greater than +2. The first number we have greater than 2 is 3, which we can try in Horner's scheme, or otherwise.

## Horner's Scheme

2x3-4x2+3x-27
 2 -4 3 -27 3 0 6 6 27 2 2 9 0
So 3 is a root of the equation, and from Horner's scheme we find other factor is:
2x2+2+9=0
Because b2<4ac (4<72) the roots are complex. From the quadratic equation, we note:

The roots are:
x1= – 0.5 + 2.0615528i
x2= – 0.5 – 2.0615528i
Or x= -0.5 ± √(17/4)i

## Graph

The graph reveals a root near 3, but might leave us wondering whether it ever comes back to the real world, producing real roots outside the range of our graph, if we hadn't done our analysis.

## Example 3

84x3+149x2+80x+12=0 [1]

## Descartes' Rule of Signs

The signs of the coefficients are:
+ + + +
There aren't any positive real roots.
As every cubic has 3 roots, then, we know immediately that this one has 3 negative real roots or one.
Just for the record, the signs of the coefficients for f(-x) are:
- + - +
Showing 3 sign changes and indicating 3 or one negative real roots.

## Rational Root theorem

If the equation has rational roots, p/q, then p|12 and q|84, where "|" means "is a factor of". This means any rational roots would be: p|1.2².3, and q|1.2².3.7. They will all be negative, if real roots.

## Vieta's Root Theorem

α+β+γ=-149/84=-1.7738 (approximately)
αβγ=-12/84=-1/7
All the real roots are negative, and one root is definitely real and negative.

## Graph

The graph indicates that the roots could be: -6/7, -2/3, and -1/4, although we would guess this only after our analysis.

## Example 4

9x3-71x2-3833x-425

## Graph

This time, starting with the graph, we note the roots are around -17, 0, 25. We know one root isn't exactly 0, because there is a constant term in the equation.

## Descartes' Rule of Signs

9x3-71x2-3833x-425 The signs of the coefficients are:
+ - - -
There is definitely one positive real root. This means that because a cubic has 3 roots, there are 2 or 0 real negative roots. The root near zero is therefore a negative number. From the graph, we see the function has 3 real roots.

## Rational Root theorem

If the equation has rational roots, p/q, then p|425=52.17 and q|9, where "|" means "is a factor of". This means any rational roots would be: p|1.17.52, and q|1.3². Two are negative, and one positive.
The possible denominators, q, are:
1.1.9
1.3.3
So at least one root would be a whole number.
and the possible numerators, p are:
1.17.25
1.1.425
5,5,17
We can quickly (or more quickly) eliminate q=±1, with 1 as a denominator, leaving ±5, ±17 and ±25 to check. However, if ±5 is a numerator, then the other roots are ±5 and ±17. Otherwise, if ±25 is a numerator, then the other is ±17. (We need to use up all the factors), so ±17 is worth checking first.

## Vieta's Root Theorem

α+β+γ=71/9=7+8/9 [1]
αβγ=425/9=47+2/9 [2]
One root is positive and the other 2 are negative. It seems that, also looking at the Rational Root Theorem and the graph, one root is 25, and  one is -17 . The other root seems to be -1/9 because it needs to be small, and 25-17=8, and to get the sum of all the roots [1], subtracting 1/9 gives us the right answer.
Also, the product of these roots is: 25(-17)(-1/9)=425/9 which is the same as [2].

## Horner's Scheme

9x3-71x2-3833x-425
We try Horner's Scheme for -1/9, and because it works, we also try 25
 9 -71 -3833 -425 -1/9 0 -1 8 425 9 -72 -3825 0 25 0 225 3825 9 153 0

The last line, 9,153 is 9x+153=0, so x=-17
The roots are -17, -1/9 and 25

## Example 5

100x³+59x²–145x+2

The graph indicates that there are three real roots near -1.5, 0 and 1.

## Descartes' Rule of Signs

100x³+59x²–145x+2
The signs of the coefficients are:
+ + - +
There are two positive real roots, or none. The root near zero is therefore a positive real root, as the other positive real root is near 1.
The signs for f(-x), used to find the negative real roots (which we already know!) are:
- + + +
As expected, there is one negative real root.

## Rational Root theorem

If the equation has rational roots, p/q, then p|2 and q|100, where "|" means "is a factor of". This means any rational roots would be: p|1.2, and q|22.5². Two real roots are positive and one is negative.

## Vieta's Root Theorem

100x³+59x²–145x+2
α+β+γ= -59/100     [1]
αβγ=-2/100            [2]

## More Graphs

The graph below has simply been zoomed in to between -1.54 and -1.53995, suggesting the root is near -1.53999

Zooming in to between -1.5399949 and -1.5399948, suggests the root is very close to -1.5399948

The approximate root by Cardano's formula is –1.5399948019
The roots of the equation 100x³+59x²–145x+2  are:
x1=  0.9361215427
x2=–1.5399948019
x3=  0.0138732592

Ken Ward's Mathematics Pages

# Faster Arithmetic - by Ken Ward

Ken's book is packed with examples and explanations that enable you to discover more than 150 techniques to speed up your arithmetic and increase your understanding of numbers. Paperback and Kindle: