# The equations $x^3+5x^2+px+q=0$and $x^3+7x^2+px+r=0$ have 2 common roots, then find the third root of both equations

The equations $x^3+5x^2+px+q=0$and $x^3+7x^2+px+r=0$ have 2 common roots, then find the third root of both equations

From the first equation we can say, $\alpha\beta+\beta\gamma+\gamma\alpha=p/1=p$. Similarly from the second equation we know, $\alpha\beta+\beta\delta+\delta\alpha=p/1=p$
Hence,
$\alpha\beta+\beta\delta+\delta\alpha=\alpha\beta+\beta\gamma+\gamma\alpha$
$\delta(\beta+\alpha)=\gamma(\beta+\alpha)$
$\delta=\gamma$
Hence the third root of both equations should be equal, but $\alpha+\beta+\gamma=-5$ and $\alpha+\beta+\delta=-7$. Now, where did I go wrong?

• What if $\alpha+\beta=0$ – user35508 Mar 19 '17 at 7:08
• @user35508 ahhh...got my mistake, thank you! – oshhh Mar 19 '17 at 7:09
• If all the roots are equal..Then the polynomial must be same...but they are different ..So $\alpha+\beta=0$ which immediately gives the answer – user35508 Mar 19 '17 at 7:29
• @user35508 You can post this as the answer – oshhh Mar 19 '17 at 7:30

If $$x^3 + 5x^2 + px + q = 0$$ and $$x^3 + 7x^2 + px + r = 0$$ have two common roots then there must exists a common monic binomial factor, $$F(x)$$.

So $$F(x)$$ must be a divisor of

$$(x^3 + 7x^2 + px + r) - (x^3 + 5x^2 + px + q) = 2x^2 - (q - r)$$

So $$F(x) = x^2 - \dfrac 12(q - r)$$.

So, for some $$s$$ \begin{align} x^3 + 7x^2 + px + r &= F(x)(x-s) \\ &= \left[x^2 - \dfrac 12(q - r)\right](x-s)\\ &= x^3 - sx^2 - \dfrac 12(q - r)x + \dfrac 12(q - r)s\\ \hline s &= -7 \\ p &= -\dfrac 12(q - r) \\ r &= -\dfrac 72(q - r) \\ \hline s &= -7 \\ p &= \dfrac 15 q \\ r &= \dfrac 75 q \end{align}

And, for some $$t$$ \begin{align} x^3 + 5x^2 + px + q &= \left[x^2 - \dfrac 12(q - r)\right](x-t)\\ &= x^3 - tx^2 - \dfrac 12(q - r)x + \dfrac 12(q - r)t\\ \hline t &= -5 \\ p &= -\dfrac 12(q - r) \\ q &= -\dfrac 52(q - r) \\ \hline t &= -5 \\ p &= \dfrac 15 q \\ r &= \dfrac 75 q \end{align}

So the third roots are $$-7$$ and $$-5$$.

## Reality check:

So, suppose $$p = -\dfrac 15 q, r = \dfrac 75 q$$. To get rid of the fractions, lets let q = 10k.

Then

• $$p = 2k$$
• $$r = 14k$$
• $$q = 10k$$
• $$s = -7$$
• $$t = -5$$
• $$F(x) = x^2 + 2k$$
• $$x^3 + 7x^2 + px + r = x^3 + 7x^2 + 2kx + 14k$$
• $$x^3 + 5x^2 + px + q = x^3 + 5x^2 + 2kx + 10k$$
• $$F(x)(x-s) = (x^2 + 2k)(x+7) = x^3 + 7x^2 + 2kx + 14k$$
• $$F(x)(x-t) = (x^2 + 2k)(x+5) = x^3 + 5x^2 + 2kx + 10k$$

The difference between the polynomials is a linear factor. Instead of dividing it out, as you implicitly do when applying the Viete identities, we can cross-multiply it to get $$(x-δ)(x^3+5x^2+px+q)=(x-γ)(x^3+7x^2+px+r)$$

Comparing the coefficient of the cubic and quadratic terms gives $$5-δ=7-γ\\ p-5δ=p-7γ$$ so that $$γ=2+δ$$ and $$5δ=7γ=7(2+δ)$$ resulting in $$δ=-7$$ and $$γ=-5$$.

• Could you please explain your first equation? I mean the multiplication....Thanks much. – NoChance Aug 3 at 1:21
• You are given that $p_1(x)=(x−γ)q(x)$ and $p_2(x)=(x−δ)q(x)$. To get something to compare coefficients in you have to modify both polynomials so that they are formally the same expression. You could carry out formal polynomial division like in the answer of steven gregory or implicitly in the OP, that is, compute both sides in $$\frac{p_1(x)}{(x−γ)}=q(x)=\frac{p_1(x)}{(x−δ)}.$$ Or you could cross-multiply and compare $$(x−δ)p_1(x)=(x-δ)(x−γ)q(x)=(x−γ)p_2(x)$$ and compare the coefficients in the resulting 4th degree polynomials as done above. – Dr. Lutz Lehmann Aug 3 at 5:43
• Well put. Thank you much. – NoChance Aug 3 at 12:24

$$P(x) = x^3+5x^2+p x+q = (x-x_1)b(x)\\ Q(x) = x^3+7x^2+p x+r = (x-x_2)b(x)$$

then

$$Q(x)-P(x) = (x_1-x_2)b(x) = 2x^2+r-q$$

and finally

$$(x-x_1) = \frac{P(x)}{b(x)} = (x_1-x_2)\frac{x^3+5x^2+p x+q}{2x^2+r-q}\\ (x-x_2) = \frac{Q(x)}{b(x)} = (x_1-x_2)\frac{x^3+7x^2+p x+r}{2x^2+r-q}\$$

so from any of those equations, equating to $$0$$ the polynomial coefficients we have

$$2-x_1+x_2 = 0\\ 5(x_1-x_2)+2x_1 = 0$$

or

$$2-x_1+x_2 = 0\\ 7(x_1-x_2)+2x_2 = 0$$

giving

$$x_1 = -5,\ \ x_2 = -7$$