Clarification regarding indefinite integral $\int\sqrt{1+\cos 2x}\,\mathrm{d}x $

analysiscalculusintegrationreal-analysis

Most evaluations i have seen regarding evaluation of $\int\sqrt{1+\cos 2x}\,\mathrm{d}x$ go like:
$$\int\sqrt{1+\cos 2x}\,\mathrm{d}x=\int\sqrt{2\cos^2x}\,\mathrm{d}x=\sqrt{2} \int \cos x\,\mathrm{d}x=\sqrt{2}\sin x+c.$$

My question is:

shouldn't the calculations respect both the interval of integration and the absolute value that arises?

Starting with the existence part for sake of completeness, since all indefinite integrals are evaluated with respect to an interval, one could proceed as follows:

Let $I$ be an open interval. Since $\sqrt{1+\cos 2x}$ is continuous on $I$, primitive exists and:
$$\int\sqrt{1+\cos 2x}\,\mathrm{d}x=\int\sqrt{2\cos^2x}\,\mathrm{d}x=\sqrt{2} \int |\cos x|\,\mathrm{d}x$$
and regarding on the interval $I$ of integration we proceed as follows: if
$\cos x>0$ on $I$ then the integral equals $\sqrt{2}\sin x+c$ and if $\cos x<0$ on $I$ then the integral equals $-\sqrt{2} \sin x+c$.

Of course, in that case we have an issue when $I$ is such that both $\cos x>0$ and $<0$ happen, for example $I=(0,\pi)…$

Thanks in advance for this clarification.


Edit. Certainly this may apply to easier cases, such as $\displaystyle \int |x|\,\mathrm{d}x.$

Best Answer

enter image description here

As seen in the graph, the integrand $g(x) = \sqrt{1+\cos 2x}$ is repeating and strictly positive. Though continuous, its derivative is not. Thus, $g(x)$ is a positive periodic function and only piece-wise differentiable.

Normally, its indefinite integral can be expressed as,

$$\int\sqrt{1+\cos 2x}\>dx=\sqrt{1+\cos 2x}\>\tan(x)+C$$

which is valid for any individual intervals, either $\cos x\ge 0$ or $\cos x<0$. However, the primitive can not be applied across intervals separated by the non-differentiable points $\frac\pi2 + n\pi$, because it is discontinuous at those points. For the primitive to be valid over all intervals, it has to be continuous and strictly increasing, as expected from the positivity of $g(x)$.

The primitive valid across all $x$ can nonetheless be derived by taking into account of the periodicity of $g(x)$ and expressed as follows,

$$I(x)=\int\sqrt{1+\cos 2x}\>dx=2\sqrt2 \left[\frac x\pi+\frac12\right]+\sqrt{1+\cos 2x}\>\tan(x)+C$$

where $[x]$ denotes the integer function of $x$. Effectively, it assures the continuity and increasing monotonicity of $I(x)$, as seen in the graph below. As a result, the integral $I(x)$ is applicable to any integration intervals, for instance, the definite integral,

$$\int_0^8 \sqrt{1+\cos 2x}\>dx=I(x)|_{0}^{8}=\sqrt2(6-\sin8) $$

enter image description here

Related Question