On this page
When you solve a quadratic equation, you get one or two specific numbers. But when you solve a quadratic inequality, you get an entire range of numbers. Counting the integers inside that range is a common step in exams like JEE Main, but it is easy to drop marks by miscounting the boundary points.
The core of the problem is knowing what an inequality actually asks for. A 2006 study by researchers Pongchawee Vaiyavutjamai and M. A. Clements in *Mathematical Thinking and Learning* found that many secondary students believe an inequality has only one specific solution, much like an equation. They apply algebraic rules correctly but stop at the roots, never realising the answer is a continuous interval.
Here is how to solve for the interval first and then count the integers inside it without missing the endpoints.
How do you find the solution interval?
Before you can count anything, you need to establish the boundaries. Start by treating the inequality as an equation to find its roots. For an inequality like x² − 5x + 4 ≤ 0, you first solve x² − 5x + 4 = 0.
Factoring this expression gives (x − 1)(x − 4) = 0, meaning the roots are x = 1 and x = 4. These roots act as your critical points on the number line.
Because the x² term is positive, the graph of the parabola opens upwards. It dips below the x-axis—where the expression is less than or equal to zero—between the roots. Therefore, the solution is the closed interval [1, 4], which can also be written as 1 ≤ x ≤ 4.
If the inequality had been x² − 5x + 4 ≥ 0, you would look for where the parabola is above the x-axis, which happens outside the roots: x ≤ 1 or x ≥ 4. If you are studying when a quadratic is always positive, you already know that the parabola never dips below the axis at all when the discriminant is negative, meaning the inequality would be true for all real numbers.
How do you count the integers in the interval?
Once you have the interval, counting the integers is straightforward if you pay attention to the inequality signs. The difference between "less than" (<) and "less than or equal to" (≤) completely changes the count.
For a closed interval like 1 ≤ x ≤ 4, the endpoints are included. You count every whole number from 1 to 4 inclusive.
The integers are 1, 2, 3 and 4.
The total count is 4.
For an open interval, such as x² − 5x + 4 < 0, the roots themselves are not included. The interval is strictly 1 < x < 4.
You cannot include 1 or 4.
The integers inside are only 2 and 3.
The total count drops to 2.
When the roots are not integers, the endpoints make less of a difference to the counting process, but you still need to be careful. For example, if your interval is 1.2 < x < 4.8, the integers inside are 2, 3 and 4.
What happens when the algebra gets complicated?
Sometimes finding the roots requires the quadratic formula, giving you messy decimal boundaries. If you end up with an interval like (5 − √17)/2 < x < (5 + √17)/2, you should approximate √17 as slightly more than 4, perhaps 4.1.
Substituting this back gives (5 − 4.1)/2 = 0.45 and (5 + 4.1)/2 = 4.55. This results in boundaries of roughly 0.45 < x < 4.55. The integers inside this range are 1, 2, 3 and 4.
If you find yourself stuck repeatedly on these boundary conditions, or if you are blindly applying rules from quadratic word problems in Class 10 without fully grasping the intervals, sketching the curve can help you see the regions. An AI tutor can also step in to ensure you understand whether to include the endpoints before you start counting.
A practical checklist for counting integer solutions
Use this routine to avoid common errors during exams:
Standardise the inequality: Move all terms to one side so you are comparing the quadratic expression directly to zero.
Find the roots: Factor the quadratic, use the formula, or look for a shared root of two quadratics if you are dealing with a system of inequalities.
Sketch the parabola: A quick sketch showing whether the curve opens up or down tells you instantly if the solution is between or outside the roots.
Write the interval: Write it down clearly with the correct < or ≤ signs.
List the integers: If the interval is small, physically list the numbers on the page. If it is large, use the floor and ceiling method, and always double-check the boundary rules.
To practice these steps on real exam questions, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer.



