Question:

Find the value of the constant $\displaystyle k$ for which the line $\displaystyle y + 2x = k$ is a tangent to the curve $\displaystyle y = x^2 - 6x + 14.$

Attempt:

$\displaystyle y = x^2 - 6x + 14$

$\displaystyle y + 2x = k$

$\displaystyle y = k - 2x$

$\displaystyle = x^2 - 6x + 2x + 14 - k$

$\displaystyle = x^2 - 4x + 14 - k$

$\displaystyle a = 1$, $\displaystyle b = -4$, $\displaystyle c = 14$

$\displaystyle x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$

$\displaystyle x = \frac{-(-4) \pm \sqrt{(-4)^2 - 4\times 1\times 14}}{2\times 1}$

I can't continue because Im getting a negative value inside the square root, where did I go wrong?