For a real number x, let ⌊x⌋ denote the greatest integer not exceeding x. Consider the function
f(x,y)=M(M+1)(∣x−m∣+∣y−m∣) where M=max(⌊x⌋,⌊y⌋) and m=min(⌊x⌋,⌊y⌋). The set of all real numbers (x,y) such that 2≤x,y≤2022 and f(x,y)≤2 can be expressed as a finite union of disjoint regions in the plane. The sum of the areas of these regions can be expressed as a fraction a/b in lowest terms. What is the value of a+b ?
Solution
Solution:
Fix m≥2. First note that x,y≥m, and that M≥2, implying M(M+1)≥2. Thus, f(x,y)≤2 necessarily implies ∣x−m∣+∣y−m∣≤1, and so ∣x−m∣,∣y−m∣≤1. This implies x∈[m−1,m+1], and so x∈[m,m+1]. Similarly, y∈[m,m+1]. Now if x=m+1, then 1≤∣x−m∣+∣y−m∣≤M(M+1)2<1, contradiction. Using the same argument for y, it follows that x,y∈[m,m+1). Thus, ⌊x⌋=⌊y⌋=m always, and so M=m.
The inequality is then equivalent to ∣x−m∣+∣y−m∣≤m(m+1)2. Let r≤1 be the upper bound in the inequality. Keeping in mind the fact that x,y≥m, this region is a right-triangle with vertices (m,m), (m+r,m) and (m,m+r), which then has area 2r2=m(m+1)2. This region is within the set for 2≤m≤2021, so the desired sum is