
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
Suppose $T$ is the period of the function $y=f(x)$. From the condition, we have:

$$
\cos x = f(x) - 2 f(x - \pi) = f(x - T) - 2 f(x - T - \pi) = \cos(x - T)
$$

Since this equality holds for all $x$, the number $T$ is a period of the function $y=\cos x$, i.e. $T = 2 \pi n$, where $n$ is a natural number. From this equation, we get:

$$
\begin{gathered}
f(x) = 2 f(x - \pi) + \cos x = 2(2 f(x - 2 \pi) - \cos x) + \cos x \\
= 2(2(2 f(x - 3 \pi) + \cos x) - \cos x) + \cos x \\
= \ldots = 2(2(\ldots(2 f(x - 2 \pi n) - \cos x) + \ldots + \cos x) - \cos x) + \cos x \\
= 2^{2n} f(x) - \cos x \left(2^{2n-1} - 2^{2n-2} + 2^{2n-3} - \ldots + 2 - 1\right)
\end{gathered}
$$

Then,

$$
f(x)\left(1 - 2^{2n}\right) = \cos x \left(1 - 2 + 2^2 - \ldots - 2^{2n-1}\right) = \cos x \frac{1 - 2^{2n}}{1 + 2}
$$

Therefore, $f(x) = \frac{1}{3} \cos x$.

Present the answer in LaTex format: \boxed{Your answer}
user