Evaluate the following integral:
$\int \frac{x^{2}}{\left(x^{2}+1\right)\left(3 x^{2}+4\right)} d x$
$I=\int \frac{x^{2}}{\left(x^{2}+1\right)\left(3 x^{2}+4\right)} d x$
$\frac{x^{2}}{\left(x^{2}+1\right)\left(3 x^{2}+4\right)}=\frac{A x+B}{x^{2}+1}+\frac{C x+D}{3 x^{2}+4}$
$x^{2}=(A x+B)\left(3 x^{2}+4\right)+(C x+D)\left(x^{2}+1\right)$
$=(3 A+C) x^{3}+(3 B+D) x^{2}+(4 A+C) x+4 B+D$
Equating similar terms
$3 A+C=0$
$3 B+D=1$
$4 A+C=0$
$4 B+D=0$
Solving we get,
$A=0, B=-1, C=0, D=4$
Thus,
$I=\int \frac{-d x}{x^{2}+1}-\int \frac{4 d x}{3 x^{2}+4}$
$I=-\tan ^{-1} x+\frac{4}{3} \int \frac{d x}{x^{2}+\left(\frac{2}{\sqrt{3}}\right)^{2}}$
$I=-\tan ^{-1} x+\frac{4}{3} \cdot \frac{\sqrt{3}}{2} \tan ^{-1} \frac{\sqrt{3} x}{2}+C$
$I=\frac{2}{\sqrt{3}} \tan ^{-1} \frac{\sqrt{3} x}{2}-\tan ^{-1} x+C$