[Math] Find a and b of $x^3+ax^2+bx−26=0$

algebra-precalculuscubicsfactoring

I am doing practise papers and one of the questions is:

The cubic equation $x^3+ax^2+bx−26=0$ has $3$ positive, distinct,
integer roots.

Find the values of $a$ and $b$

The mark scheme says:

$3$ roots are $1, 2, 13$. Equation is $x^3-16x^2+41x-26=0$

I'm guessing this has something to do with the factor theorem thing where $x-a$ is a factor if $f(a)=0$ but with 3 unknowns I don't get how you find any of these.

I tried just putting $x$ as $1$:

$$
1^3+a+b-26=0
$$
$$
a+b=25
$$
then doing the same with $2$:
$$
2^3+4a+2b-26=0
$$
$$
4a+2b=18
$$
and after subsituting the two equations I got the answer of a $a=-16$ and $b=41$. However, I realised this was just by chance that these numbers were factors (it didn't work with $x=3$ for example).

What is the proper way to solve this?

Best Answer

If $p$, $q$, $r$ are distinct positive integer roots of $P(x) = x^3 + ax^2 + bx - 26$, then we must have $$(x-p)(x-q)(x-r) = x^3 - (p+q+r)x^2 + (pq+qr+rp)x - pqr = P(x),$$ hence equating the constant coefficient, $$pqr = 26 = 2 \cdot 13.$$ Since the prime factorization of $26$ contains only $2$ and $13$, it immediately follows that there is only one unique solution (up to permutation) for this equation that satisfies the given conditions, namely $\{p, q, r\} = \{1, 2, 13\}$ in some order. The rest follows easily.

Related Question