How to find the area using integrals? Find the area of the shape surrounded by $y = \sin(x)$, $y = -\cos(x)$, $x = 0$, $x = π/4$.
Do I subtract $S_2$ from the $S_1$? How do I find the shape's area?

 A: The area equals
$$\int_0^{\frac{\pi}4}\int_{-\cos(x)}^{\sin(x)}\ dy\ dx=\int_0^{\frac{\pi}4}\sin(x)+\cos(x)\ dx=$$
$$=\left[-\cos(x)\right]_{0}^{\frac{\pi}4}+\left[\sin(x)\right]_{0}^{\frac{\pi}4}=$$
$$=-\frac1{\sqrt 2}+1+\frac1{\sqrt 2}-0=1.$$
A: The idea is that area is height integrated over the width. The “height” is $$h(x) = (\sin x)-(-\cos x)$$ and the “width” is $dx$. Then the area is 
$$\begin{align}
\text{area} &= \int_0^{\pi/4} h(x) \, dx \\
&= \int_0^{\pi/4} \left( \sin x + \cos x \right) \, dx \\
&= \int_0^{\pi/4} \sin(x) \, dx + \int_0^{\pi/4} \cos(x) \, dx \\
&= -\cos(x)\Bigr|_{0}^{\pi/4} + \sin(x)\Bigr|_{0}^{\pi/4} \\
&= -\bigl[ \cos(\pi/4)-\cos(0) \bigr] + \bigl[ \sin(\pi/4)-\sin(0) \bigr] \\
&= -\left( \frac{\sqrt2}{2}-1 \right) + \left( \frac{\sqrt2}{2} - 0 \right) \\
&= \frac{\sqrt2}{2}-\frac{\sqrt2}{2}+1 \\
&= 1
\end{align}$$
If you don’t take to the “length” and “width” way of thinking, then you’ll just have to remember: upper minus lower.
A: If you added $1$ to both the upper and the lower function, that would move both graphs one unit higher so that the region between them would lie entirely above the $x$-axis. Yet the area of the region would remain the same. So the position of the $x$-axis makes no difference. You merely integrate the difference of the upper and lower bounds: upper minus lower.
