2. Let the function $f(x)$ be defined on $\mathbb{R}$, and for any $x$, the condition $f(x+2) + f(x) = x$ holds. It is also known that $f(x) = x^3$ on the interval $(-2; 0]$. Find $f(2012)$.
6.II.2. Since $f(x+2)+f(x)=x$, then $f(x+4)+f(x+2)=x+2$, therefore

$$
f(x+4)=x+2-f(x+2)=x+2-(x-f(x))=f(x)+2 .
$$

Hence, $f(2012)=f(0)+2 \cdot 503=1006$.