The integral of ∣xcosπx∣ from −2 to 2 is evaluated by exploiting even symmetry and splitting the positive region at the zeros of cosπx. The final value is π8.
The key idea here is symmetry and the absolute value. The function ∣xcosπx∣ is even because ∣(−x)cos(−πx)∣=∣−xcosπx∣=∣xcosπx∣. So we can integrate from 0 to 2 and double the result. But the absolute value also means we have to handle where cosπx changes sign — those are the points where the integrand would otherwise be negative, so the absolute value flips the sign there.
The zeros of cosπx occur when πx=2π+nπ, i.e., x=21+n. Over [0,2], these are at x=21 and x=23. Between these zeros, cosπx alternates sign, so the absolute value makes each piece positive. We'll integrate piecewise.
- Use evenness to reduce the interval.
Since the integrand is even:
I=∫−22∣xcosπx∣dx=2∫02∣xcosπx∣dx.
-
Identify the sign changes of cosπx on [0,2].
cosπx=0 at x=21 and x=23.
- On [0,21]: cosπx≥0, so ∣xcosπx∣=xcosπx.
- On [21,23]: cosπx≤0, so ∣xcosπx∣=−xcosπx.
- On [23,2]: cosπx≥0, so ∣xcosπx∣=xcosπx.
Thus:
I=2(∫01/2xcosπxdx+∫1/23/2(−xcosπx)dx+∫3/22xcosπxdx).
- Compute the antiderivative.
Use integration by parts: let u=x, dv=cosπxdx, so du=dx, v=πsinπx. Then:
∫xcosπxdx=πxsinπx−∫πsinπxdx=πxsinπx+π2cosπx.
- Evaluate each piece.
∫01/2xcosπxdx=[πxsinπx+π2cosπx]01/2.
At $x = 1/2$: $\sin(\pi/2) = 1$, $\cos(\pi/2) = 0$, so value = $\frac{(1/2)(1)}{\pi} + 0 = \frac{1}{2\pi}$.
At $x = 0$: $\sin 0 = 0$, $\cos 0 = 1$, so value = $0 + \frac{1}{\pi^2}$.
Thus first piece = $\frac{1}{2\pi} - \frac{1}{\pi^2}$.
- Second piece (note the minus sign outside):
∫1/23/2(−xcosπx)dx=−[πxsinπx+π2cosπx]1/23/2.
At $x = 3/2$: $\sin(3\pi/2) = -1$, $\cos(3\pi/2) = 0$, so value = $\frac{(3/2)(-1)}{\pi} + 0 = -\frac{3}{2\pi}$.
At $x = 1/2$: value = $\frac{1}{2\pi}$ (as above).
So the bracket $[F]_{1/2}^{3/2} = \left(-\frac{3}{2\pi}\right) - \left(\frac{1}{2\pi}\right) = -\frac{4}{2\pi} = -\frac{2}{\pi}$.
Then the second piece = $-(-\frac{2}{\pi}) = \frac{2}{\pi}$.
∫3/22xcosπxdx=[πxsinπx+π2cosπx]3/22.
At $x = 2$: $\sin 2\pi = 0$, $\cos 2\pi = 1$, so value = $0 + \frac{1}{\pi^2}$. …