Evaluate the following integral:
$\int \frac{\left(x^{2}+1\right)\left(x^{2}+4\right)}{\left(x^{2}+3\right)\left(x^{2}-5\right)} d x$
$\frac{\left(x^{2}+1\right)\left(x^{2}+4\right)}{\left(x^{2}+3\right)\left(x^{2}-5\right)}=\frac{x^{4}+5 x^{2}+4}{x^{4}-2 x^{2}-15}$
$=\frac{\left(x^{4}-2 x^{2}-15\right)+7 x^{2}+19}{x^{4}-2 x^{2}-15}$
$=1+\frac{7 x^{2}+19}{x^{4}-2 x^{2}-15}$
Now, $\frac{7 x^{2}+19}{x^{4}-2 x^{2}-15}=\frac{7 x^{2}+19}{\left(x^{2}+3\right)\left(x^{2}-5\right)}$
Let, $\frac{7 x^{2}+19}{x^{4}-2 x^{2}-15}=\frac{A x+B}{x^{2}+3}+\frac{C X+D}{x^{2}-5}$
$\Rightarrow 7 x^{2}+19=(A x+B)\left(x^{2}-5\right)+(C x+D)\left(x^{2}+3\right)$
For, $x=0,19=-5 B+3 D \ldots$ (i)
For, $x=1,26=-4 A-4 B+4 C+4 D \ldots$ (ii)
For, $x=-1,14=4 A-4 B-4 C+4 D \ldots$ (iii)
Also, by comparing coefficient of $x^{3}$ we get, $0=A+C$ (iv)c
On solving, (i), (ii), (iii), (iv) we get,
$A=0, B=-\frac{11}{8}, C=0, D=\frac{69}{8}$
So, $\frac{\left(x^{2}+1\right)\left(x^{2}+4\right)}{\left(x^{2}+3\right)\left(x^{2}-5\right)}=1-\frac{11}{8} \frac{1}{x^{2}+3}+\frac{69}{8} \frac{1}{x^{2}-5}$
$\therefore \int \frac{\left(\mathrm{x}^{2}+1\right)\left(\mathrm{x}^{2}+4\right)}{\left(\mathrm{x}^{2}+3\right)\left(\mathrm{x}^{2}-5\right)} \mathrm{dx}=\int\left(1-\frac{11}{8} \frac{1}{\mathrm{x}^{2}+3}+\frac{69}{8} \frac{1}{\mathrm{x}^{2}-5}\right) \mathrm{dx}$
$=\mathrm{x}-\frac{11}{8 \sqrt{3}} \tan ^{-1} \mathrm{x}+\frac{69}{16 \sqrt{5}} \log \left|\frac{\mathrm{x}-\sqrt{5}}{\mathrm{x}+\sqrt{5}}\right|+\mathrm{c}$
Thus, $I=x-\frac{11}{8 \sqrt{3}} \tan ^{-1} x+\frac{69}{16 \sqrt{5}} \log \left|\frac{x-\sqrt{5}}{x+\sqrt{5}}\right|+c$