A certain [function](https://artofproblemsolving.com/wiki/index.php/Function) $f$ has the properties that $f(3x) = 3f(x)$ for all positive real values of $x$, and that $f(x) = 1-|x-2|$ for $1\le x \le 3$. Find the smallest $x$ for which $f(x) = f(2001)$.
Iterating the condition $f(3x) = 3f(x)$, we find that $f(x) = 3^kf\left(\frac{x}{3^k}\right)$ for positive integers $k$. We know the definition of $f(x)$ from $1 \le x \le 3$, so we would like to express $f(2001) = 3^kf\left(\frac{2001}{3^k}\right),\ 1 \le \frac{2001}{3^k} \le 3 \Longrightarrow k = 6$. Indeed,
\[f(2001) = 729\left[1 - \left| \frac{2001}{729} - 2\right|\right] = 186.\]
We now need the smallest $x$ such that $f(x) = 3^kf\left(\frac{x}{3^k}\right) = 186$. The [range](https://artofproblemsolving.com/wiki/index.php/Range) of $f(x),\ 1 \le x \le 3$, is $0 \le f(x) \le 1$. So when $1 \le \frac{x}{3^k} \le 3$, we have $0 \le f\left(\frac{x}{3^k}\right) = \frac{186}{3^k} \le 1$. Multiplying by $3^k$: $0 \le 186 \le 3^k$, so the smallest value of $k$ is $k = 5$. Then,
\[186 = {3^5}f\left(\frac{x}{3^5}\right).\]
Because we forced $1 \le \frac{x}{3^5} \le 3$, so
\[186 = {3^5}f\left(\frac{x}{3^5}\right) = 243\left[1 - \left| \frac{x}{243} - 2\right|\right] \Longrightarrow x = \pm 57 + 2  \cdot 243.\]
We want the smaller value of $x = \boxed{429}$.
An alternative approach is to consider the graph of $f(x)$, which iterates every power of $3$, and resembles the section from $1 \le x \le 3$ dilated by a factor of $3$ at each iteration.