On this page
The range of a function is the set of values it actually takes. For something like y = (x² − x + 1)/(x² + x + 1), sketching is slow and calculus is long. The discriminant method turns the question into one you already know how to answer: for which y does the equation f(x) = y have a real solution? This post works it on four functions, including one where the discriminant alone gives the wrong range.
Where is this in the syllabus?
The JEE (Main) 2026 syllabus lists rational functions among real-valued functions, and nature of roots under quadratic equations, which is the tool used here. The JEE (Advanced) 2026 brochure lists quadratic equations with real coefficients and the relations between roots and coefficients. The NCERT Class 11 chapter Relations and Functions (2026-27 reprint) defines rational functions as f(x)/g(x) with g(x) ≠ 0 and asks for domain and range, but it does not teach the discriminant method by name. Check the current documents for your exam.
Why does the discriminant give the range?
A number y is in the range exactly when some x in the domain satisfies f(x) = y. For y = P(x)/Q(x) with P and Q quadratics, multiply out:
yQ(x) − P(x) = 0
This is a quadratic in x whose coefficients depend on y. It has a real solution when its discriminant D(y) is at least zero. So the range is "all y with D(y) ≥ 0", with two checks:
The vanishing coefficient. For one value of y, the x² coefficient may be zero. Then the equation is linear, the discriminant test does not apply, and you must solve it directly.
The forbidden x. If a solution x makes Q(x) = 0, it is not in the domain and does not count.
Worked example 1: a clean case
Find the range of y = (x² − x + 1)/(x² + x + 1).
The denominator never vanishes, since its discriminant is 1 − 4 < 0. Rearranging:
(y − 1)x² + (y + 1)x + (y − 1) = 0
Check y = 1 first. The equation becomes 2x = 0, so x = 0, which is allowed. So 1 is in the range.
For y ≠ 1, the discriminant must be non-negative: (y + 1)² − 4(y − 1)² ≥ 0.
Factor as a difference of squares: (y + 1 − 2y + 2)(y + 1 + 2y − 2) = (3 − y)(3y − 1) ≥ 0, so 1/3 ≤ y ≤ 3.
Range: [1/3, 3]. Check the ends: y = 3 gives 2x² + 4x + 2 = 0, so x = −1, and f(−1) = 3/1 = 3. y = 1/3 gives x = 1, and f(1) = 1/3.
Worked example 2: the hole the discriminant cannot see
Find the range of y = (x² − 3x + 2)/(x² + x − 6).
Apply the method blindly:
(y − 1)x² + (y + 3)x − (6y + 2) = 0
D = (y + 3)² + 4(y − 1)(6y + 2) = 25y² − 10y + 1 = (5y − 1)²
That is never negative, so it looks as if every y works. It does not.
Vanishing coefficient, y = 1: the equation is 4x − 8 = 0, so x = 2. But x² + x − 6 = (x − 2)(x + 3) is zero at x = 2, so x = 2 is outside the domain. y = 1 is not in the range.
Double root, y = 1/5: D = 0, so the only root is x = −(y + 3)/(2(y − 1)) = −3.2/(−1.6) = 2. Again outside the domain. y = 1/5 is not in the range.
Range: all real numbers except 1 and 1/5.
Factoring explains it. The function is (x − 1)(x − 2)/[(x − 2)(x + 3)] = (x − 1)/(x + 3) with x ≠ 2. The simplified graph never reaches 1 (its horizontal asymptote), and the point it would have at x = 2, which is 1/5, has been removed.
Worked example 3: when the range has a gap
Find the range of y = (x² + 2x + 4)/(x + 1).
Rearranging: x² + (2 − y)x + (4 − y) = 0. The x² coefficient is 1, so there is no special y. The discriminant is (2 − y)² − 4(4 − y) = y² − 12, which must be at least zero, so |y| ≥ 2√3.
The forbidden x is −1. Substituting x = −1 into the quadratic gives 1 − 2 + y + 4 − y = 3, which is never zero, so x = −1 is never a root.
Range: y ≤ −2√3 or y ≥ 2√3. The graph has two branches and never enters the strip between about −3.46 and 3.46.
Worked example 4: linear over linear
For y = (2x + 1)/(x − 3), you do not need a discriminant. Solve for x: x = (3y + 1)/(y − 2), which exists for every y except 2. Range: all real numbers except 2. The excluded value is the ratio of the leading coefficients, 2/1.
Which mistakes cost marks?
Dividing by the x² coefficient without checking when it is zero.
Not checking whether the x found lies in the domain.
Writing D > 0 instead of D ≥ 0, which loses the end values.
Skipping the factor check, as in example 2.
A practice routine
Find the range of y = x/(x² − 5x + 9) and check your end values by substitution.
Find the range of y = (x² − 4)/(x² − 5x + 6), looking for a common factor first.
For domain rules and composite functions, read our domain and range guide, and for more on discriminants, nature and location of roots.
If you want to see why a graph never reaches its excluded value, Fermi's Simulation Lab has interactive simulations for ideas that are easier to see than read.
Today, rework example 2 by factoring first, and check that you get the same two excluded values.



