Tengo la siguiente integral$$\int_0^{\pi/2} |\sin x-\cos x|dx. $$It's a simple integral but when I try to solve the module I get stuck. I took $ \ sin x- \ cos x> 0$ and squaring this I found that $ \ sin 2x <1$. When I apply $ \ arcsin$ it would mean $$2x<\frac\pi2 \implies x<\frac\pi4$$ but the interval is wrong from the one in my book. When I apply $ \ arcsin $ ¿cambia el signo? ¿Por qué?
Respuestas
¿Demasiados anuncios? $$ \begin{align}
\int_0^{\pi/2}|\sin(x)-\cos(x)|\,\mathrm{d}x
&=\int_0^{\pi/4}(\cos(x)-\sin(x))\,\mathrm{d}x
+\int_{\pi/4}^{\pi/2}(\sin(x)-\cos(x))\,\mathrm{d}x\tag{1}\\
&=2\int_0^{\pi/4}(\cos(x)-\sin(x))\,\mathrm{d}x\tag{2}\\
&=2\left[\vphantom{\int}\sin(x)+\cos(x)\right]_0^{\pi/4}\tag{3}\\[6pt]
&=2\sqrt2-2\tag{4}
\end {align} $$ Explicación:
$(1)$: $\cos(x)\ge\sin(x)$ incesantemente $\left[0,\frac\pi4\right]$
$\sin(x)\ge\cos(x)$:$\left[\frac\pi4,\frac\pi2\right]$ y$(2)$
$\cos(x)=\sin\left(\frac\pi2-x\right)$: integrar
$\sin(x)=\cos\left(\frac\pi2-x\right)$: evaluar
La función$\;f(x)=\lvert \sin x-\cos x\rvert\;$ tiene una simetría wrt$\frac\pi 4$ desde$\;f\bigl(\frac \pi2-x\bigr)=f(x)$, de ahí$$\int_0^{\tfrac\pi 2} \lvert\sin x-\cos x\rvert \,\mathrm dx=2\int_0^{\tfrac\pi 4} (\cos x-\sin x) \,\mathrm dx=2(\sin x+\cos x)\biggl\rvert_0^{\tfrac\pi4}=2(\sqrt2-1).$ $