Find the real number $a$ such that the integral $$\int_a^{a+8}e^{-x}e^{-x^2}dx$$ attain its maximum.
1. Consider the integral 
   \[
   \int_a^{a+8} e^{-x} e^{-x^2} \, dx.
   \]
   We need to find the value of \(a\) that maximizes this integral.

2. Notice that the integrand can be rewritten as:
   \[
   e^{-x} e^{-x^2} = e^{-x - x^2}.
   \]

3. To maximize the integral, we need to consider the behavior of the function \(e^{-x - x^2}\). This function is related to the normal distribution, which has a peak at its mean.

4. The function \(e^{-x - x^2}\) can be rewritten as:
   \[
   e^{-x - x^2} = e^{-(x + \frac{1}{2})^2 + \frac{1}{4}} = e^{\frac{1}{4}} e^{-(x + \frac{1}{2})^2}.
   \]
   This shows that the function \(e^{-x - x^2}\) is maximized when \(x + \frac{1}{2} = 0\), i.e., \(x = -\frac{1}{2}\).

5. To maximize the integral \(\int_a^{a+8} e^{-x - x^2} \, dx\), we need the interval \([a, a+8]\) to be centered around the point where the integrand is maximized, which is \(x = -\frac{1}{2}\).

6. Therefore, we set the midpoint of the interval \([a, a+8]\) to \(-\frac{1}{2}\):
   \[
   \frac{a + (a+8)}{2} = -\frac{1}{2}.
   \]

7. Solving for \(a\):
   \[
   \frac{2a + 8}{2} = -\frac{1}{2} \implies 2a + 8 = -1 \implies 2a = -9 \implies a = -\frac{9}{2} = -4.5.
   \]

Conclusion:
\[
\boxed{a = -4.5}
\]