6. If the function $y=3 \sin x-4 \cos x$ attains its maximum value at $x_{0}$, then the value of $\tan x_{0}$ is $\qquad$.
6. $-\frac{3}{4}$.

Let $\cos \theta=\frac{3}{5}, \sin \theta=\frac{4}{5}$ ( $\theta$ is an acute angle).
Then $\tan \theta=\frac{4}{3}$.
Thus $y=5\left(\frac{3}{5} \sin x_{0}-\frac{4}{5} \cos x_{0}\right)$
$$
=5 \sin \left(x_{0}-\theta\right) \leqslant 5 \text {. }
$$

When $x_{0}-\theta=2 k \pi+\frac{\pi}{2}$, the equality holds, at this time,
$$
\begin{array}{l}
\tan x_{0}=\tan \left(2 k \pi+\frac{\pi}{2}+\theta\right)=\tan \left(\frac{\pi}{2}+\theta\right) \\
=-\cot \theta=-\frac{3}{4} .
\end{array}
$$