I'm trying to evaluate the following definite integral but am unsure how to handle the absolute value efficiently over the given interval. Any hints on finding the points where the expression inside changes sign, or alternative methods like symmetry?
$$\int_{0}^{2\pi} \left| \sin x + \cos x - 1 \right| \, dx$$ I've tried splitting the interval at the roots of $\sin x + \cos x - 1 = 0$, but solving for those points analytically seems messy. Is there a trigonometric identity or substitution that simplifies this?