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]$:
- For $x \in [0, \frac{\pi}{2}]$: $\cos x \geq 0$, so $|\cos x| = \cos x$
- For $x \in [\frac{\pi}{2}, \pi]$: $\cos x \leq 0$, so $|\cos x| = -\cos x$
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:
- The integrand $|\cos x|$ is indeed always non-negative on $[0, \pi]$
- The integral value is $2 > 0$, which is consistent with integrating a positive function
- The function $|\cos x|$ has area 1 under each "hump" (from 0 to $\pi/2$ and from $\pi/2$ to $\pi$), giving total area 2
Graphical interpretation
On $[0, \pi]$:
- $\cos x$ starts at 1, decreases to 0 at $x = \pi/2$, then continues to $-1$ at $x = \pi$
- $|\cos x|$ starts at 1, decreases to 0 at $x = \pi/2$, then increases back to 1 at $x = \pi$ (it's the reflection of the negative part)
- The graph of $|\cos x|$ forms two identical "humps," each with area 1
Summary of the error
- What went wrong: The error was writing $\sqrt{\cos^2 x} = \cos x$ instead of $\sqrt{\cos^2 x} = |\cos x|$.
- 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$.
- General principle: Always remember that $\sqrt{a^2} = |a|$, not just $a$.
- 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}\]