5. If the positive integer $a$ makes the maximum value of the function $y=f(x)=x+$ $\sqrt{13-2 a x}$ also a positive integer, then this maximum value equals $($.$) .$
(A) 3
(B)4
(C) 7
(D) 8
5.(C).

Let $\sqrt{13-2 a x}=t(t \geqslant 0)$, then $x=\frac{13-t^{2}}{2 a}$. Therefore, $y=\frac{13-t^{2}}{2 a}+t=-\frac{1}{2 a}(t-a)^{2}+\frac{a^{2}+13}{2 a}$.
Since $t \geqslant 0$ and $a$ is a positive integer,
then when $t=a$, $y_{\text {max }}=\frac{a^{2}+13}{2 a}$.
To make $\frac{a^{2}+13}{2 a}$ a positive integer, $a$ must be an odd number. Since $\frac{a^{2}+13}{2 a}=\frac{1}{2}\left(a+\frac{13}{a}\right)$, then $a+\frac{13}{a}$ should be an even number. Therefore, $a$ can only be 1 or 13. Thus, $y_{\max }=7$.