Giải thích các bước giải:
Theo bài ta có :
$A=3\cos^2x+2\sin 2x-3(\sin x+2\cos x)+2\sin^2x+2\cos^2x$
$\to A=5\cos^2x+4\sin x\cos x+2\sin^2x-3(\sin x+2\cos x)$
$\to A=4\cos^2x+4\sin x\cos x+\sin^2x+(\cos^2x+\sin^2x)-3(\sin x+2\cos x)$
$\to A=(\sin x+2\cos x)^2+1-3(\sin x+2\cos x)$
$\to A=(\sin x+2\cos x)^2-3(\sin x+2\cos x)+1$
$\to A=(\sin x+2\cos x-\dfrac{3}{2})^2-\dfrac{5}{4}$
Mà $y=\sin x+2\cos x\to y^2\le (1^2+2^2)(\sin^2x+\cos^2x)=5$
$\to -\sqrt{5}\le y\le \sqrt{5}$
$\to -\sqrt{5}-\dfrac{3}{2}\le\sin x+2\cos x-\dfrac{3}{2} \le \sqrt{5}-\dfrac{3}{2}$
$\to 0\le (\sin x+2\cos x-\dfrac{3}{2})^2\le (\sqrt{5}+\dfrac{3}{2})^2$
$\to -\dfrac{5}{4}\le (\sin x+2\cos x-\dfrac{3}{2})^2-\dfrac{5}{4}\le (\sqrt{5}+\dfrac{3}{2})^2-\dfrac{5}{4}$
$\to -\dfrac{5}{4}\le A\le (\sqrt{5}+\dfrac{3}{2})^2-\dfrac{5}{4}$
$\to M=(\sqrt{5}+\dfrac{3}{2})^2-\dfrac{5}{4}, m= -\dfrac{5}{4}$
$\to M+m=3\sqrt{5}+\dfrac{19}{4}$