Given the integrand: $f(x) = \frac{(x^{2}+1)(x^{2}+2)}{(x^{2}+3)(x^{2}+4)}$
First,expand the numerator and denominator: $f(x) = \frac{x^{4}+3x^{2}+2}{x^{4}+7x^{2}+12}$
Perform polynomial division: $f(x) = 1 - \frac{4x^{2}+10}{(x^{2}+3)(x^{2}+4)}$
Using partial fractions for the second term: $\frac{4x^{2}+10}{(x^{2}+3)(x^{2}+4)} = \frac{A}{x^{2}+3} + \frac{B}{x^{2}+4}$
Let $y = x^{2}$. Then $\frac{4y+10}{(y+3)(y+4)} = \frac{A}{y+3} + \frac{B}{y+4}$
$4y+10 = A(y+4) + B(y+3)$
For $y = -3$: $4(-3)+10 = A(-3+4) \Rightarrow -2 = A$
For $y = -4$: $4(-4)+10 = B(-4+3) \Rightarrow -6 = -B \Rightarrow B = 6$
Thus,$\frac{4x^{2}+10}{(x^{2}+3)(x^{2}+4)} = \frac{-2}{x^{2}+3} + \frac{6}{x^{2}+4}$
Substituting back: $f(x) = 1 - (\frac{-2}{x^{2}+3} + \frac{6}{x^{2}+4}) = 1 + \frac{2}{x^{2}+3} - \frac{6}{x^{2}+4}$
Integrating: $\int f(x) dx = \int (1 + \frac{2}{x^{2}+(\sqrt{3})^{2}} - \frac{6}{x^{2}+2^{2}}) dx$
$= x + 2(\frac{1}{\sqrt{3}} \tan^{-1} \frac{x}{\sqrt{3}}) - 6(\frac{1}{2} \tan^{-1} \frac{x}{2}) + C$
$= x + \frac{2}{\sqrt{3}} \tan^{-1} \frac{x}{\sqrt{3}} - 3 \tan^{-1} \frac{x}{2} + C$