In short

Many JEE and olympiad problems give you a quadratic equation with an unknown parameter and ask: for what values of the parameter do the roots satisfy a given location condition? The technique is always the same — translate the geometric condition into a system of inequalities in the parameter, then solve that system. This article shows the method on progressively harder problems.

For what values of a does x^2 - 2ax + a + 6 = 0 have both roots positive?

Your first instinct might be to solve the quadratic for x using the quadratic formula and then demand both roots be positive. Try it — you get x = a \pm \sqrt{a^2 - a - 6}, and forcing both expressions to be positive is a mess of nested radicals. There is a cleaner way. "Both roots positive" is a geometric statement about where the parabola y = x^2 - 2ax + a + 6 sits relative to the x-axis: it must cross the axis twice, and both crossings must be to the right of the origin. That picture translates into three clean inequalities in a — discriminant, value at zero, axis of symmetry — and the answer is the intersection of those three constraints.

This is the core technique for an entire family of competitive-exam problems: a quadratic with a parameter, a location condition on the roots, and a system of inequalities in the parameter that you must solve simultaneously.

The general workflow

Every problem of this type follows the same five steps.

Step 1. Identify the quadratic, the parameter, and the location condition.

Step 2. Write down the location-of-roots conditions (from the table in the Location of Roots article) as inequalities in the parameter.

Step 3. Solve each inequality separately. Each one gives a constraint on the parameter — usually an interval.

Step 4. Take the intersection of all the intervals. The answer is the set of parameter values that satisfy every condition simultaneously.

Step 5. Verify with a specific value from the answer and one from outside it.

The difficulty is never in any single step. It is in keeping track of multiple inequalities and intersecting them correctly. That is what the rest of this article practises.

Building the technique: both roots positive

Start with the problem from the introduction: both roots of x^2 - 2ax + a + 6 = 0 are positive. Here f(x) = x^2 - 2ax + (a + 6), with the parameter a appearing in two coefficients.

The "both roots positive" condition (both roots greater than 0) requires three things:

Condition 1: D \geq 0 (real roots exist).

D = 4a^2 - 4(a + 6) = 4a^2 - 4a - 24 = 4(a^2 - a - 6) = 4(a - 3)(a + 2) \geq 0

This is a quadratic inequality in a. The roots of a^2 - a - 6 = 0 are a = 3 and a = -2. Since the coefficient of a^2 is positive, the quadratic is non-negative outside the roots:

a \leq -2 \quad \text{or} \quad a \geq 3

Condition 2: af(0) > 0 (the test point x = 0 is outside both roots). Since a_{\text{leading}} = 1 > 0, this is f(0) > 0.

f(0) = a + 6 > 0 \implies a > -6

Condition 3: axis of symmetry > 0 (the vertex — midpoint of the roots — is to the right of 0).

-\frac{b}{2a_{\text{leading}}} = \frac{2a}{2} = a > 0

Now intersect the three conditions:

Number line showing intersection of three conditions on parameter aA number line with key points at negative 6, negative 2, 0, and 3. Three horizontal bars represent the solution sets of the three conditions. Condition 1 covers a less than or equal to negative 2 or a greater than or equal to 3. Condition 2 covers a greater than negative 6. Condition 3 covers a greater than 0. The intersection is a greater than or equal to 3, shown as a bold bar. −6 −2 0 3 D ≥ 0 f(0) > 0 axis > 0 result
Three conditions on the parameter $a$, visualised on a number line. The intersection — the set of $a$ values satisfying all three simultaneously — is $a \geq 3$, shown in red at the bottom.

Conditions 2 and 3 together give a > 0. Intersecting with Condition 1: the part of "a \leq -2 or a \geq 3" that lies in a > 0 is just a \geq 3.

Answer: a \geq 3.

Quick check: at a = 3, f(x) = x^2 - 6x + 9 = (x-3)^2, giving the repeated root x = 3 > 0. At a = 4, D = 64 - 40 = 24 > 0, and f(0) = 10 > 0, axis at x = 4 > 0, roots at 4 \pm \sqrt{6} \approx 1.55 and 6.45 — both positive. At a = 2 (outside the answer), D = 16 - 32 = -16 < 0 — no real roots. Consistent.

The pattern: parameters that make one root straddle a number

Here is a different flavour. Find the values of k for which x^2 + 2(k-1)x + (k+5) = 0 has one root less than 1 and the other greater than 1.

This is the "one number between the roots" condition. As you saw in the Location of Roots article, only one condition is needed:

af(1) < 0

Since a = 1 > 0, this is f(1) < 0:

f(1) = 1 + 2(k-1) + (k+5) = 1 + 2k - 2 + k + 5 = 3k + 4

So 3k + 4 < 0, giving k < -4/3.

Answer: k < -4/3.

Notice how clean this is — a single linear inequality in the parameter, no discriminant check needed. The sign condition af(1) < 0 automatically forces the roots to be real and to straddle 1.

Finding ranges when both roots lie in an interval

A harder question: for what values of a do both roots of x^2 - 2ax + a^2 - 1 = 0 lie in (-3, 3)?

Write f(x) = x^2 - 2ax + (a^2 - 1). For "both roots in (-3, 3)," four conditions apply:

Condition 1: D \geq 0.

D = 4a^2 - 4(a^2 - 1) = 4 > 0

Always positive — real roots exist for every a. This condition is automatically satisfied.

Condition 2: af(-3) > 0. Since a = 1 > 0, need f(-3) > 0.

f(-3) = 9 + 6a + a^2 - 1 = a^2 + 6a + 8 = (a + 2)(a + 4)

So (a + 2)(a + 4) > 0, giving a < -4 or a > -2.

Condition 3: af(3) > 0. Need f(3) > 0.

f(3) = 9 - 6a + a^2 - 1 = a^2 - 6a + 8 = (a - 2)(a - 4)

So (a - 2)(a - 4) > 0, giving a < 2 or a > 4.

Condition 4: axis of symmetry in (-3, 3).

-3 < a < 3

Intersect all four:

Condition 4 restricts to (-3, 3). Within that, Condition 2 eliminates -4 \leq a \leq -2, leaving (-3, -4) \cup (-2, 3) \cap (-3, 3) = (-2, 3) (since (-3, -4) is empty). Within (-2, 3), Condition 3 eliminates [2, 4], leaving (-2, 2).

Answer: a \in (-2, 2).

Verify: at a = 0, f(x) = x^2 - 1 = (x-1)(x+1), roots at \pm 1 — both in (-3, 3). At a = 2, f(x) = x^2 - 4x + 3 = (x-1)(x-3), root at x = 3 — on the boundary, not strictly inside. Consistent.

The discriminant as a quadratic inequality in the parameter

Many problems reduce to a discriminant condition that is itself a quadratic inequality in the parameter. Here is how that plays out.

Find the values of m for which x^2 + 2(m+1)x + 9m - 5 = 0 has real roots.

The condition is D \geq 0:

D = 4(m+1)^2 - 4(9m - 5) = 4(m^2 + 2m + 1 - 9m + 5) = 4(m^2 - 7m + 6) = 4(m - 1)(m - 6) \geq 0

This is a quadratic inequality in m. The roots are m = 1 and m = 6. Since the coefficient of m^2 is positive, the expression is non-negative outside the roots:

m \leq 1 \quad \text{or} \quad m \geq 6

The discriminant condition, which seemed like a single step, was itself a quadratic inequality problem. This nesting — an inequality problem inside a location problem — is what makes these questions feel hard. But each layer uses the same technique: find roots, read the sign pattern, select the right intervals.

An interactive parameter explorer

Drag the red point to change the parameter a in the quadratic x^2 - 2ax + (a+6) = 0. Watch the discriminant and the roots respond. Both roots are positive when a \geq 3.

Interactive parameter explorer for the both-roots-positive problemA horizontal slider from a equals negative 2 to a equals 8. A draggable red point controls a. Readouts display a, the discriminant 4a squared minus 4a minus 24, and the axis of symmetry x equals a. For a greater than or equal to 3, both conditions are met and both roots are positive. −2 0 2 3 5 8 drag to change a
Drag the red point to vary $a$. For $a < 3$, the discriminant is negative (no real roots) or the axis of symmetry is not far enough right. At $a = 3$, $D = 0$ and the repeated root is $3$ — just barely positive. For $a > 3$, both roots are positive and distinct.

The formal method, summarised

Parameter-based location problems — workflow

Given a quadratic f(x) = ax^2 + bx + c whose coefficients depend on a parameter \lambda, and a location condition on the roots:

  1. Translate the location condition into the appropriate set of inequalities (discriminant, f(k), axis of symmetry) from the Location of Roots article.
  2. Express each inequality in terms of \lambda.
  3. Solve each inequality in \lambda (often itself a linear or quadratic inequality).
  4. Intersect all solution sets to find the admissible range of \lambda.

The answer is always an interval or a union of intervals in \lambda.

Example 1: Both roots of x² − 2px + (p² − 4) = 0 lie in (−1, 5)

Step 1. Identify the setup. f(x) = x^2 - 2px + (p^2 - 4), parameter p. Want both roots in (-1, 5).

Why: "both roots in (p_1, p_2)" is the four-condition case — discriminant, f(-1) > 0, f(5) > 0, axis of symmetry in (-1, 5).

Step 2. Write and solve each condition.

Condition 1: D \geq 0.

D = 4p^2 - 4(p^2 - 4) = 16 > 0

Always satisfied — any p gives real roots.

Condition 2: f(-1) > 0.

f(-1) = 1 + 2p + p^2 - 4 = p^2 + 2p - 3 = (p + 3)(p - 1) > 0

Solution: p < -3 or p > 1.

Why: this is a quadratic inequality in p. The parabola in p opens upward, so positive outside the roots -3 and 1.

Condition 3: f(5) > 0.

f(5) = 25 - 10p + p^2 - 4 = p^2 - 10p + 21 = (p - 3)(p - 7) > 0

Solution: p < 3 or p > 7.

Condition 4: -1 < \text{axis} < 5.

-1 < p < 5

Step 3. Intersect all four conditions.

Start with Condition 4: p \in (-1, 5). Intersect with Condition 2 (p < -3 or p > 1): within (-1, 5), only p > 1 survives. So p \in (1, 5). Intersect with Condition 3 (p < 3 or p > 7): within (1, 5), only p < 3 survives. So p \in (1, 3).

Step 4. Verify. At p = 2: f(x) = x^2 - 4x = x(x - 4), roots at 0 and 4 — both in (-1, 5). At p = 3: f(x) = x^2 - 6x + 5 = (x-1)(x-5), root at x = 5 — on the boundary, excluded. At p = 1: f(x) = x^2 - 2x - 3 = (x-3)(x+1), root at x = -1 — on the boundary, excluded.

Result. p \in (1, 3).

Three parabolas showing roots inside and outside the interval (negative 1, 5) for different values of pThree upward-opening parabolas with the same shape but different positions, corresponding to p equals 1, p equals 2, and p equals 3. Vertical dashed lines at x equals negative 1 and x equals 5 mark the interval boundaries. At p equals 2, both roots (0 and 4) are inside the interval. At p equals 1, a root lands on x equals negative 1. At p equals 3, a root lands on x equals 5. x y −1 0 1 2 3 4 −1 5 p = 1 p = 2 ✓ p = 3
At $p = 2$ (red curve), the roots $0$ and $4$ are safely inside $(-1, 5)$. At $p = 1$ and $p = 3$ (light curves), one root sits on a boundary of the interval — these are the critical values that bound the answer $p \in (1, 3)$.

Each boundary value of p corresponds to a root landing exactly on an endpoint of the interval (-1, 5). At p = 1, a root hits x = -1; at p = 3, a root hits x = 5. The valid range p \in (1, 3) is the region where both roots stay strictly inside.

Example 2: Find values of k so that exactly one root of x² − 2kx + k² − 4 = 0 lies in (0, 3)

Step 1. Identify the setup. f(x) = x^2 - 2kx + (k^2 - 4), parameter k. Want exactly one root in (0, 3).

Why: "exactly one root in (p, q)" means f(p) and f(q) have opposite signs, i.e., f(p) \cdot f(q) < 0.

Step 2. Compute f(0) and f(3).

f(0) = k^2 - 4 = (k-2)(k+2)
f(3) = 9 - 6k + k^2 - 4 = k^2 - 6k + 5 = (k-1)(k-5)

Step 3. Apply the condition f(0) \cdot f(3) < 0.

(k-2)(k+2)(k-1)(k-5) < 0

Why: this is a product of four linear factors. Use the wavy curve method to find where the product is negative.

Step 4. Solve the four-factor inequality using the wavy curve. The roots are k = -2, 1, 2, 5. Start from the right with + and alternate:

Interval Sign
k > 5 +
2 < k < 5 -
1 < k < 2 +
-2 < k < 1 -
k < -2 +

The product is negative in (-2, 1) \cup (2, 5).

Step 5. Verify. At k = 0 (in (-2, 1)): f(x) = x^2 - 4 = (x-2)(x+2), roots at \pm 2. Root x = 2 is in (0, 3), root x = -2 is not. Exactly one root in (0, 3) — correct. At k = 3 (in (2, 5)): f(x) = x^2 - 6x + 5 = (x-1)(x-5), roots at 1 and 5. Root x = 1 is in (0, 3), root x = 5 is not — correct.

Result. k \in (-2, 1) \cup (2, 5).

Wavy curve for (k minus 2)(k plus 2)(k minus 1)(k minus 5) showing negative regionsA number line with roots at negative 2, 1, 2, and 5. A wavy curve alternates sign at each root. The negative regions, between negative 2 and 1 and between 2 and 5, are highlighted. −2 1 2 5 + + +
The wavy curve for the product $(k-2)(k+2)(k-1)(k-5)$. The shaded negative regions $(-2, 1)$ and $(2, 5)$ are the values of $k$ for which exactly one root of the original quadratic lies in $(0, 3)$.

The wavy curve turned a four-factor inequality into a simple sign-reading exercise. The two intervals in the answer correspond to two geometrically different situations: in one interval, the smaller root is in (0, 3) and the larger is outside; in the other, the roles reverse.

Common confusions

Going deeper

If you can handle the workflow — translate the location condition, set up the inequalities in the parameter, solve and intersect — you have the main skill. What follows is for readers who want to see a more advanced problem pattern and the structural reason these methods work.

Nested parameter conditions

In the most challenging JEE problems, the location condition itself involves a second parameter. For instance: "find the values of a for which x^2 - 2ax + a^2 - 1 = 0 has both roots in (-3, 3)" is a one-parameter problem you saw above. But you might encounter a problem where the interval endpoints also depend on a parameter, or where there are two quadratics with a shared parameter.

The method is the same — more conditions, more intersections, but no new ideas. Write every condition, solve each in the parameter, intersect. The complexity is bookkeeping, not conceptual.

Why the method works: the topology of the parabola

The location-of-roots conditions are not arbitrary algebraic tricks. They encode the topology of the parabola — the fact that a continuous curve that is positive at one point and negative at another must cross zero somewhere in between (the Intermediate Value Theorem). The condition f(p) \cdot f(q) < 0 is a direct application of this theorem. The conditions af(k) > 0 with the vertex constraint are encoding the shape of the parabola — it opens in one direction, has one minimum or maximum, and the sign pattern follows from that shape.

This is why the method generalises to higher-degree polynomials. A cubic has a more complex sign pattern, but the Intermediate Value Theorem still applies: opposite signs at two points guarantee a root between them. The wavy curve method is the combinatorial version of this topological fact.

Connection to parametric families of equations

Each value of the parameter gives a different quadratic, and the roots trace a curve in the (a, x) plane as the parameter varies. The location conditions carve out a region in the parameter space where this curve satisfies the required geometric constraints. In more advanced mathematics, this perspective leads to bifurcation theory — the study of how the qualitative behaviour of a system changes as a parameter crosses critical values. The boundaries p = 1 and p = 3 in Example 1 are exactly the bifurcation points where a root enters or exits the interval.

Where this leads next