Problem 63
Easy Substitution and Symmetry

The integral J = integral from 0 to () pi sqrt((1+ cos

The integral $J = \int_0^\pi \sqrt{\frac{1+\cos 2x}{2}} \, dx$ is calculated as follows: $$\int_0^\pi \sqrt{\frac{1+\cos 2x}{2}} \, dx = \int_0^\pi \sqrt{\cos^2 x} \, dx = \int_0^\pi \cos x \, dx = \left.\sin x\right|_0^\pi = 0.$$ However, the integrand $f(x) = \sqrt{\frac{1+\cos 2x}{2}}$ is positive, so the value of the integral must be greater than zero. Where is the error?

Explanation of Method

This is a “find the error” problem: a plausible-looking but flawed computation is examined to identify exactly which step is invalid, and the integral is then evaluated correctly (often revealing an improper integral, a sign error from an absolute value, or a hidden discontinuity in a substitution).

This is another important example illustrating a common error involving the square root function and absolute values.

Identifying the error

The error occurs in this step:

\[\sqrt{\cos^2 x} = \cos x\]

This is incorrect! The correct identity is:

\[\sqrt{\cos^2 x} = |\cos x|\]

Why? The square root function always returns a non-negative value. By definition:

\[\sqrt{a^2} = |a| \quad \text{for all } a \in \mathbb{R}\]

Therefore:

\[\sqrt{\cos^2 x} = |\cos x|\]

Analyzing $\cos x$ on $[0, \pi]$

On the interval $[0, \pi]$:

Correct evaluation

Step 1: Use the correct identity

First, verify the trigonometric identity:

\[\frac{1 + \cos 2x}{2} = \frac{1 + (2\cos^2 x - 1)}{2} = \frac{2\cos^2 x}{2} = \cos^2 x\]

So:

\[\sqrt{\frac{1+\cos 2x}{2}} = \sqrt{\cos^2 x} = |\cos x|\]

Step 2: Split the integral

\[\int_0^\pi |\cos x| \, dx = \int_0^{\pi/2} |\cos x| \, dx + \int_{\pi/2}^\pi |\cos x| \, dx\]

On $[0, \frac{\pi}{2}]$: $|\cos x| = \cos x$

On $[\frac{\pi}{2}, \pi]$: $|\cos x| = -\cos x$

Therefore:

\[\int_0^\pi |\cos x| \, dx = \int_0^{\pi/2} \cos x \, dx + \int_{\pi/2}^\pi (-\cos x) \, dx\]

Step 3: Evaluate each integral

\[\int_0^{\pi/2} \cos x \, dx = \left[\sin x\right]_0^{\pi/2} = \sin\left(\frac{\pi}{2}\right) - \sin(0) = 1 - 0 = 1\]

\[\int_{\pi/2}^\pi (-\cos x) \, dx = \left[-\sin x\right]_{\pi/2}^\pi = -\sin(\pi) - (-\sin\left(\frac{\pi}{2}\right)) = 0 + 1 = 1\]

Step 4: Add the results

\[\int_0^\pi |\cos x| \, dx = 1 + 1 = 2\]

Verification

Let's verify this makes sense:

Graphical interpretation

On $[0, \pi]$:

Summary of the error

  1. What went wrong: The error was writing $\sqrt{\cos^2 x} = \cos x$ instead of $\sqrt{\cos^2 x} = |\cos x|$.
  2. Why it matters: When $\cos x < 0$ (which happens for $x \in (\pi/2, \pi)$), we have $\sqrt{\cos^2 x} = -\cos x$, not $\cos x$.
  3. General principle: Always remember that $\sqrt{a^2} = |a|$, not just $a$.
  4. The incorrect answer: The erroneous calculation gave 0 because $\int_0^\pi \cos x \, dx$ includes both positive and negative contributions that cancel out. But $\int_0^\pi |\cos x| \, dx$ counts all contributions as positive.

Correct answer:

\[\boxed{\int_0^\pi \sqrt{\frac{1+\cos 2x}{2}} \, dx = \int_0^\pi |\cos x| \, dx = 2}\]

Key lesson: Always be careful with square roots and absolute values. The identity $\sqrt{a^2} = |a|$ is fundamental and must not be forgotten!


Result

Correct answer:

\[\boxed{\int_0^\pi \sqrt{\frac{1+\cos 2x}{2}} \, dx = \int_0^\pi |\cos x| \, dx = 2}\]