To find the area enclosed by a function, we need to use integration. Here, the function is not easy to integrate just by inspection, but it is the product of two functions we do know how to integrate: cos(x) and e^x. Therefore, we'll use integration by parts. We want to make the function we have to integrate "simpler", so according to ILATE, we'll pick cos(x) to differentiate, and e^x to integrate. d(cos(x))/dx = -sin(x), and the indefinite integral of e^x = e^x. So the integral of the original function between -pi/2 and pi/2 = [cos(x) * e^x] from -pi/2 to pi/2 - the integral of -sin(x) * e^x from -pi/2 to pi/2.
We're left with another integral in a similar form to the initial integral, so we'll use integration by parts once again. d(sin(x))/dx = cos(x). So the integral from -pi/2 to pi/2 of sin(x) * e^(x) = [sin(x) * e^x] from -pi/2 to pi/2 - the integral of cos(x) * e^x from -pi/2 to pi/2. We can now notice that we have come back to our original integral, and let I = the integral of cos(x) * e^x from -pi/2 to pi/2. Some rearrangement gives 2I = [e^x * (cos(x) + sin(x))] from -pi/2 to pi/2. Division by 2 and substitution of the limits gives us I = 1/2 * (e^(pi/2) + e^(-pi/2)).