Definite integral of $\sin x\cos x$ from $0$ to $2\pi$?

9k Views Asked by At

I've done this in two different ways.

First: $$\int _0 ^{2 \pi} \sin x \cos x dx = 2 \int _0 ^\pi \sin x \cos x dx = 0,$$ since $\cos(\pi - x) = - \cos x$.

By using the property $$\int _0 ^{2a} f(x) dx = 0 \text{ if } f(2a-x)=-f(x)$$ or $$\int _0 ^{2a} f(x) = 2 \int _0 ^a f(x) dx \text{ if } f(2a-x)=f(x).$$

Second way:

$$\begin{align*}\int _0 ^{2\pi} \sin x\cos x dx &= \frac 1 2 \times \int _0 ^{2\pi} \sin(2x) dx\\ &= \int _0 ^\pi \sin(2x) dx. \\& \boxed{\text{Since $\sin(2(2π-x)) = \sin(2x)$},} \\ &= 2 \times \int _0 ^{\pi \over 2} \sin(2x) dx\\ &= 4 \times \int _0 ^{\pi \over 4} \sin(2x) dx, \end{align*}$$ since $$ \sin\left(2\left[\frac \pi 2 - x\right]\right) = \sin(\pi-2x) = \sin(2x), $$ which upon integrating I get answer as $2$.

I didn't understand where my approach is wrong so which answer I must assure.

2

There are 2 best solutions below

0
On

The mistake is in the step:

$$\int_{0}^{\pi} \sin(2x) dx = 2\cdot\int_{0}^{\pi / 2} \sin(2x) dx$$

where you provide (or seek to) the reasoning that $\sin(2(\pi-x))=\sin(x)$. But this is not true because $\sin(2(\pi-x))=-\sin(x)$.

Which indeed shows that $\int_{0}^{\pi} \sin(2x) dx$ is odd about $\pi / 2$ giving the value of original integral as $0$.

0
On

In the second way you had a mistake, you said that $\int_0^\pi \sin(2x)dx=2\int_0^{\pi/2}\sin(2x)dx$.

If this is true then the function is even around $\pi/2$, this is false because $\sin(2(2\pi-x))=-\sin(2x)$, but rather than this way, I think that it is better to shift the function $\pi/2$ and see what happens: $\sin(2(x-\pi/2))=\sin(2x-\pi)=-\sin(2x)$, I don't need to change the bounds because I only care if the shifted function is even or odd, we know that $\sin$ is odd, hence $-\sin$ is also odd, and thus the function is odd around $\pi/2$ so $2\int_0^{\pi/2}\sin(2x)dx\ne\int_0^\pi \sin(2x)dx=0$