QlarIITy

MathematicsJEE Main 2021 · 27 JulyInteger

Let f:[0,3]→Rf : [0, 3] \to R be defined byf(x)=min⁡{x−[x],1+[x]−x}f(x) = \min\{x - [x], 1 + [x] - x\}where [x][x] is the greatest integer less than or equal to xx. Let PP denote the set containing all x∈[0,3]x \in [0, 3] where ff is discontinuous, and QQ denote the set containing all x∈(0,3)x \in (0, 3) where ff is not differentiable. Then the sum of number of elements in PP and QQ is equal to ______.

Try it before you look.The full solution is on this page, below the answer box, the moment you check. No sign-in needed.

Solution

Core idea. The smaller of the fractional part and its complement is the distance to the nearest integer.

Concept refresher. Every real number splits as

a=[a]+{a}a = [a] + \{a\}

with [a][a] an integer and 0≤{a}<10 \leq \{a\} < 1.

Picture the situation. Here x−[x]={x}x - [x] = \{x\} and 1+[x]−x=1−{x}1 + [x] - x = 1 - \{x\}, so f(x)f(x) is the smaller of {x}\{x\} and 1−{x}1 - \{x\}: the distance from xx to the nearest integer.

Graph of the function on the interval from 0 to 3: a triangle wave that is 0 at 0, 1, 2 and 3 and rises to 1/2 midway between them, with a dotted line marking the height 1/2.

Approach. Check continuity at the integers, then count the corners inside the interval.

  1. Step 1: Continuity

    At each integer both expressions give the minimum 0 from either side, so ff is continuous on [0,3][0, 3] and the set PP is empty.

  2. Step 2: Corners

    The slope is +1+1 after each integer and −1-1 before the next, so there are corners at the half-integers and at the integers. Inside (0,3)(0, 3) these are 12\dfrac{1}{2}, 1, 32\dfrac{3}{2}, 2 and 52\dfrac{5}{2}, so QQ has 5 elements and the sum is 0+5=50 + 5 = 5.

Answer. 5

Sanity check. The ends 0 and 3 are left out of QQ, since it is taken in the open interval.

Common wrong answers

  • 2: Counting only the valleys at the integers 1 and 2, and missing the three peaks, gives 2.
  • 7: Counting the ends 0 and 3 as corners as well gives 7, but QQ is taken in the open interval.

Key takeaway

The trap. The peaks at the half-integers are corners just as the valleys at the integers are.

How toppers think. They sketch the zigzag and count its turning points.

Remember. Corners at 12\dfrac{1}{2}, 1, 32\dfrac{3}{2}, 2, 52\dfrac{5}{2}

More on Differentiability