The probability density function must satisfy the condition that the total probability is equal to 1. This is expressed as:
\[
\int_{-\infty}^{\infty} f(x) \, dx = 1
\]
Substituting the given function \( f(x) = ae^{-2|x|} \) into the equation:
\[
\int_{-\infty}^{\infty} ae^{-2|x|} \, dx = 1
\]
We split the integral into two parts because of the absolute value:
\[
\int_{-\infty}^{0} ae^{2x} \, dx + \int_{0}^{\infty} ae^{-2x} \, dx = 1
\]
The integrals can be solved as:
\[
\int_{-\infty}^{0} ae^{2x} \, dx = \frac{a}{2}, \quad \int_{0}^{\infty} ae^{-2x} \, dx = \frac{a}{2}
\]
Thus:
\[
\frac{a}{2} + \frac{a}{2} = 1
\]
Solving for \( a \):
\[
a = 1
\]
Thus, the value of \( a \) is \( \boxed{1} \).