I am trying to compute the integral $$\int\frac{x^2-1}{x^4-4x^2-1} dx.$$
I tried to use partial fractions technique but I got $3$ difficult terms which I don't know how to compute them.
ATTEMPT: wolfram gives this partial fractions but even then how can i integrate them? btw i didn't get them without wolfram. it was too diffcult for me.
https://www.wolframalpha.com/input/?i=%28x%5E2-1%29%2F%28x%5E4-4x%5E2-1%29+partial+fractions
You can simplify the solution by considering partial fractions expansion $$\frac{t-1}{t^2-4t-1}=\frac{a}{t+(\sqrt5-2)}+\frac{b}{t-(\sqrt5+2)},$$ where $$a=\frac{5-\sqrt5}{10},\quad b=\frac{5+\sqrt5}{10}.$$ Then your integral is $$I=a\int\frac{dx}{x^2+(\sqrt5-2)}+b\int\frac{dx}{x^2-(\sqrt5+2)}=$$ $$\frac{a}{\sqrt{\sqrt5-2}}\arctan\frac{x}{\sqrt{\sqrt5-2}}+\frac{b}{2\sqrt{\sqrt5+2}}\log\left|\frac{x-\sqrt{\sqrt5+2}}{x+\sqrt{\sqrt5+2}}\right|+C.$$