I am dynamically creating worksheets and I need to come up with some a, b and c values for a quadratic equation that will yield an integer x. How can I do this?
2026-04-04 06:00:07.1775282407
How can I pick values for a quadratic formula that are easily solvable?
78 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
The easiest way is to simply choose roots $r_1$, $r_2$ and second degree coefficient $\alpha\neq 0$ as integers, then expand the expression $$p(x) = \alpha (x-r_1)(x-r_2). $$
Example. Let $\alpha = 2$, $r_1 = -1$ and $r_2 = 3$, then we get
$$p(x) = 2(x-(-1))(x-3) = 2x^2 - 4x -6, $$ which has the requested integer roots $-1$ and $3$.
Coefficients. By expanding $p(x)$ in general you get that $$p(x) = Ax^2 + Bx + C$$ with \begin{align} A &= \alpha\\ B &= -\alpha(r_1 + r_2)\\ C &= \alpha r_1 r_2. \end{align}