# Math Help - working backwards - cubics

1. ## working backwards - cubics

Write an equation that has the following roots: 2, -1, 5

Answer key: x^3 - 6x^2 + 3x + 10 = 0

For quadratic equations, I use the sum and product of roots, this is a cubic equation, how do I solve this?

Thanks.

2. Originally Posted by shenton
Write an equation that has the following roots: 2, -1, 5

Answer key: x^3 - 6x^2 + 3x + 10 = 0

For quadratic equations, I use the sum and product of roots, this is a cubic equation, how do I solve this?

Thanks.
$(x - 2)(x + 1)(x - 5)$

3. Thanks! That turns out to be not as difficult as imagined. I thought I needed to use sum and products of roots to write the equation, it does makes me wonder a bit why or when I need to use sum and products of roots.

4. Write an equation that has the following roots: 2, -1, 5

Is there any other way to solve this other than the (x-2)(x+1)(x-5) method?

If we have these roots: 1, 1 + √2, 1 - √2

the (x - 1) (x -1 -√2) (x -1 +√2) method seems a bit lenghty.

When we expand (x - 1) (x -1 -√2) (x -1 +√2) the first 2 factors,

it becomes:

(x^2 -x -x√2 -x +1 +√2) (x -1 +√2)

collect like terms:

(x^2 -2x -x√2 +1 +√2) (x -1 +√2)

To further expand this will be lenghty, my gut feel is that mathematicians do not want to do this - it is time consuming and prone to error. There must be a way to write an equation other than the above method.

Is there a method to write an equation with 3 given roots (other than the above method)?

Thanks.

5. Originally Posted by shenton
Write an equation that has the following roots: 2, -1, 5

Is there any other way to solve this other than the (x-2)(x+1)(x-5) method?

If we have these roots: 1, 1 + √2, 1 - √2

the (x - 1) (x -1 -√2) (x -1 +√2) method seems a bit lenghty.

When we expand (x - 1) (x -1 -√2) (x -1 +√2) the first 2 factors,

it becomes:

(x^2 -x -x√2 -x +1 +√2) (x -1 +√2)

collect like terms:

(x^2 -2x -x√2 +1 +√2) (x -1 +√2)

To further expand this will be lenghty, my gut feel is that mathematicians do not want to do this - it is time consuming and prone to error. There must be a way to write an equation other than the above method.

Is there a method to write an equation with 3 given roots (other than the above method)?

Thanks.
You have a pair of roots of the form a+sqrt(b) and a-sqrt(b) if you multiply
the factors corresponding to these first you get:

(x-a-sqrt(b))(x-a+sqrt(b))=x^2+(-a-sqrt(b))x+(-a+sqrt(b))x +(-a-sqrt(b))(-a+sqrt(b))

................=x^2 - 2a x + (a^2-b)

Which leaves you with the easier final step of computing:

(x-1)(x^2 - 2a x + (a^2-b))

RonL

6. Hello, shenton!

The sum and product of roots works well for quadratic equations.

For higher-degree equations, there is a generalization we can use.

To make it simple (for me), I'll explain a fourth-degree equation.

Divide through by the leading coefficient: . $x^4 + Px^3 + Qx^2 + Rx + S \:=\:0$

Insert alternating signs: . $+\:x^4 - Px^3 + Qx^2 - Rx + S \:=\:0$
. . . . . . . . . . . . . . . . . . $\uparrow\quad\;\; \uparrow\qquad\;\;\uparrow\qquad\;\,\uparrow\qquad \,\uparrow$

Suppose the four roots are: $a,\,b,\,c,\,d.$

The sum of the roots (taken one at a time) is: $-P.$
. . $a + b + c + d \:=\:-P$

The sum of the roots (taken two at a time) is: $Q.$
. . $ab + ac + ad + bc + bd + cd \:=\:Q$

The sum of the roots (taken three at a time) is: $-R.$
. . $abc + abd + acd + bcd \:=\:-R$

The sum of the roots ("taken four at a time") is: $S.$
. . $abcd \:=\:S$

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

For your problem with roots: $(a,b,c) \:=\:(2,-1,5)$
. . we have: . $x^3 + Px^2 + Qx + R \:=\:0$

Then: . $a + b + c \:=\:-P\quad\Rightarrow\quad2 + (-1) + 5\:=-P$
. . Hence: $P = -6$

And: . $ab + bc + ac \:=\:Q\quad\Rightarrow\quad(2)(-1) + (-1)(5) + (2)(5) \:=\:Q$
. . Hence: $Q = 3$

And: . $abc \:=\:-R\quad\Rightarrow\quad(2)(-1)(5)\:=\:-R$
. . Hence: $R = 10$

Therefore, the cubic is: . $x^3 - 6x^2 + 3x + 10 \:=\:0$

7. This is awesome, Soroban. Using the method you shown, I was able to solve this problem:

1, 1+√2, 1-√2

a=1, b=1+√2, c=1-√2

Let x^3 - px^2 + qx - r = 0 be the cubic equation

p = a + b + c
= (1) + (1 + √2) + (1 - √2)
= 3

q = ab + bc + ac
= (1)(1 + √2) + (1 + √2)(1 - √2) + (1)(1 - √2)
= 1 + √2 + 1 - 2 + 1 - √2
= 1

r = abc
= (1)(1 + √2)(1 - √2)
= 1-2
= -1

Therefore x^3 - px^2 + qx - r = 0 becomes
x^3 - 3x^2 + x - (-1) = 0
x^3 - 3x^2 + x + 1 = 0

Thanks for the help and detailed workings.