<s>[INST] Solve inequality $\cos(x)+2\tan(x)\le2+\sin(x)$ Solve inequality 

$\cos(x)+2\tan(x)\le2+\sin(x)$

My proof: 
$\cos(x)+2\tan(x)\le2+\sin(x)\\\cos^2(x)+2\sin(x)\le2\cos(x)+\sin(x)\cos(x)\\\cos(x)\left(\cos(x)-2 \right )+\sin(x)\left(2-\cos(x) \right )\le0\\\left(\cos(x)-\sin(x) \right )\left(\cos(x)-2 \right )\le0\\\sqrt{2}\left(\sin\left(x-\frac{\pi}{4} \right ) \right )\left(\cos(x)-2 \right )\le0\\-\sqrt{2}\cos\left(x+\frac{\pi}{4} \right )\left(\cos(x)-2 \right )\le0$
I stopped at this moment and I have no idea what to do now
 [/INST] The inequality should be factorized as,
$$\frac{\sqrt{2}}{\cos x}\cos\left(x+\frac{\pi}{4} \right )\left(\cos x -2 \right )\le0$$
Two cases:
1) $\cos x > 0, \>\>\>\> \cos\left(x+\frac{\pi}{4} \right )\ge 0$, which leads to
$$-\frac\pi2 +2\pi k  < x \le \frac\pi4+2\pi k$$ 
2) $\cos x < 0, \>\>\>\> \cos\left(x+\frac{\pi}{4} \right )\le 0$, which leads to
$$\frac{\pi}2 +2\pi k  < x \le \frac{5\pi}4+2\pi k$$ 
</s>