## Thomas' Calculus 13th Edition

$4\sqrt 2-2$
Step 1. Graph the functions as shown in the figure. The question asks the total area of not only the enclosed region, so we need to find the sum of areas for three regions $A_1, A_2, A_3$. Step 2. The total area between the two functions in the interval of $[0,\frac{3\pi}{2}]$, after identifying the intersections at $x=\frac{\pi}{4},\frac{5\pi}{4}$, is given by $A=\int_0^{\pi/4}(cos(x)-sin(x))dx+\int_{\pi/4}^{5\pi/4}(sin(x)-cos(x))dx+\int_{5\pi/4}^{3\pi/2}(cos(x)-sin(x))dx=(sin(x)+cos(x))|_0^{\pi/4}+(-cos(x)-sin(x))|_{\pi/4}^{5\pi/4}+(sin(x)+cos(x))|_{5\pi/4}^{3\pi/2}=(\frac{\sqrt 2}{2}+\frac{\sqrt 2}{2})-(0+1)+(\frac{\sqrt 2}{2}+\frac{\sqrt 2}{2})-(-\frac{\sqrt 2}{2}-\frac{\sqrt 2}{2})+(-1+0)-(-\frac{\sqrt 2}{2}-\frac{\sqrt 2}{2})=4\sqrt 2-2$