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$
5.(2),(3).

Let $x=0, y \in \mathbf{R}$, we get $f(y)+f(-y)=0$, so $f(x)$ is an odd function, hence (2) is correct.
Let $y=\frac{\pi}{2}$, we get $f\left(x+\frac{\pi}{2}\right)+f\left(x-\frac{\pi}{2}\right)=0$, i.e.,
$$
\begin{array}{l}
f(x+\pi)=-f(x), \\
f(x+2 \pi)=-f(x+\pi)=f(x) .
\end{array}
$$

Hence (3) is correct.
Let $x=y=\frac{\pi}{4}$, we get
$$
f\left(\frac{\pi}{2}\right)+f(0)=2 f\left(\frac{\pi}{4}\right) \cos \frac{\pi}{4} \text {. }
$$

Thus, $f\left(\frac{\pi}{4}\right)=\frac{\sqrt{2}}{2}$. Hence (1) is not correct.
Let $x=\frac{\pi}{4}, y=\frac{\pi}{2}$, we get $f\left(\frac{3 \pi}{4}\right)=f\left(\frac{\pi}{4}\right)$, hence (4) is not correct.