To solve the given integral, we use partial fraction decomposition.
Let:
\[
\frac{x^2}{(x^2 + 4)(x^2 + 9)} = \frac{A}{x^2 + 4} + \frac{B}{x^2 + 9}.
\]
Multiply through by \((x^2 + 4)(x^2 + 9)\) to eliminate the denominators:
\[
x^2 = A(x^2 + 9) + B(x^2 + 4).
\]
Simplify:
\[
x^2 = A x^2 + 9A + B x^2 + 4B.
\]
Combine like terms:
\[
x^2 = (A + B)x^2 + (9A + 4B).
\]
Equating coefficients of \(x^2\) and the constant term:
\[
A + B = 1, \quad 9A + 4B = 0. \tag{1}
\]
From the first equation:
\[
B = 1 - A. \tag{2}
\]
Substitute \(B = 1 - A\) into the second equation:
\[
9A + 4(1 - A) = 0.
\]
Simplify:
\[
9A + 4 - 4A = 0,
\]
\[
5A = -4, \quad A = -\frac{4}{5}.
\]
Substitute \(A = -\frac{4}{5}\) into \(B = 1 - A\):
\[
B = 1 - \left(-\frac{4}{5}\right) = 1 + \frac{4}{5} = \frac{9}{5}.
\]
Thus:
\[
\frac{x^2}{(x^2 + 4)(x^2 + 9)} = \frac{-\frac{4}{5}}{x^2 + 4} + \frac{\frac{9}{5}}{x^2 + 9}.
\]
Rewrite:
\[
\frac{x^2}{(x^2 + 4)(x^2 + 9)} = -\frac{4}{5} \cdot \frac{1}{x^2 + 4} + \frac{9}{5} \cdot \frac{1}{x^2 + 9}.
\]
The integral becomes:
\[
\int \frac{x^2}{(x^2 + 4)(x^2 + 9)} \, dx = -\frac{4}{5} \int \frac{1}{x^2 + 4} \, dx + \frac{9}{5} \int \frac{1}{x^2 + 9} \, dx.
\]
Using the standard formula:
\[
\int \frac{1}{x^2 + a^2} \, dx = \frac{1}{a} \tan^{-1}\left(\frac{x}{a}\right),
\]
we evaluate each term:
1. For \(\int \frac{1}{x^2 + 4} \, dx\):
\[
\int \frac{1}{x^2 + 4} \, dx = \frac{1}{2} \tan^{-1}\left(\frac{x}{2}\right).
\]
2. For \(\int \frac{1}{x^2 + 9} \, dx\):
\[
\int \frac{1}{x^2 + 9} \, dx = \frac{1}{3} \tan^{-1}\left(\frac{x}{3}\right).
\]
Substitute these results back:
\[
\int \frac{x^2}{(x^2 + 4)(x^2 + 9)} \, dx = -\frac{4}{5} \cdot \frac{1}{2} \tan^{-1}\left(\frac{x}{2}\right) + \frac{9}{5} \cdot \frac{1}{3} \tan^{-1}\left(\frac{x}{3}\right).
\]
Simplify:
\[
\int \frac{x^2}{(x^2 + 4)(x^2 + 9)} \, dx = -\frac{2}{5} \tan^{-1}\left(\frac{x}{2}\right) + \frac{3}{5} \tan^{-1}\left(\frac{x}{3}\right) + C,
\]
where \(C\) is the constant of integration.
Final Answer:
\[
\int \frac{x^2}{(x^2 + 4)(x^2 + 9)} \, dx = -\frac{2}{5} \tan^{-1}\left(\frac{x}{2}\right) + \frac{3}{5} \tan^{-1}\left(\frac{x}{3}\right) + C.
\]