2012 AMC 12A Problem 25

Attempt Problem 25 of the 2012 AMC 12A below, then check your answer against the professionally curated solution from LIVE by Po-Shen Loh. You can also try the full timed exam, view all 2012 AMC 12A solutions, or check the answer key.

All problems are used with official legal permission of the Mathematical Association of America (MAA).

25.

Let f(x)=∣2{x}−1∣f(x) = |2\{x\} - 1| where {x}\{x\} denotes the fractional part of x.x. The number nn is the smallest positive integer such that the equation nf(xf(x))=xnf(xf(x)) = x has at least 20122012 real solutions x.x. What is n?n?
Note: the fractional part of xx is a real number y={x},y = \{x\}, such that 0≤y<10 \le y \lt 1 and x−yx - y is an integer.
3030
3131
3232
6262
6464
Answer: C
Concepts:floor and ceiling functionscounting intersections
Small hint:
ff is a periodic triangular wave with 0≤f(x)≤1,0 \le f(x) \le 1, so all solutions lie in [0,n][0, n]
Big hint:
On each unit interval the graph of y=f(xf(x))y = f(xf(x)) oscillates a growing number of times; the total number of intersections with y=xny = \dfrac{x}{n} is 2n22n^2
Solution:
Since 0≤f(x)≤1,0 \le f(x) \le 1, every solution lies in [0,n].[0,n]. The function ff is a triangular wave of period 1.1. Put g(x)=xf(x).g(x)=xf(x). For each integer a≥1,a\ge1, the function gg decreases from aa to 00 on [a,a+12),[a,a+\tfrac12), while it increases from 00 to a+1a+1 on [a+12,a+1).[a+\tfrac12,a+1). The first interval [0,12)[0,\tfrac12) is exceptional, but it contributes no intersection with y=xn.y=\frac{x}{n}.
Counting the oscillations, on the intervals [a,a+12)[a, a + \tfrac12) and [a+12,a+1)[a + \tfrac12, a+1) the curve y=f(g(x))y = f(g(x)) meets the line y=xny = \tfrac{x}{n} a total of 2a2a and 2(a+1)2(a+1) times. Summing over a=0,…,n−1a = 0, \ldots, n-1 gives ∑a=0n−1(2a+2(a+1))=2n2\sum_{a=0}^{n-1}\bigl(2a + 2(a+1)\bigr) = 2n^2 real solutions.
The smallest nn with 2n2≥20122n^2 \ge 2012 is n=32,n = 32, since 2⋅312=19222 \cdot 31^2 = 1922 and 2⋅322=2048.2 \cdot 32^2 = 2048.
Thus, the correct answer is C.
LIVE by Po-Shen Loh
Programs

LIVE Classes

Self-Paced Classes

Stars

Scholarship

About Us

Who Is Po-Shen Loh?

Email Contact

Newsletter

Jobs

Become a Star

For a more Thought Full world.

© 2026 Expii, Inc.