# Find k if the two polynomials have one common root

The equations $x^2−4x+k=0$ and $x^2+kx−4=0$, where $k$ is a real number, have exactly one common root. What is the value of $k$?

I know the answer but can it be done with the relation of roots. $a$ and $b$ are roots of equation 1 and $a$ and $c$ are roots of equation 2. So the relations are :-

1. $a + b = 4$
2. $ab = k$
3. $a + c = (-k)$
4. $ac= (-4)$

I tried doing all the stuff but couldn't get it. Can we find it using these 4 equations?

• Hint: subtract the first equation to the second, you will get the expression of the common root $x$ expressed as a function of $k$. – Jean Marie Sep 21 '17 at 7:44

Using your equations . . .

1. $\;a + b = 4$
2. $\;ab = k$
3. $\;a + c = (-k)$
4. $\;ac= (-4)$

Adding equations $(1)$ and $(4)$, we get $$a + b + ac=0\tag{5}$$ Adding equations $(2)$ and $(3)$, we get $$a + c + ab=0\tag{6}$$ Subtracting equation $(6)$ from equation $(5)$, we get \begin{align*} &b-c + ac - ab = 0\\[4pt] \implies\;&b-c+a(c-b) = 0\\[4pt] \implies\;&(b-c)(1-a)= 0\\[4pt] \implies\;&b=c\;\;\text{or}\;\;a=1\\[4pt] \end{align*}

If $b=c$, then the left-hand-sides of equations $(2)$ and $(4)$ are equal, hence the right-hand-sides must also be equal, which yields $k=-4$. But for $k=-4$, the two given equations are identical, hence have two common roots, not one.

Hence we must have $a=1$.

Using $a=1$ in equation $(1)$ yields $b=3$, and then equation $(2)$ yields $k=3$.

If they have the same root, then $$x^2-4x+k=x^2+kx-4$$ That means $$-4x+k=kx-4\to kx+4x=k+4\to x=1$$ Plug this in one of the two equations and get $1-4+k=0\to k=3$

Indeed $x^2-4x+3=0\to x_1=1,\;x_2=3$ and

$x^2+3x-4=0\to x_1=1;\;x_2=-4$

Hope this helps

If $a+b=4$, then $a^2 + ab = 4a$. So

$$a^2-4a+k=0. \tag 1$$

If $a+c=-k$, then $a^2+ac=-ka$. So

$$a^2 + ka -4 = 0. \tag 2$$

So $0 = (a^2 + ka -4)-(a^2-4a+k)=(k+4)a-(k+4)=(k+4)(a-1)$

So $k=-4$ or $a=1$

If $k=-4$, then both trinomials become $x^2-4k-4$ and so they have two roots in common: $2+\sqrt 8$ and $2-\sqrt 8$.

If $a=1$, then plugging $a=1$ into equations $(1)$ and $(2)$ yields the equations

$$1-4+k=0 \qquad \text{and} \qquad 1+k-4=0$$

and both equations have the single solution $k=3$.

Two polynomials have a common root if and only if their resultant vanishes.

The resultant $R(p(x), q(x))$ of two polynomials of degrees $m$ and $n$, respectively, is the determinant of the $(m + n) \times (m + n)$ matrix defined as follows. Write the coefficient of $p(x)$ in the first row followed by $n - 1$ zeros. In the next row the coefficients are displaced one place to the right, with one zero to the left and $n - 2$ zeros to the right. Continue in this fashion until the $nth$ row is $n - 1$ zeros followed by the coefficients of $p(x)$. For the last $m$ rows, we do the same thing with $p(x)$ and $q(x)$ interchanged.

For your case, let $p(x) = x^{2} - 4x + k,\; q(x) = x^{2} + kx - 4$. So the resultant is $$R(p(x), q(x)) = \mbox{det}\left(\begin{array}{cccc} 1 & -4 & k & 0\\ 0 & 1 & -4 & k\\ 1 & k & -4 & 0\\ 0 & 1 & k & -4\\ \end{array}\right).$$ Computer solution gives $k = 3, k = -4$. So there are two common roots, as quasi mentioned.