The expectation \( E[f(x)] \) for a function \( f(x) = x^2 \) under the given probability distribution is calculated as:
\[
E[x^2] = \int_0^a x^2 \cdot \frac{1}{a} \, dx = \frac{1}{a} \int_0^a x^2 \, dx
\]
Evaluating the integral:
\[
\int_0^a x^2 \, dx = \frac{x^3}{3} \bigg|_0^a = \frac{a^3}{3}
\]
Thus, the expected value is:
\[
E[x^2] = \frac{1}{a} \cdot \frac{a^3}{3} = \frac{a^2}{3}
\]
This confirms that option (A) is correct, with the expectation of \( x^2 \) being \( \frac{a^2}{3} \).