Why is $\int_{0}^{2\pi} |\sin x| dx = 4$

380 Views Asked by At

I can't understand why $$\int_{0}^{2\pi} |\sin x| dx = 4$$while $$\int_{0}^{2\pi} \sin x dx = 0$$ I did the calculus for the second varian but I can't reach result $4$ for the first integral. Thank you for helping.

4

There are 4 best solutions below

1
On BEST ANSWER

It's simple: $\sin x$ on a single period has a "hill" between $0$ and $\pi$ and symmetrically, a "valley" between $\pi$ and $2\pi$. So the integrals cancel out. On the other hand, integration of $|\sin x|$ has to be split to a sum of integrals, where on the second part, the sign is reversed to produce two "hills". Because of symmetry, the integrals over half periods are the same:

$$\int_0^{2\pi} |sin x|{\,\rm d}x=2\int_0^\pi \sin x{\,\rm d}x$$

1
On

$$ \int^{2 \pi}_0 |\sin(x)|\,dx = 4 \int^{\frac{\pi}{2}}_0 |\sin(x)|\, dx = 4 \int^{\frac{\pi}{2}}_0 \sin(x)\, dx = 4 [ -\cos(x) ]^{ \frac{\pi}{2} }_0 = 4 $$

0
On

Since $\sin{x}$ is non-negative for $x \in [0, \pi]$ and non-positive for $x \in [\pi, 2\pi]$, we can split the integral into two parts as such:

$$\int_{0}^{2 \pi} |\sin{x}| dx \\= \int_{0}^{\pi} \sin{x}\, dx - \int_{\pi}^{2\pi} \sin{x} \, dx \\= -\cos{\pi} + \cos{0} - (-\cos{2\pi} + \cos{\pi}) \\ = 1 + 1 + 1 +1 = 4$$

Note the change in signs because $\int \sin{x} = -\cos{x}$.

2
On

Think about what the definition of $\left|\textrm{sin}\,(x)\right|$ is:

$$\left|\textrm{sin}\,(x)\right| = \begin{cases} \textrm{sin}\,(x), &\text{if}\; \, \textrm{sin}\, (x) \geq 0\\ -\textrm{sin}\,(x), &\text{if}\; \, \textrm{sin}\, (x) < 0\end{cases}$$

Therefore, you need to split the integral up into areas where $\textrm{sin}\, (x) \geq0$ and where $\textrm{sin}\, (x) <0 $, these being $0\leq x \leq \pi$ and $\pi<x<2\pi$ . Hence:

$$\int_0^{2\pi} \left|\textrm{sin}\,(x)\right| \; \textrm{d}x = \int_0^{\pi} \textrm{sin}\, (x) \; \textrm{d}x + \int_{\pi}^{2\pi} -\textrm{sin}\, (x) \; \textrm{d}x = \left[-\textrm{cos}\,(x)\right]^{\pi}_0 + \left[\textrm{cos}\,(x)\right]^{2\pi}_{\pi} = 2+2=4$$