On this page
When you are preparing for competitive engineering or mathematics exams, you will often encounter quadratic equations with unknown coefficients. A classic variation gives you a quadratic equation involving a variable like k and asks for the values of k that guarantee the roots are integers.
Approaching this by trial and error is far too slow for a timed exam. Instead, you can solve these problems reliably using two mathematical principles: the condition on the discriminant, and Vieta's formulas.
Why must the discriminant be a perfect square?
The quadratic formula tells us that the roots of ax² + bx + c = 0 are given by x = (-b ± √(b² - 4ac)) / 2a. The term under the square root, b² - 4ac, is the discriminant.
For a quadratic equation with integer coefficients to have rational or integer roots, its discriminant must be a perfect square. If the discriminant evaluates to anything else—like 17 or 42—the square root will leave an irrational surd in the answer, meaning the roots cannot be integers.
When an exam question tests this, the challenge is mostly in staying organised with your signs. If you drop a negative or forget a factor, you miss a possible value of k. The Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer, which is helpful when you need to spot where you dropped a case.
How do you use Vieta's formulas to find integer roots?
If the coefficient of the x² term is 1 (a monic quadratic), the fastest approach usually bypasses the quadratic formula entirely. Vieta's formulas state that for x² + bx + c = 0, the sum of the roots is -b and the product of the roots is c.
MathWorld notes that if a monic quadratic has integer roots, the equation must be factorable over the integers. Because the product of the roots must equal the constant term, the roots must be integer factors of that constant.
Here is a simple framework to apply this on an exam:
Identify the constant term and list every pair of integers that multiplies to give this constant (including negative pairs).
Add each pair together to find the possible sums.
Equate those sums to the -b term to solve for the unknown coefficient.
How to find integer k for which a quadratic has integer roots?
Let's apply the framework to a typical exam question: Find all integer values of k such that x² - kx + 12 = 0 has integer roots.
Since the roots x₁ and x₂ are integers, we use Vieta's formulas:
Product of roots: x₁ × x₂ = 12
Sum of roots: x₁ + x₂ = k
First, list all integer pairs that multiply to 12:
1 and 12
2 and 6
3 and 4
-1 and -12
-2 and -6
-3 and -4
Next, calculate the sum for each pair to find the possible values of k:
1 + 12 = 13
2 + 6 = 8
3 + 4 = 7
(-1) + (-12) = -13
(-2) + (-6) = -8
(-3) + (-4) = -7
The integer values of k that yield integer roots are 13, 8, 7, -13, -8, and -7.
What if the unknown is the constant term?
Sometimes the unknown coefficient is the constant term, such as in the equation x² - 6x + k = 0. We want to find the positive integers k that produce integer roots.
Here, we return to the perfect square rule. The discriminant is D = (-6)² - 4(1)(k) = 36 - 4k.
For the roots to be integers, 36 - 4k must be a perfect square. Let's call this perfect square m². 36 - 4k = m²
Since k must be a positive integer, 4k is positive, so 36 - 4k must be less than 36. We just test the perfect squares smaller than 36 (which are 25, 16, 9, 4, 1, and 0):
If 36 - 4k = 25, then 4k = 11 (k is not an integer).
If 36 - 4k = 16, then 4k = 20, which means k = 5.
If 36 - 4k = 9, then 4k = 27 (k is not an integer).
If 36 - 4k = 4, then 4k = 32, which means k = 8.
If 36 - 4k = 1, then 4k = 35 (k is not an integer).
If 36 - 4k = 0, then 4k = 36, which means k = 9.
So, the values of k that give integer roots are 5, 8, and 9. If you substitute k = 5 into the original equation, you get x² - 6x + 5 = 0, which factors cleanly into (x - 1)(x - 5) = 0, confirming the roots are 1 and 5.
For more on working with the discriminant to test the nature of quadratics, read our guide on when ax² + bx + c is positive for all x. If you are looking at equations with non-real roots, you might find our explanation of solving equations in complex numbers by putting z = x + iy helpful.



