Notice that cos x is on top between 0 and , then sin x is on top between and . The point where they
cross is , so you have to divide the area into two integrals: one from 0 to , and the other from to
. In the first region, cos x is above sin x, so the integral to evaluate is
(cos x − sin x) dx
The integral of the second region is a little different, because sin x is above cos x.
(sin x − cos x) dx
If you add the two integrals, you’ll get the area of the whole region.