Question:
Evaluate the following integral:
$\int \frac{x^{2}-1}{x^{4}+1} d x$
Solution:
re-writing the given equation as
$\int \frac{1-\frac{1}{x^{2}}}{x^{2}-\frac{1}{x^{2}}} d x$
$\int \frac{1-\frac{1}{x^{2}}}{\left(x+\frac{1}{x}\right)^{2}-2} d x$
Assume $t=x+\frac{1}{x}$
$\mathrm{dt}=\left(1-\frac{1}{\mathrm{x}^{2}}\right) \mathrm{dx}$
$\int \frac{d t}{t^{2}-2}$
Using identity $\int \frac{\mathrm{dz}}{(\mathrm{z})^{2}-1}=\frac{1}{2} \log \left|\frac{\mathrm{z}-1}{\mathrm{z}+1}\right|+\mathrm{c}$
$\frac{1}{2 \sqrt{2}} \log \frac{t-\sqrt{2}}{t+\sqrt{2}}+c$
Substituting $t$ as $x+\frac{1}{x}$
$\frac{1}{2 \sqrt{2}} \log \frac{x+\frac{1}{x}-\sqrt{2}}{x+\frac{1}{x}+\sqrt{2}}+c$