4. A4 (MON) Let $\mathbb{R}$ denote the set of all real numbers and $\mathbb{R}^{+}$the subset of all positive ones. Let $\alpha$ and $\beta$ be given elements in $\mathbb{R}$, not necessarily distinct. Find all functions $f: \mathbb{R}^{+} \rightarrow \mathbb{R}$ such that
$$
f(x) f(y)=y^{\alpha} f\left(\frac{x}{2}\right)+x^{\beta} f\left(\frac{y}{2}\right) \quad \text { for all } x \text { and } y \text { in } \mathbb{R}^{+} \text {. }
$$
4. Suppose that $\alpha=\beta$. The given functional equation for $x=y$ yields $f(x / 2)=x^{-\alpha} f(x)^{2} / 2$; hence the functional equation can be written as
$$
f(x) f(y)=\frac{1}{2} x^{\alpha} y^{-\alpha} f(y)^{2}+\frac{1}{2} y^{\alpha} x^{-\alpha} f(x)^{2},
$$
i.e.,
$$
\left((x / y)^{\alpha / 2} f(y)-(y / x)^{\alpha / 2} f(x)\right)^{2}=0 .
$$

Hence $f(x) / x^{\alpha}=f(y) / y^{\alpha}$ for all $x, y \in \mathbb{R}^{+}$, so $f(x)=\lambda x^{\alpha}$ for some $\lambda$. Substituting into the functional equation we obtain that $\lambda=2^{1-a}$ or $\lambda=0$. Thus either $f(x) \equiv 2^{1-a} x^{a}$ or $f(x) \equiv 0$.
Now let $\alpha \neq \beta$. Interchanging $x$ with $y$ in the given equation and subtracting these equalities from each other, we get $\left(x^{\alpha}-x^{a}\right) f(y / 2)=\left(y^{a}-\right.$ $\left.y^{3}\right) f(x / 2)$, so for some constant $\lambda \geq 0$ and all $x \neq 1, f(x / 2)=\lambda\left(x^{0}-x^{3}\right)$. Substituting this into the given equation, we obtain that only $\lambda=0$ is possible, i.e., $f(x) \equiv 0$.