4. If the inequality $\frac{4 x}{a}+\frac{1}{x} \geqslant 4$ holds for all $x$ in the interval $[1,2]$, then the range of the real number $a$ is ( ).
(A) $\left(0, \frac{4}{3}\right]$
(B) $\left(1, \frac{4}{3}\right)$
(C) $\left[1, \frac{4}{3}\right]$
(D) $\left[\frac{16}{7}, \frac{4}{3}\right]$
4. A.

Let $x=1$, we get
$$
\frac{4}{a} \geqslant 3 \Rightarrow 0<a \leqslant \frac{4}{3}\left(a \in \mathbf{R}_{+}\right) \text {. }
$$

Thus, the original inequality becomes that for any $x \in[1,2]$, we have
$$
a \leqslant \frac{4 x^{2}}{4 x-1} \text {. }
$$

Therefore, we only need to find the minimum value of the function $f(x)=\frac{4 x^{2}}{4 x-1}$ in the interval $[1,2]$. It is easy to see that,
$$
f^{\prime}(x)=\frac{8 x(2 x-1)}{(4 x-1)^{2}}
$$

is always positive in the interval $[1,2]$, meaning $f(x)$ is monotonically increasing in the interval $[1,2]$.
Hence, the minimum value of $f(x)$ is $f(1)=\frac{4}{3}$.