Count real roots by isolating a parameter: a graphical method

Original publication: Updated:

The idea: keep the curve fixed and move a line

Suppose you need to count the real solutions of an equation containing a real parameter aa. Rather than tracking a different complicated graph for every aa, rearrange the equation so that one graph is fixed and the other is simple.

For example,

x2−ax+1=0⟺x2+1=ax.x^2-ax+1=0\quad\Longleftrightarrow\quad x^2+1=ax.

A root is the xx-coordinate of an intersection between the fixed parabola y=x2+1y=x^2+1 and the line y=axy=ax. Changing aa rotates the line about the origin. In Japanese entrance-exam mathematics this rearrangement is often called parameter separation.

This is a graphical counting technique, not separation of variables for differential equations. Its purpose is to make the changing part of the problem easy to understand.

A four-step method

  1. Separate the parameter-dependent terms from the remaining terms.
  2. Draw the two graphs, including all domain restrictions.
  3. Find parameter values where they touch, cross an endpoint, or encounter a discontinuity.
  4. Count intersections between and at those critical values.

The fourth step matters: finding a tangent does not by itself establish how many roots exist elsewhere.

Worked example: exactly one root in an open interval

Problem. Find all real aa for which

x2+2ax−a+1=0x^2+2ax-a+1=0

has exactly one distinct real root in −1<x<3-1<x<3. A double root counts as one distinct root.

Step 1: separate the parameter

Rearrange as

−x2−1=2ax−a=2a(x−12).-x^2-1=2ax-a=2a\left(x-\frac12\right).

Compare the fixed curve y=−x2−1y=-x^2-1 with a line passing through (1/2,0)(1/2,0). Only the line's slope changes.

Step 2: find the tangencies

A tangency corresponds to a double root. The discriminant of the original quadratic is

D=4(a2+a−1).D=4(a^2+a-1).

Thus tangency occurs at

a=−1−52ora=−1+52.a=\frac{-1-\sqrt5}{2}\quad\text{or}\quad a=\frac{-1+\sqrt5}{2}.

The double root is x=−ax=-a. For both values, it lies inside (−1,3)(-1,3), so both tangencies contribute a valid answer.

A line through (1/2,0) tangent to the fixed downward-opening parabola at a negative x-coordinate.

The other tangent line through (1/2,0), touching the parabola at a positive x-coordinate.

Step 3: find the endpoint crossings

Substitute the endpoints into the original polynomial Fa(x)=x2+2ax−a+1F_a(x)=x^2+2ax-a+1:

Fa(−1)=2−3a,Fa(3)=10+5a.F_a(-1)=2-3a,\qquad F_a(3)=10+5a.

The crossing values are a=2/3a=2/3 and a=−2a=-2, respectively. Notice that Fa(−1)=0F_a(-1)=0 means a=2/3a=2/3: the fixed graph has height −2-2 at x=−1x=-1, not 22.

A line through the right endpoint (3,-10) of the restricted parabola.

A line through the left endpoint (-1,-2) of the restricted parabola.

Step 4: count roots, including the critical cases

Let a−=(−1−5)/2a_-=(-1-\sqrt5)/2 and a+=(−1+5)/2a_+=(-1+\sqrt5)/2. The four critical values are ordered as

−2<a−<a+<23.-2<a_-<a_+<\frac23.
  • If a<−2a<-2, the two endpoint values have opposite signs, so exactly one root lies in the interval.
  • At a=−2a=-2, the roots are 11 and 33. Only 11 lies in the open interval.
  • If −2<a<a−-2<a<a_-, there are two distinct roots inside the interval.
  • At a=a−a=a_-, there is one double root inside.
  • If a−<a<a+a_-<a<a_+, the discriminant is negative, so there are no real roots.
  • At a=a+a=a_+, there is one double root inside.
  • If a+<a<2/3a_+<a<2/3, there are two distinct roots inside.
  • At a=2/3a=2/3, the roots are −1-1 and −1/3-1/3. Only −1/3-1/3 lies inside.
  • If a>2/3a>2/3, the endpoint values again have opposite signs, giving exactly one root inside.

Therefore the answer is

a≤−2ora=−1±52ora≥23.\boxed{a\le-2\quad\text{or}\quad a=\frac{-1\pm\sqrt5}{2}\quad\text{or}\quad a\ge\frac23.}

The endpoint values are included in the answer even though the interval is open: in each case, one root is excluded at an endpoint while the other remains inside.

When is this method useful?

The rearrangement is especially convenient when the parameter-dependent graph becomes a horizontal line or a line through a fixed point. It is often more revealing for square roots, absolute values, reciprocal functions, or step functions than repeatedly solving algebraic equations.

These are favorable situations, not necessary conditions. A parameter need not appear only to the first power, and the moving graph need not always be a line. For instance, x2=a2x^2=a^2 can still be analyzed using a horizontal line of height a2a^2. The question is whether the rearrangement makes the geometry easier.

For an ordinary quadratic, the discriminant, vertex, and endpoint signs may be quicker. Use the graph when it clarifies the structure, rather than forcing every problem into this method.

Application 1: a square-root curve

Problem. Count the real solutions of

x−1=ax.\sqrt{x-1}=ax.

Domain and sign first

The domain is x≥1x\ge1. Since x>0x>0 and the square root is nonnegative, there are no solutions for a<0a<0. If a=0a=0, the unique solution is x=1x=1.

For a>0a>0, compare y=x−1y=\sqrt{x-1} with y=axy=ax.

The square-root curve starting at (1,0), with two lines through the origin illustrating intersections and tangency.

Squaring is reversible only when the signs are correct:

x−1=ax⟺a2x2−x+1=0,x≥1,ax≥0.\sqrt{x-1}=ax\quad\Longleftrightarrow\quad a^2x^2-x+1=0,\quad x\ge1,\quad ax\ge0.

The discriminant is 1−4a21-4a^2, so the positive tangent value is a=1/2a=1/2, with x=2x=2.

To verify the root count without relying on a sketch, solve for the parameter:

a=h(x)=x−1x,x≥1.a=h(x)=\frac{\sqrt{x-1}}x,\qquad x\ge1.

This function rises from 00 to 1/21/2 at x=2x=2, then decreases toward 00 without reaching it again. Consequently:

  • a<0a<0: no roots.
  • a=0a=0: one root, x=1x=1.
  • 0<a<1/20<a<1/2: two distinct roots.
  • a=1/2a=1/2: one root, x=2x=2.
  • a>1/2a>1/2: no roots.

Squaring first and forgetting the sign condition would incorrectly suggest solutions for negative aa.

Application 2: a semicircle and a rotating line

Problem. Count the real solutions of

1−x2−ax−2a=0.\sqrt{1-x^2}-ax-2a=0.

The domain is −1≤x≤1-1\le x\le1, and separation gives

1−x2=a(x+2).\sqrt{1-x^2}=a(x+2).

The fixed curve is the upper unit semicircle. The line passes through (−2,0)(-2,0), so its slope determines how it crosses the semicircle.

The upper unit semicircle and lines through (-2,0), including the positive-slope tangent.

Because x+2>0x+2>0 on the entire domain, negative aa gives no roots. At a=0a=0, both endpoints x=−1,1x=-1,1 are roots.

For positive aa, tangency occurs when the distance from the origin to the line ax−y+2a=0ax-y+2a=0 equals the unit radius:

2aa2+1=1⟺a=13.\frac{2a}{\sqrt{a^2+1}}=1\quad\Longleftrightarrow\quad a=\frac1{\sqrt3}.

At this value, the contact point has x=−1/2x=-1/2 and lies on the upper semicircle. Therefore:

  • a<0a<0: no roots.
  • 0≤a<1/30\le a<1/\sqrt3: two distinct roots.
  • a=1/3a=1/\sqrt3: one root, x=−1/2x=-1/2.
  • a>1/3a>1/\sqrt3: no roots.

The negative-slope tangent to the full circle does not touch the upper semicircle. Working with the correct half of the circle prevents an extra, invalid critical value.

Application 3: the floor function and half-open endpoints

Problem. Let ⌊x⌋\lfloor x\rfloor denote the greatest integer not exceeding xx. Count the distinct real solutions of

⌊x⌋=ax,2≤x<4.\lfloor x\rfloor=ax,\qquad 2\le x<4.

On this domain,

⌊x⌋={2,2≤x<3,3,3≤x<4.\lfloor x\rfloor=\begin{cases}2,&2\le x<3,\\3,&3\le x<4.\end{cases}

The graph consists of two horizontal segments, each closed on the left and open on the right.

Two floor-function segments at heights 2 and 3, with lines from the origin through their endpoints.

For the first segment, a solution must be x=2/ax=2/a. Its interval restriction gives

2≤2a<3⟺23<a≤1.2\le\frac2a<3\quad\Longleftrightarrow\quad\frac23<a\le1.

For the second, a solution must be x=3/ax=3/a, and

3≤3a<4⟺34<a≤1.3\le\frac3a<4\quad\Longleftrightarrow\quad\frac34<a\le1.

There are no solutions when a≤0a\le0. Combining the two positive-parameter ranges:

  • a≤2/3a\le2/3: no roots.
  • 2/3<a≤3/42/3<a\le3/4: one root.
  • 3/4<a≤13/4<a\le1: two distinct roots.
  • a>1a>1: no roots.

At a=3/4a=3/4, the candidate x=4x=4 is excluded, so only the first segment contributes. At a=1a=1, both left endpoints, x=2x=2 and x=3x=3, are included.

A final checklist

Identify the domain before manipulating the equation. Track signs before squaring. Check tangencies, endpoints, and discontinuities separately. Finally, explain why the roots of the original equation correspond exactly to the intersections you counted.

This same change of viewpoint also helps with regions swept out by a moving line. For another example of domain checks in a geometric problem, see circle inversion.

Related articles

About the author

Koki Saito

Physician and graduate of the University of Tokyo Faculty of Medicine. Drawing on his entrance-exam experience, he explains how to choose mathematical methods and construct complete solutions.

Full profile →

Have a question or spotted an error? Contact us.