How can I find:$$\int \left|\sin(x)\right|\,\mathrm dx?$$ So far I have only seen Calculus I and integration by parts. When I try to integrate by parts I end up with another absolute value in the integrand function, and I do not know how to deal with it.
How to find the indefinite integral $\int |\sin x| \mathrm dx$?
195 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 4 best solutions below
On
You will probably need to break the region into intervals of $π$.
Each region $...(-π, 0), (0,π), (π,2π)...$ will have area 2.
Then, on the edges of the integral, if any additional area needs to be computed, use two definite integrals and add that to the area in the regions.
Each "region" has area 2 because $\int_0^π |sin(x)| = |-\cos(π)+\cos(0)| = 2$
On
To avoid jump discontinuities when $\sin x=0$, considering the definite integral first:
\begin{align*} \int_{0}^{x} |\sin t| \, dt &= \int_{0}^{x} \sqrt{1-\cos^2 t} \, dt \\ &= \int_{0}^{x-\frac{\pi}{2}} \sqrt{1-\sin^2 u} \, du \\ &= E\left( x-\frac{\pi}{2},1 \right) \\ \int |\sin t| \, dt &= E\left( x-\frac{\pi}{2},1 \right)+C \\ \end{align*}
where $\displaystyle E(\phi,k)=\int_{0}^{\phi} \sqrt{1-k^2\sin^2 \theta} \, d\theta \,$ is the incomplete elliptic integral of the second kind.
On
In $L^2(0,2\pi)$ we have: $$\left|\sin(x)\right| = \frac{2}{\pi}-\frac{4}{\pi}\sum_{n\geq 1}\frac{\cos(2n x)}{4n^2-1} \tag{1}$$ hence it follows that: $$ \int \left|\sin(x)\right|\,dx = C+\frac{2x}{\pi}-\color{blue}{\frac{4}{\pi}\sum_{n\geq 1}\frac{\cos(2n x)}{(2n-1)2n(2n+1)}}\tag{2} $$ where the blue term is a $\pi$-periodic function with mean zero, bounded in absolute value by $\frac{4\log 2-2}{\pi}<\frac{1}{4}$.
Over each interval $[k\pi,(k+1)\pi)$, the integral is like the integral of $\sin\left(x-\pi\left\lfloor\frac{x}\pi\right\rfloor\right)$. The integral over each of those intervals is $2$. Therefore, $$ \int\left|\sin(x)\right|\,\mathrm{d}x=2\left\lfloor\frac{x}\pi\right\rfloor-\cos\left(x-\pi\left\lfloor\frac{x}\pi\right\rfloor\right)+C $$