We need to evaluate:
\[
\int_{-a}^{a}|x|\,dx.
\]
The function \(|x|\) is an even function because
\[
|-x|=|x|.
\]
For an even function \(f(x)\),
\[
\int_{-a}^{a}f(x)\,dx=2\int_0^a f(x)\,dx.
\]
Therefore,
\[
\int_{-a}^{a}|x|\,dx=2\int_0^a |x|\,dx.
\]
For \(x\geq 0\),
\[
|x|=x.
\]
So,
\[
2\int_0^a |x|\,dx=2\int_0^a x\,dx.
\]
Now integrate:
\[
2\int_0^a x\,dx=2\left[\frac{x^2}{2}\right]_0^a.
\]
\[
=\left[x^2\right]_0^a.
\]
\[
=a^2-0^2.
\]
\[
=a^2.
\]
Hence,
\[
\int_{-a}^{a}|x|\,dx=a^2.
\]