This les­son gath­ers the harder mod­u­lus prob­lems that com­pet­i­tive exam­i­na­tions like: equa­tions solved in one stroke by a prop­erty of the mod­u­lus, equa­tions with a mod­u­lus inside a mod­u­lus, inequal­i­ties with frac­tions, and ques­tions that ask "how many inte­gers sat­isfy...". Every one of them uses tools you already have: the prop­er­ties of ∣x∣|x|, the crit­i­cal point method, and the sign rules for qua­drat­ics. The skill is in choos­ing the right tool.

Using the equal­ity case of the tri­an­gle inequal­ity

From the prop­er­ties of the mod­u­lus:

∣x+y∣=∣x∣+∣y∣exactly when xy≥0|x + y| = |x| + |y| \quad \text{exactly when } xy \geq 0

∣x−y∣=∣x∣+∣y∣exactly when xy≤0|x - y| = |x| + |y| \quad \text{exactly when } xy \leq 0

The sec­ond fol­lows from the first by replac­ing yy with −y-y. When an equa­tion has the shape ∣A∣+∣B∣=∣A−B∣|A| + |B| = |A - B|, it is true exactly when AB≤0AB \leq 0, and no cases are needed.

Exam­ple 1

Solve ∣x2−2x−8∣+∣x2+x−2∣=3∣x+2∣|x^2 - 2x - 8| + |x^2 + x - 2| = 3|x + 2|.

Let A=x2−2x−8A = x^2 - 2x - 8 and B=x2+x−2B = x^2 + x - 2. Then

A−B=(x2−2x−8)−(x2+x−2)=−3x−6A - B = (x^2 - 2x - 8) - (x^2 + x - 2) = -3x - 6

so ∣A−B∣=∣−3x−6∣=∣3x+6∣=3∣x+2∣|A - B| = |-3x - 6| = |3x + 6| = 3|x + 2|, which is the right-hand side. The equa­tion is ∣A∣+∣B∣=∣A−B∣|A| + |B| = |A - B|, which holds exactly when AB≤0AB \leq 0:

(x2−2x−8)(x2+x−2)≤0(x^2 - 2x - 8)(x^2 + x - 2) \leq 0

(x−4)(x+2)(x+2)(x−1)≤0(x - 4)(x + 2)(x + 2)(x - 1) \leq 0

(x+2)2(x−1)(x−4)≤0(x + 2)^2(x - 1)(x - 4) \leq 0

The fac­tor (x+2)2(x + 2)^2 is never neg­a­tive, and it is zero at x=−2x = -2. So the prod­uct is ≤0\leq 0 either when x=−2x = -2, or when (x−1)(x−4)≤0(x - 1)(x - 4) \leq 0, that is, x∈[1,4]x \in [1, 4]. A sign chart across the crit­i­cal points −2-2, 11, 44 reads ++, ++, −-, ++, with zeros at all three points.

Answer: x∈{−2}∪[1,4]x \in \{-2\} \cup [1, 4].

Count­ing inte­ger solu­tions

Exam­ple 2

Find the num­ber of inte­gers sat­is­fy­ing ∣x∣+∣4−x2x∣=∣4x∣\displaystyle |x| + \left|\frac{4 - x^2}{x}\right| = \left|\frac{4}{x}\right|.

The expres­sion con­tains 1x\displaystyle \frac{1}{x}, so first note that x≠0x \neq 0. Using ∣pq∣=∣p∣∣q∣\displaystyle \left|\frac{p}{q}\right| = \frac{|p|}{|q|},

∣x∣+∣4−x2∣∣x∣=4∣x∣\displaystyle |x| + \frac{|4 - x^2|}{|x|} = \frac{4}{|x|}

Mul­ti­ply through by ∣x∣|x|, which is pos­i­tive, and use ∣x∣2=x2|x|^2 = x^2 and ∣4−x2∣=∣x2−4∣|4 - x^2| = |x^2 - 4|:

x2+∣(x+2)(x−2)∣=4(1)x^2 + |(x + 2)(x - 2)| = 4 \qquad (1)

The crit­i­cal points are −2-2 and 22.

Case (i): x∈(−∞,−2]∪[2,∞)x \in (-\infty, -2] \cup [2, \infty). Here (x+2)(x−2)≥0(x + 2)(x - 2) \geq 0, so (1) becomes

x2+x2−4=4  ⟹  2x2=8  ⟹  x2=4  ⟹  x=±2x^2 + x^2 - 4 = 4 \implies 2x^2 = 8 \implies x^2 = 4 \implies x = \pm 2

Both lie in this case: {−2,2}\{-2, 2\}.

Case (ii): x∈(−2,2)x \in (-2, 2). Here (x+2)(x−2)<0(x + 2)(x - 2) < 0, so (1) becomes

x2−(x2−4)=4  ⟹  4=4x^2 - (x^2 - 4) = 4 \implies 4 = 4

This is true for every xx in the inter­val. So all of (−2,2)(-2, 2) sat­is­fies (1).

Com­bin­ing, (1) holds on [−2,2][-2, 2]. But the orig­i­nal equa­tion needs x≠0x \neq 0, so the solu­tion set is [−2,2]−{0}[-2, 2] - \{0\}. The inte­gers in it are −2,−1,1,2-2, -1, 1, 2.

Answer: 44 inte­gers. (Leav­ing out the con­di­tion x≠0x \neq 0 would wrongly give 55.)

A mod­u­lus inside a mod­u­lus

Exam­ple 3

Find the inte­gral val­ues of xx sat­is­fy­ing ∣x−∣x−4∣∣=4|x - |x - 4|| = 4.

Work from the out­side in. By ∣T∣=k  ⟹  T=±k|T| = k \implies T = \pm k:

x−∣x−4∣=4orx−∣x−4∣=−4x - |x - 4| = 4 \quad \text{or} \quad x - |x - 4| = -4

First: x−∣x−4∣=4x - |x - 4| = 4 gives ∣x−4∣=x−4|x - 4| = x - 4. A mod­u­lus equals the quan­tity itself exactly when the quan­tity is non-neg­a­tive, so x−4≥0x - 4 \geq 0, that is, x∈[4,∞)x \in [4, \infty).

Sec­ond: x−∣x−4∣=−4x - |x - 4| = -4 gives ∣x−4∣=x+4|x - 4| = x + 4. Use the crit­i­cal point 44.

  • If x<4x < 4: 4−x=x+44 - x = x + 4, so 2x=02x = 0 and x=0x = 0. This is less than 44, so it is valid.
  • If x≥4x \geq 4: x−4=x+4x - 4 = x + 4, which would need −4-4 and 44 to be equal. Impos­si­ble, so no solu­tion.

Answer: x∈{0}∪[4,∞)x \in \{0\} \cup [4, \infty). This con­tains infi­nitely many inte­gers (0,4,5,6,…0, 4, 5, 6, \ldots).

Inequal­i­ties with frac­tions

When an inequal­ity has xx in a denom­i­na­tor, never mul­ti­ply across by an expres­sion whose sign you do not know. Instead, bring every­thing to one side, com­bine into a sin­gle frac­tion and study its sign. Remem­ber that pq<0\displaystyle \frac{p}{q} < 0 has the same solu­tion as pq<0pq < 0 (with q≠0q \neq 0).

Exam­ple 4

Solve ∣x+1x∣>2\displaystyle \left|x + \frac{1}{x}\right| > 2.

By ∣T∣>a  ⟺  T<−a|T| > a \iff T < -a or T>aT > a:

First part: x+1x<−2\displaystyle x + \frac{1}{x} < -2.

x2+1x+2<0  ⟹  x2+2x+1x<0  ⟹  (x+1)2x<0\displaystyle \frac{x^2 + 1}{x} + 2 < 0 \implies \frac{x^2 + 2x + 1}{x} < 0 \implies \frac{(x + 1)^2}{x} < 0

The numer­a­tor is a square, so it is pos­i­tive except at x=−1x = -1, where the frac­tion is 00 (not less than 00). So we need x<0x < 0 and x≠−1x \neq -1.

Sec­ond part: x+1x>2\displaystyle x + \frac{1}{x} > 2.

x2+1x−2>0  ⟹  (x−1)2x>0\displaystyle \frac{x^2 + 1}{x} - 2 > 0 \implies \frac{(x - 1)^2}{x} > 0

This needs x>0x > 0 and x≠1x \neq 1.

Answer: x∈R−{−1,0,1}x \in \mathbb{R} - \{-1, 0, 1\}. (At x=±1x = \pm 1, ∣x+1x∣\displaystyle \left|x + \frac{1}{x}\right| equals exactly 22, not more than 22.)

Exam­ple 5

Find the num­ber of inte­gers sat­is­fy­ing ∣x−1∣x+2>1\displaystyle \frac{|x - 1|}{x + 2} > 1.

The crit­i­cal point of the mod­u­lus is x=1x = 1. (Also x≠−2x \neq -2.)

Case (i): x<1x < 1. Then ∣x−1∣=1−x|x - 1| = 1 - x:

1−xx+2−1>0  ⟹  1−x−x−2x+2>0  ⟹  −1−2xx+2>0\displaystyle \frac{1 - x}{x + 2} - 1 > 0 \implies \frac{1 - x - x - 2}{x + 2} > 0 \implies \frac{-1 - 2x}{x + 2} > 0

Mul­ti­ply by −1-1 and reverse: 2x+1x+2<0\displaystyle \frac{2x + 1}{x + 2} < 0, which is the same as (2x+1)(x+2)<0(2x + 1)(x + 2) < 0. So x∈(−2,−12)\displaystyle x \in \left(-2, -\frac{1}{2}\right). All of these are less than 11. The only inte­ger is −1-1.

Case (ii): x≥1x \geq 1. Then ∣x−1∣=x−1|x - 1| = x - 1:

x−1x+2−1>0  ⟹  −3x+2>0  ⟹  x+2<0  ⟹  x<−2\displaystyle \frac{x - 1}{x + 2} - 1 > 0 \implies \frac{-3}{x + 2} > 0 \implies x + 2 < 0 \implies x < -2

This has no com­mon value with x≥1x \geq 1.

Answer: the solu­tion set is (−2,−12)\displaystyle \left(-2, -\frac{1}{2}\right), and the num­ber of inte­gers is 11 (namely x=−1x = -1).

Exam­ple 6

Solve ∣12x4x2+9∣≤1\displaystyle \left|\frac{12x}{4x^2 + 9}\right| \leq 1.

The denom­i­na­tor 4x2+94x^2 + 9 is always pos­i­tive, so the inequal­ity is 12∣x∣4x2+9≤1\displaystyle \frac{12|x|}{4x^2 + 9} \leq 1, that is, 12∣x∣≤4x2+912|x| \leq 4x^2 + 9.

Case (i): x<0x < 0. −12x≤4x2+9-12x \leq 4x^2 + 9, so 4x2+12x+9≥04x^2 + 12x + 9 \geq 0, that is, (2x+3)2≥0(2x + 3)^2 \geq 0: true for all real xx. Com­mon val­ues: (−∞,0)(-\infty, 0).

Case (ii): x≥0x \geq 0. 12x≤4x2+912x \leq 4x^2 + 9, so (2x−3)2≥0(2x - 3)^2 \geq 0: always true. Com­mon val­ues: [0,∞)[0, \infty).

Answer: x∈(−∞,0)∪[0,∞)=Rx \in (-\infty, 0) \cup [0, \infty) = \mathbb{R}.

A sum of mod­uli equal to zero

Exam­ple 7

Solve ∣x−1∣+∣x−2∣=0|x - 1| + |x - 2| = 0.

Each mod­u­lus is at least 00, so their sum is 00 only if both are 00: x=1x = 1 and x=2x = 2 at the same time. No num­ber does both. No real xx sat­is­fies the equa­tion.

Prac­tice

  1. Solve ∣x2−3x+2∣+∣x2−5x+6∣=2∣x−2∣|x^2 - 3x + 2| + |x^2 - 5x + 6| = 2|x - 2|.
  2. Solve ∣x+1x∣≥2\displaystyle \left|x + \frac{1}{x}\right| \geq 2.
  3. Solve ∣x−∣x−2∣∣=2|x - |x - 2|| = 2.
  4. Solve ∣x+2∣x−1>1\displaystyle \frac{|x + 2|}{x - 1} > 1.
  5. Solve ∣x∣+∣x−1∣=0|x| + |x - 1| = 0.
  6. Solve ∣x−3∣+∣2x+1∣=0|x - 3| + |2x + 1| = 0.
  7. Solve ∣2xx2+1∣≤1\displaystyle \left|\frac{2x}{x^2 + 1}\right| \leq 1.
  8. Find the num­ber of inte­gers sat­is­fy­ing ∣x−2∣x+1>1\displaystyle \frac{|x - 2|}{x + 1} > 1.
  9. Find the num­ber of inte­gers sat­is­fy­ing ∣x∣+∣9−x2x∣=∣9x∣\displaystyle |x| + \left|\frac{9 - x^2}{x}\right| = \left|\frac{9}{x}\right|.

Answers

Show answers
  1. Let A=(x−1)(x−2)A = (x - 1)(x - 2) and B=(x−2)(x−3)B = (x - 2)(x - 3). Then A−B=2x−4A - B = 2x - 4, so the right side is ∣A−B∣|A - B|. The equa­tion holds when AB≤0AB \leq 0: (x−1)(x−2)2(x−3)≤0(x - 1)(x - 2)^2(x - 3) \leq 0, which gives x∈[1,3]x \in [1, 3].
  2. For x>0x > 0, x+1x−2=(x−1)2x≥0\displaystyle x + \frac{1}{x} - 2 = \frac{(x - 1)^2}{x} \geq 0; for x<0x < 0, x+1x+2=(x+1)2x≤0\displaystyle x + \frac{1}{x} + 2 = \frac{(x + 1)^2}{x} \leq 0. So the inequal­ity holds for every x≠0x \neq 0: x∈R−{0}x \in \mathbb{R} - \{0\}.
  3. x−∣x−2∣=2x - |x - 2| = 2 gives ∣x−2∣=x−2|x - 2| = x - 2, so x≥2x \geq 2. x−∣x−2∣=−2x - |x - 2| = -2 gives ∣x−2∣=x+2|x - 2| = x + 2: for x<2x < 2, 2−x=x+22 - x = x + 2 gives x=0x = 0; for x≥2x \geq 2 it is impos­si­ble. Answer {0}∪[2,∞)\{0\} \cup [2, \infty).
  4. For x≥−2x \geq -2: x+2x−1−1=3x−1>0\displaystyle \frac{x + 2}{x - 1} - 1 = \frac{3}{x - 1} > 0, so x>1x > 1. For x<−2x < -2: −x−2x−1−1=−2x−1x−1>0\displaystyle \frac{-x - 2}{x - 1} - 1 = \frac{-2x - 1}{x - 1} > 0, so 2x+1x−1<0\displaystyle \frac{2x + 1}{x - 1} < 0, giv­ing (−12,1)\displaystyle \left(-\frac{1}{2}, 1\right), which misses x<−2x < -2. Answer (1,∞)(1, \infty).
  5. Both mod­uli would have to be 00, so x=0x = 0 and x=1x = 1 together: no real xx.
  6. This needs x=3x = 3 and x=−12\displaystyle x = -\frac{1}{2} together: no real xx.
  7. 2∣x∣≤x2+12|x| \leq x^2 + 1 is the same as (∣x∣−1)2≥0(|x| - 1)^2 \geq 0, which is always true. Answer x∈Rx \in \mathbb{R}.
  8. For x≥2x \geq 2: x−2x+1−1=−3x+1>0\displaystyle \frac{x - 2}{x + 1} - 1 = \frac{-3}{x + 1} > 0 needs x<−1x < -1, impos­si­ble. For x<2x < 2: 2−xx+1−1=1−2xx+1>0\displaystyle \frac{2 - x}{x + 1} - 1 = \frac{1 - 2x}{x + 1} > 0, so 2x−1x+1<0\displaystyle \frac{2x - 1}{x + 1} < 0, giv­ing (−1,12)\displaystyle \left(-1, \frac{1}{2}\right). The only inte­ger is 00, so the num­ber of inte­gers is 11.
  9. As in Exam­ple 2: x2+∣x2−9∣=9x^2 + |x^2 - 9| = 9, which holds for x∈[−3,3]x \in [-3, 3], with x≠0x \neq 0. The inte­gers are −3,−2,−1,1,2,3-3, -2, -1, 1, 2, 3: there are 66.