We are asked to solve the integral:
\[
I = \int \frac{2x}{(x^2 + 1)(x^2 - 4)} \, dx.
\]
Step 1: Substitute \( x^2 = t \) and simplify the differential.
Let us substitute \( x^2 = t \). Then, we have \( 2x \, dx = dt \), or equivalently \( x \, dx = \frac{1}{2} dt \).
Now, substitute into the integral:
\[
I = \int \frac{1}{(t + 1)(t - 4)} \cdot \frac{dt}{5}.
\]
Step 2: Simplify the expression and split the integrals.
We can now express the integral as:
\[
I = \frac{1}{5} \int \left( \frac{1}{t - 4} - \frac{1}{t + 1} \right) dt.
\]
Step 3: Integrate each term.
The integral of \( \frac{1}{t - 4} \) is \( \ln |t - 4| \) and the integral of \( \frac{1}{t + 1} \) is \( \ln |t + 1| \), so we have:
\[
I = \frac{1}{5} \left( \ln |t - 4| - \ln |t + 1| \right) + c.
\]
Step 4: Substitute back \( t = x^2 \) into the result.
Substitute \( t = x^2 \) into the expression:
\[
I = \frac{1}{5} \left( \ln |x^2 - 4| - \ln |x^2 + 1| \right) + c.
\]
We can rewrite the result as:
\[
I = \frac{1}{5} \ln \left| \frac{x^2 - 4}{x^2 + 1} \right| + c.
\]
Thus, the solution to the integral is:
\[
I = \frac{1}{5} \log \left| \frac{x^2 - 4}{x^2 + 1} \right| + c.
\]
Step 5: Alternative form of the answer.
Alternatively, we can also write:
\[
I = \frac{1}{5} \ln |x^2 + 1| + c.
\]