Algebra - Equations and Inequations

Find the coefficients of the equation $x^2 + px + q = 0$ such that its roots are equal to $p$ and $q$.


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

Roots of the given quadratic equation are $\;$ $p, \; q$.

Sum of roots $= p + q = -p$ $\;\;\; \cdots \; (1)$

Product of roots $= p \cdot q = q$ $\;\;\; \cdots \; (2)$

From equation $(2)$, when $q \neq 0$, $\;$ $p = 1$

Substituting $\;$ $p = 1$ $\;$ in equation $(1)$ gives

$1 + q = -1$ $\implies$ $q = -2$

When $\;$ $q = 0$, $\;$ we have from $(1)$

$p + 0 = -p$

i.e. $\;$ $2p = 0$ $\implies$ $p = 0$

$\therefore \;$ Values of $p$ and $q$ are

$p = 0, \; q = 0$ $\;\;$ OR $\;\;$ $p = 1, \; q = -2$