<s>[INST] Integrate. $\int\frac{x+1}{(x^2+7x-3)^3}dx$ How should i solve this integral? 
i know that it is the same question like here
Integrate $\int\frac{x+1}{(x^2+7x-3)^3}dx$
but I've tried solve it for more then 3 hours and i still have no idea ho to solve it. Thank for help.
$$\int\frac{x+1}{(x^2+7x-3)^3}dx$$
I tried use $$2x+7 = \frac{\sqrt{61}}{\cos u}$$
$$\int\frac{\frac{\sqrt{61}}{\cos u}-\frac72+1}
{(\frac{(\frac{\sqrt{61}}{\cos u})^2-61}{4})^3}dx$$
Now i have
$$\int \frac{61\sin u - 5\sqrt{61}\sin u \cos u}{4\cos u 
\frac{226981\tan^6u}{65}
}$$
 [/INST] HELP for the integrand $\frac{1}{(x^2-a)^3}$
Use the substitution $x = \sqrt{a}\sec(u)$ and $dx = \sqrt{a}\tan(u) \sec(u) du$ so then $(x^2 - a)^3 = (a\sec^2(u) - a)^3 = a^3\tan^6(u) du$.
Moreover you'll have to take in mind that $u = \text{arcsec}\left(\frac{x}{\sqrt{a}}\right)$
Thus you have
$$\sqrt{a}\int\frac{\cot^4(u)\csc(u)}{a^3} du = \frac{1}{a^{\frac{5}{2}}}\int\cot^4(u)\csc(u)$$
Now use the trigonometric identity
$$\csc^2(u) - \cot^2(u) = 1$$ 
and arranging the integrand you will obtain 
$$
\frac{1}{a^{\frac{5}{2}}}\int \csc^5(u)  - 2\csc^3(u) + \csc(u) du
$$
Then you can integrate term by term using the recurrence formula for the highest powers:
$$\int\csc^m(u) du = -\frac{\cos(u)\csc^{m-1}(u)}{m-1} + \frac{m-2}{m-1}\int \csc^{m-2}(u) du$$
where in your case $m = 5$ and next $m = 3$. Do the math and you will obtain:
$$
\frac{5\cot(u)\csc(u)}{8a^{5/2}} - \frac{\cot(u)\csc^3(u)}{4a^{5/2}} + \frac{3}{8a^{5/2}}\int\csc(u) du
$$
The integral of $\csc(u)$ is $-\log(\csc(u) + \csc(u))$
So you'll get in the end:
$$
\frac{5\cot(u)\csc(u)}{8a^{5/2}} - \frac{\cot(u)\csc^3(u)}{4a^{5/2}} + \frac{3}{8a^{5/2}}(-\log(\csc(u) + \csc(u))) du
$$
Now the tedious work: substitute back for $u$ to get the result in $x$: Do the math and get:
$$
-\frac{((\cot(\sec^{-1}(\frac{x}{\sqrt{a}}) \csc(\sec^{-1}(\frac{x}{\sqrt{a}}))^3)}{(4 a^{5/2}))} + \frac{(5 \cot(\sec^{-1}(\frac{x}{\sqrt{a}})) \csc(\sec^{-1}(\frac{x}{\sqrt{a}})))}{(8 a^{5/2})}  - 
\frac{3 \log(\cot(\sec^{-1}(\frac{x}{\sqrt{a}})) + \csc(\sec^{-1}(\frac{x}{\sqrt{a}}))))}{(8 a^{5/2})}
$$
Anyway, your integral is a pain.
</s>