7 Let $f(x)=\sin ^{4} x-\sin x \cos x+\cos ^{4} x$, then the range of $f(x)$ is $\qquad$ .
Solve $f(x)=\sin ^{4} x-\sin x \cos x+\cos ^{4} x=1-\frac{1}{2} \sin 2 x-\frac{1}{2} \sin ^{2} 2 x$. Let $t=\sin 2 x$, then
$$
f(x)=g(t)=1-\frac{1}{2} t-\frac{1}{2} t^{2}=\frac{9}{8}-\frac{1}{2}\left(t+\frac{1}{2}\right)^{2} .
$$

Therefore $\min _{-1 \leq t \leq 1} g(t)=g(1)=\frac{9}{8}-\frac{1}{2} \cdot \frac{9}{4}=0, \min _{-1<t<1} g(t)=$ $g\left(-\frac{1}{2}\right)=\frac{9}{8}-\frac{1}{2} \cdot 0=\frac{9}{8}$.
Thus we have $0 \leqslant f(x) \leqslant \frac{9}{8}$.