PYQ Vault

JEE Mains Maths · Quadratic Equations

Equations with Modulus and Greatest Integer

Equations with |x| or [x] in them: split the line where each part changes form, solve an ordinary quadratic on each piece, and keep only the roots that lie in their piece.

Why this matters

Twenty-four PYQs, fifteen of them multiple choice, and five from 2026. Thirteen split the number line where each modulus changes sign and solve one quadratic per piece; eight take one modulus such as |x| or |x − 1| as the unknown, or use |A + B| = |A| + |B|; three mix [x] or {x} into a quadratic. Three ideas cover the page.

Concept 1 of 3: Splitting at the critical points

∣x−a∣|x-a| equals x−ax-a to the right of aa and a−xa-x to the left. Mark every such point on the line. On each piece every modulus has a fixed sign, so the equation is an ordinary quadratic. Solve it, then keep a root only if it lies in its own piece. Most questions ask how many roots there are, so this last check decides the answer.

Definition

  • Critical points: where each expression inside a modulus is 00.
  • On each piece, drop the bars with the right sign and solve.
  • Keep a root only if it lies in its piece.
  • x∣x−a∣x|x-a| is x(x−a)x(x-a) for x≥ax\ge a and −x(x−a)-x(x-a) for x<ax<a.

Definition of modulus

∣x−a∣={x−a,x≥aa−x,x<a|x-a|=\begin{cases}x-a,& x\ge a\\ a-x,& x<a\end{cases}

Worked example

Solve x2−3∣x−1∣−1=0x^2-3|x-1|-1=0.
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

JEE Mains · 2026 · 24 Jan 2026 Shift 1 · Q70Moderate

Example 1 · Quadratic Equations · Equations with Modulus and Greatest Integer

The number of the real solutions of the equation : x∣x+3∣+∣x−1∣−2=0x|x + 3| + |x - 1| - 2 = 0 is

A root on the boundary is counted once

A critical point can solve the equation in both neighbouring pieces. Count it once. And reject a root from a piece it does not lie in, even though it solves that piece's quadratic.

Concept 2 of 3: One modulus as the unknown

x2=∣x∣2x^2=|x|^2, so x2−5∣x∣+6=0x^2-5|x|+6=0 is a quadratic in t=∣x∣t=|x|: solve for t≥0t\ge0, then each positive tt gives two values of xx. The same works for (x−1)2(x-1)^2 with ∣x−1∣|x-1|. A second shortcut: ∣A+B∣=∣A∣+∣B∣|A+B|=|A|+|B| holds exactly when AA and BB have the same sign, so such an equation becomes the inequality AB≥0AB\ge0.

Definition

  • x2=∣x∣2x^2=|x|^2: put t=∣x∣t=|x| and keep roots t≥0t\ge0.
  • t>0t>0 gives x=±tx=\pm t; t=0t=0 gives x=0x=0 only.
  • ∣A+B∣=∣A∣+∣B∣|A+B|=|A|+|B| exactly when AB≥0AB\ge0.
  • ∣A∣<k|A|<k means −k<A<k-k<A<k.

Equality in the triangle inequality

∣A+B∣=∣A∣+∣B∣exactly whenAB≥0|A+B|=|A|+|B|\quad\text{exactly when}\quad AB\ge0

Worked example

Find the sum of the squares of the roots of x2−5∣x∣+4=0x^2-5|x|+4=0.
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

JEE Mains · 2026 · 4 Apr 2026 Shift 1 · Q52Moderate

Example 2 · Quadratic Equations · Equations with Modulus and Greatest Integer

If the set of all solutions of ∣x2+x−9∣=∣x∣+∣x2−9∣\left| x^{2}+x- 9 \right|= |x| +\left| x^{2}- 9 \right| is [α,β]∪[γ,∞)\lbrack\alpha,\beta\rbrack \cup \lbrack\gamma,\infty), then (α2+β2+γ2)\left( \alpha^{2}+\beta^{2}+\gamma^{2} \right) is equal to :

Reject negative values of |x|

The quadratic in t=∣x∣t=|x| can have a negative root, and it gives no xx at all. Count roots only from t≥0t\ge0, and remember that t=0t=0 gives one root, not two.

Concept 3 of 3: Greatest integer and fractional part

Write x=[x]+{x}x=[x]+\{x\}, with [x][x] an integer and 0≤{x}<10\le\{x\}<1. Two routes. Factor the equation and see what [x][x] or {x}\{x\} must equal — a factor that forces {x}=3\{x\}=3 gives nothing. Or put [x]=n[x]=n, a constant: then xx lies in [n,n+1)[n,n+1), the equation is a quadratic in xx, and only roots inside that interval count.

Definition

  • x=[x]+{x}x=[x]+\{x\}, [x]∈Z[x]\in\mathbb Z, 0≤{x}<10\le\{x\}<1.
  • Put [x]=n[x]=n: then n≤x<n+1n\le x<n+1, and the equation is a quadratic in xx.
  • An equation forcing {x}≥1\{x\}\ge1 or {x}<0\{x\}<0 has no solution.

Greatest integer

[x]=nexactly whenn≤x<n+1[x]=n\quad\text{exactly when}\quad n\le x<n+1

Worked example

Solve x2−3[x]−4=0x^2-3[x]-4=0.
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

JEE Mains · 2023 · 24 Jan 2023 · Q72Moderate

Example 3 · Quadratic Equations · Equations with Modulus and Greatest Integer

The equation x2−4x+[x]+3=x[x]x^{2}- 4x + \lbrack x\rbrack + 3 = x\lbrack x\rbrack, where [x]\lbrack x\rbrack denotes the greatest integer function, has :

The fractional part is below 1

{x}\{x\} is never 11 or more and never negative. A factor that forces {x}=3\{x\}=3, or any value outside [0,1)[0,1), gives no root.

Summary — formulas & gotchas at a glance

A revision cheat-sheet for the formulas and gotchas above. Click any concept name to jump back to its full explanation.

Formulas (3)

  • Splitting at the critical points

    Definition of modulus

    ∣x−a∣={x−a,x≥aa−x,x<a|x-a|=\begin{cases}x-a,& x\ge a\\ a-x,& x<a\end{cases}
  • One modulus as the unknown

    Equality in the triangle inequality

    ∣A+B∣=∣A∣+∣B∣exactly whenAB≥0|A+B|=|A|+|B|\quad\text{exactly when}\quad AB\ge0
  • Greatest integer and fractional part

    Greatest integer

    [x]=nexactly whenn≤x<n+1[x]=n\quad\text{exactly when}\quad n\le x<n+1

Watch out for (3)

Test yourself on Quadratic Equations

20 past JEE Mains questions from this chapter, timed at 48 minutes and marked the way the exam marks it. You see your score and every answer the moment you finish. Free to start.