If we do the integral $\int \sqrt{1 - \sin(2x)} \, dx$, we get $$\int \sqrt{1 - \sin(2x)} \, dx = \int \sqrt{\left(\cos(x)-\sin(x)\right)^2} \, dx = \int \lvert\cos(x)-\sin(x)\rvert\, dx$$ When $x \in \left[-\frac{3\pi}{4} + 2k\pi\,, \frac{\pi}{4}+2k\pi \right]$, $\cos(x)-\sin(x)\ge0$, so $$\int \sqrt{1 - \sin(2x)} \, dx = \int \left(\cos(x)-\sin(x)\right) \, dx = \sin(x)+\cos(x)+C$$ but you can choose different constants for each of the intervals $\left[-\frac{3\pi}{4}\,, \frac{\pi}{4}\right], \left[\frac{5\pi}{4}\,, \frac{9\pi}{4}\right], \dots$
Similarly, when $x \in \left[\frac{\pi}{4} + 2n\pi\,, \frac{5\pi}{4}+2n\pi \right]$, $\cos(x)-\sin(x)\le0$, so $$\int \sqrt{1 - \sin(2x)} \, dx = \int \left(-\cos(x)+\sin(x)\right) \, dx = -\sin(x)-\cos(x)+K$$ and again you can choose different constants for each of the intervals $\left[\frac{\pi}{4}\,, \frac{5\pi}{4}\right], \left[\frac{9\pi}{4}\,, \frac{13\pi}{4}\right], \dots$
So we end up with infinitely many constants for the intervals. If we arbitrarily choose them, then the antiderivative might not be continuous at the points where the intervals end, i.e. $x = \frac{\pi}{4}+k\pi$. Can we leave it like that or is this a problem? If so, what requires that the antiderivative be continuous at those points? Or is it just a matter of conventions / definitions?