Step 1: Expand \( \cos x \) in a Taylor series.
We know that \( \cos x = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \cdots \). Therefore,
\[
e^{\cos x} = e^{1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \cdots}.
\]
Step 2: Separate the constant term.
Let \( e^{\cos x} = e \cdot e^{-\frac{x^2}{2!} + \frac{x^4}{4!} - \cdots} \).
Step 3: Expand the exponential term \( e^{-\frac{x^2}{2!} + \cdots} \).
Using the exponential expansion \( e^y = 1 + y + \frac{y^2}{2!} + \cdots \), we get:
\[
e^{-\frac{x^2}{2} + \cdots} = 1 - \frac{x^2}{2} + \cdots
\]
Step 4: Multiply by \( e \).
\[
e^{\cos x} = e(1 - \frac{x^2}{2} + \cdots)
\]
Thus, the coefficient of \( x^2 \) is \( e \times (-\frac{1}{2}) = -\frac{e}{2}. \)
Step 5: Final Answer.
The coefficient of \( x^2 \) is \( -\frac{e}{2} \).