5. Let $0 \leqslant x \leqslant 8$, then the range of the function $f(x)$ $=\frac{\sqrt{x\left(x^{2}+8\right)(8-x)}}{x+1}$ is
5. $\{y \mid 0 \leqslant y \leqslant 4\}$.

Clearly $y \geqslant 0$, and when $x=0$, $y=0$.
$$
\text{Also } \begin{aligned}
y & =\frac{\sqrt{\left(x^{2}+8\right)\left(8 x-x^{2}\right)}}{x+1} \\
& \leqslant \frac{1}{x+1} \cdot \frac{x^{2}+8+8 x-x^{2}}{2} \\
& =4 .
\end{aligned}
$$

Equality holds if and only if $x^{2}+8=8 x-x^{2}$, i.e., $x=2$, at which $y=4$.
Thus, $0 \leqslant y \leqslant 4$.