5. Given a function $f(x)$ defined on $\mathbf{R}$ that satisfies for any real numbers $x, y$
$$
f(x+y)+f(x-y)=2 f(x) \cos y,
$$

and $f(0)=0, f\left(\frac{\pi}{2}\right)=1$.
Consider the following conclusions:
(1) $f\left(\frac{\pi}{4}\right)=\frac{1}{2}$; (2) $f(x)$ is an odd function;
(3) $f(x)$ is a periodic function;
(4) $f(x)$ is a monotonic function in $(0, \pi)$.
Among these, the correct conclusions are $\qquad$