Algebra - Equations and Inequations

The roots $x_1$ and $x_2$ of the equation $x^2 + px + 12 = 0$ are such that $x_2 - x_1 = 1$. Find $p$.


Given quadratic equation: $\;\;\;$ $x^2 + px + 12 = 0$

Relation between the roots $x_1$ and $x_2$ of the given quadratic equation is

$x_2 - x_1 = 1$ $\;\;\; \cdots \; (1)$

Sum of roots of the given quadratic equation: $\;$ $x_1 + x_2 = -p$ $\;\;\; \cdots \; (2)$

Adding equations $(1)$ and $(2)$ simultaneously gives

$2 x_2 = 1 - p$ $\implies$ $x_2 = \dfrac{1-p}{2}$

Substituting the value of $x_2$ in equation $(1)$ gives

$x_1 = x_2 - 1 = \dfrac{1 - p}{2} - 1 = - \left(\dfrac{1 + p}{2}\right)$

Product of roots of the given quadratic equation: $\;$ $x_1 \cdot x_2 = 12$ $\;\;\; \cdots \; (3)$

Substituting the values of $x_1$ and $x_2$ in equation $(3)$ gives

$- \left(\dfrac{1 - p}{2}\right) \left(\dfrac{1 + p}{2}\right) = 12$

i.e. $\;$ $1 - p^2 = - 48$

i.e. $p^2 = 49$

i.e. $\;$ $p = \pm 7$