Find the critical points and the intervals on which the function is increasing or decreasing. Use the First Derivative Test to determine whether the critical point yields a local min or max (or neither).
$y=e^{-x} \cos x, \quad\left[-\frac{\pi}{2}, \frac{\pi}{2}\right]$