Take a look at the graph of cos x and sin x (attached below).
The region looks like it should be split into two portions, one from 0 to pi/4, and another from pi/4 to pi/2. The function defining the top of the region is different for each one.
Can you see what the integral should be?
Edit: Oh, I see what you did. You are looking at the wrong region. Look at the one that touches the x-axis.