4 Given the function $y=f(x), x \in \mathbf{R}, f(0) \neq 0$, and
$$
f\left(x_{1}\right)+f\left(x_{2}\right)=2 f\left(\frac{x_{1}+x_{2}}{2}\right) \cdot f\left(\frac{x_{1}-x_{2}}{2}\right),
$$

then the function $f(x)$
A. is an odd function, not an even function
B. is an even function, not an odd function
C. is both an odd function and an even function
D. is neither an odd function nor an even function
4 B. Let $x_{1}=x_{2}=x$ in the given equation, we get
$$
2 f(x)=2 f(x) \cdot f(0)
$$

Again, let $x_{1}=x, x_{2}=-x$ in the given equation, we get
$$
f(x)+f(-x)=2 f(0) \cdot f(x)
$$

From (1) and (2), we have $2 f(x)=f(x)+f(-x)$, that is,
$$
f(-x)=f(x) .(x \in \mathbf{R}) .
$$

This shows that $f(x)$ is an even function. Since $f(0) \neq 0$, $f(x)$ is not an odd function.