$\int_{0}^{\pi}|\sqrt2\sin x+2\cos x|dx$ $\int_{0}^{\pi}|\sqrt2\sin x+2\cos x|dx$
MyAttempt
$\int_{0}^{\pi}|\sqrt2\sin x+2\cos x|=\int_{0}^{\pi/2}\sqrt2\sin x+2\cos x dx+\int_{\pi/2}^{\pi}|\sqrt2\sin x+2\cos x| dx$
I could solve first integral but in second one,i could not judge the mod will take plus sign or minus sign or how to break it in further intervals?

Let's first find out the break point $$\sqrt 2\sin x+2\cos x=0$$ $$\sqrt 2\sin x=-2\cos x\iff \tan x=-\frac{2}{\sqrt 2}$$ $$x=\tan^{-1}(-\sqrt 2)$$
Now, we have $$\int_{0}^{\pi}\left|\sqrt 2\sin x+2\cos x \right|dx$$
$$=\int_{0}^{\tan^{-1}(-\sqrt 2)}\left|\sqrt 2\sin x+2\cos x \right|dx+\int_{\tan^{-1}(-\sqrt 2)}^{\pi}\left|\sqrt 2\sin x+2\cos x \right|dx$$
$$=\int_{0}^{\tan^{-1}(-\sqrt 2)}(\sqrt 2\sin x+2\cos x)dx-\int_{\tan^{-1}(\sqrt 2)}^{\pi}(\sqrt 2\sin x+2\cos x )dx$$
I hope you can solve further
