(7) The minimum value of the function $f(x)=|x-1|+|x-3|+|x-5|+|x-7|$ is
On the number line, points $A, B, C, D$ represent the real numbers $1, 3, 5, 7$ respectively, and point $P$ represents the real number $x$, then
$$
f(x)=|P A|+|P B|+|P C|+|P D|.
$$

Obviously,
$$
|P A|+|P D| \geqslant|A D|=6,
$$

the equality holds if and only if $P$ is on the segment $A D$ (including endpoints);
$$
|P B|+|P C| \geqslant|B C|=2,
$$

the equality holds if and only if $P$ is on the segment $B C$ (including endpoints). Therefore, $f(x) \geqslant 8$, the equality holds if and only if $P$ is on the segment $B C$ (including endpoints). That is, when $3 \leqslant x \leqslant 5$, $f(x)$ has the minimum value 8.