Solve the following equations:
$3 \sin ^{2} x-5 \sin x \cos x+8 \cos ^{2} x=2$
$3 \sin ^{2} x-5 \sin x \cos x+8 \cos ^{2} x=2$
$\Rightarrow 3 \sin ^{2} x-5 \sin x \cos x+3 \cos ^{2} x+5 \cos ^{2} x-2=0$
$\Rightarrow 3\left(\sin ^{2} x+\cos ^{2} x\right)-5 \sin x \cos x+5 \cos ^{2} x-2=0$
$\Rightarrow 3-5 \sin x \cos x+5 \cos ^{2} x-2=0$
$\Rightarrow 5 \cos ^{2} x-5 \sin x \cos x+1=0$
$\Rightarrow 5\left(1-\sin ^{2} x\right)-5 \sin x \cos x+1=0$
$\Rightarrow 5-5 \sin ^{2} x-5 \sin x \cos x+1=0$
$\Rightarrow 5 \sin ^{2} x+5 \sin x \cos x-6=0$
Dividing by $\cos ^{2} x$, we get
$\Rightarrow 5 \tan ^{2} x+5 \tan x-6 \sec ^{2} x=0$
$\Rightarrow 5 \tan ^{2} x+5 \tan x-6-6 \tan ^{2} x=0$
$\Rightarrow-\tan ^{2} x+5 \tan x-6=0$
$\Rightarrow \tan ^{2} x-5 \tan x+6=0$
$\Rightarrow \tan ^{2} x-3 \tan x-2 \tan x+6=0$
$\Rightarrow(\tan x-3)(\tan x-2)=0$
$\Rightarrow(\tan x-3)=0$ or $(\tan x-2)=0$
$\Rightarrow \tan x=3$ or $\tan x=2$
$\Rightarrow x=n \pi+\tan ^{-1} 3$ or $x=n \pi+\tan ^{-1} 2, n \in \mathbb{Z}$