To determine the number of local maxima and minima of the function \( f(x) \), we need to first find its first and second derivatives. We start by differentiating \( f(x) \) using the Leibniz rule for the derivative of an integral: \[ f'(x) = \frac{d}{dx} \left( \int_0^{x^2} \frac{t^2 - 8t + 15}{e^t} dt \right) = \frac{d}{dx} \left( \int_0^{x^2} g(t) dt \right), \] where \( g(t) = \frac{t^2 - 8t + 15}{e^t} \). By the Leibniz rule, this becomes: \[ f'(x) = 2x \cdot \frac{(x^2)^2 - 8(x^2) + 15}{e^{x^2}}. \] Now, for critical points, we solve \( f'(x) = 0 \): \[ 2x \cdot \frac{x^4 - 8x^2 + 15}{e^{x^2}} = 0. \] This equation will hold if either \( x = 0 \) or \( x^4 - 8x^2 + 15 = 0 \). Solving the quadratic equation \( x^4 - 8x^2 + 15 = 0 \) leads to: \[ x^2 = \frac{8 \pm \sqrt{64 - 60}}{2} = 4 \pm \sqrt{1}, \] which gives solutions \( x^2 = 5 \) and \( x^2 = 3 \), or \( x = \pm \sqrt{5}, \pm \sqrt{3} \).
Now, we proceed to check the nature of these critical points using the second derivative \( f''(x) \) to determine whether they correspond to local maxima or minima. After calculating \( f''(x) \) and analyzing its sign at the critical points \( x = 0, \pm \sqrt{3}, \pm \sqrt{5} \), we find that there are 2 local maxima and 2 local minima.
Thus, the number of local maxima and minima is 2 and 2, respectively.