Prove that $\int\frac{3x^2+1}{(x^2-1)^3}dx=\frac{-x}{(x^2-1)^2}+c$ Prove that $\int\frac{3x^2+1}{(x^2-1)^3}dx=\frac{-x}{(x^2-1)^2}+c$

My Try:
$\int\frac{3x^2+1}{(x^2-1)^3}dx$
Put $x=\sec\theta$
$\int\frac{3\sec^2\theta+1}{\tan^6\theta}\sec\theta\tan\theta d\theta$
Converting to $\sin$ and $\cos$ we get
$=\int\frac{(3+\cos^2\theta)\cos^2\theta}{\sin^5\theta}d\theta$
I could not solve it further.
 A: Take the partial fractions of the integrand which are $\frac{1}{2(x-1)^3} -\frac{1}{2(x+1)^3}$ which can be easily integrate using substitution.
A: HINT:
$$
\frac{3x^2+1}{(x^2-1)^3}=
\frac{3(x^2-1)+4}{(x^2-1)^3}=
\frac{3}{(x^2-1)^2}+\frac{4}{(x^2-1)^3}
$$
then write $(x^2-1)=(x+1)(x-1)$ and try to split the fractions.
A: Let $$I = \int\frac{3x^2+1}{(x^2-1)^3}dx = \int\frac{3x^2+1}{x^{\frac{3}{2}}\left(x^{\frac{3}{2}}-x^{-\frac{1}{2}}\right)^3}dx$$
So $$I = \int\frac{3x^{\frac{1}{2}}+x^{-\frac{3}{2}}}{\left(x^{\frac{3}{2}}-x^{-\frac{1}{2}}\right)^3}dx\;,$$ Now Put $\left(x^{\frac{3}{2}}-x^{-\frac{1}{2}}\right)=t\;,$ Then $\left(3x^{\frac{1}{2}}+x^{-\frac{3}{2}}\right)dx = 2dt$
So we get $$I = 2\int t^{-3}dt = -\frac{1}{t^2}+\mathcal{C} = -\frac{x}{(x^2-1)^2}+\mathcal{C}$$
A: $$I = \int\frac{3x^2+1}{(x^2-1)^3}dx = \int\frac{3x^2+1}{(x-1)^3\cdot (x+1)^3}dx = \frac{1}{2}\int \left[\frac{1}{(x-1)^3}-\frac{1}{(x+1)^3}\right]dx$$
So we get $$I = \frac{1}{2}\left[-\frac{1}{2(x-1)^2}+\frac{1}{2(x+1)^2}\right]+\mathcal{C} = -\frac{1}{4}\cdot\frac{4x}{(x^2-1)^2}+\mathcal{C}$$
A: $\dfrac{d\left(\dfrac{ax+b}{(x^2-1)^n}\right)}{dx}=-\dfrac a{(x^2-1)^n}-\dfrac{2a}{(x^2-1)^{n+1}}-b\cdot\dfrac{2x}{(x^2-1)^{n+1}}$
Integrating both sides wrt $x,$
$$-\dfrac{ax+b}{(x^2-1)^n}=a\int\dfrac{dx}{(x^2-1)^n}+2a\int\dfrac{dx}{(x^2-1)^{n+1}}+b\int\dfrac{2x\ dx}{(x^2-1)^{n+1}}$$
$$\implies2a\int\dfrac{dx}{(x^2-1)^{n+1}}=-\dfrac{ax+b}{(x^2-1)^n}-2a\int\dfrac{dx}{(x^2-1)^{n+1}}+\dfrac b{n(x^2-1)^n}\  \ \  \ (1)$$
Now $\displaystyle\int\dfrac{3x^2+1}{(x^2-1)^3}dx=\int\dfrac{3(x^2-1)+4}{(x^2-1)^3}dx=3\int\dfrac{dx}{(x^2-1)^2}+4\int\dfrac{dx}{(x^2-1)^3}$
Set $n=1,2$ in $(1)$
A: Another way is, simply, to take the derivative of $$\frac{-x}{(x^2-1)^2}+c$$ and verify that this derivative is no other that $$\frac{3x^2+1}{(x^2-1)^3}$$.
