Find area of region $y=\sin x$ and $\cos x$, $[0,2\pi]$ Can somebody Find area of region $y=\sin x$ and $\cos x$, $[0,2\pi]$
I didn't know how to solve it because some of the area will be negative so how can I find it ?
Thanks all

This is why graphing functions can be so crucial: you can see, then, when $\cos x > \sin x$ on your interval, and when $\sin x > \cos x$ on that same interval.

To find the bounds of integration, so we can compute the area bounded by the two graphs and by the lines $x = 0$ and $x = 2\pi$, we need to find the  precise points of intersection of the graphs, we need to solve for $x$. 
That is, we see when  $\cos x = \sin x$, and solving for $x$ Doing so gives us two points of intersection: when $x = \pi/4$ and when $x = 5\pi/4$. So we have three intervals over which to integrate: 


*

*between $x = 0$ and $x = \pi/4$, we have that $\cos x > \sin x$. This gives us the integral $$\int_0^{\pi/4} (\cos x - \sin x)\,dx$$ 

*between $x = \pi/4$ and $x = 5\pi/4$, we see that $\sin x \gt \cos x$. This gives us the integral $$\int_{\pi/4}^{5\pi/4} (\sin x - \cos x)\,dx$$

*Finally, betwee $x = 5\pi/4$ and $x = 2\pi$, we have that $\cos x \gt \sin x$, giving us the final term of integration: $$\int_{5\pi/4}^{2\pi}(\cos x - \sin x)\, dx$$
Putting it all together, we sum: $$\text{AREA}\;= \;\int_0^{\pi/4} (\cos x - \sin x)\,dx \quad +\quad \int_{\pi/4}^{5\pi/4} (\sin x - \cos x)\,dx \quad + \quad \int_{5\pi/4}^{2\pi}(\cos x - \sin x)\, dx$$
