5. Given a function $f(x)$ defined on $\mathbf{R}$ that satisfies:
(1) $f(1)=1$;
(2) When $00$;
(3) For any real numbers $x, y$,
$$
f(x+y)-f(x-y)=2 f(1-x) f(y) \text {. }
$$

Then $f\left(\frac{1}{3}\right)=$ . $\qquad$
5. $\frac{1}{2}$.

Let $x=\frac{2}{3}, y=\frac{1}{3}$. From (3) we get $f(1)-f\left(\frac{1}{3}\right)=2 f\left(\frac{1}{3}\right) f\left(\frac{1}{3}\right)$. Combining $f(1)=1, f\left(\frac{1}{3}\right)>0$, we solve to get $f\left(\frac{1}{3}\right)=\frac{1}{2}$.