<s>[INST] How can I solve $\int \frac{1}{\sqrt{x^2 + 7x} + 3}\, dx$ How can I solve the following integral?
 $$\int \frac{1}{\sqrt{x^2 + 7x} + 3}\, dx$$
$$\begin{align}
\int \frac{1}{\sqrt{x^2 + 7x} + 3}\, dx&=\int \frac{1}{\sqrt{\left(x+\frac72\right)^2-\frac{49}{4}} + 3}\, dx
\end{align}$$
$$u = x+\frac{7}{2}, \quad a = \frac{7}{2}$$
$$\int \frac{1}{\sqrt{u^2 - a^2} +3}\, \,du$$
Attempt I - By Trigonometric substitution
$$\sqrt{u^2 - a^2} = \sqrt{a\sec^2\varTheta - a^2} = \sqrt{a^2(\sec^2\varTheta - 1)} = \sqrt{a^2\tan^2\varTheta} = a\tan\varTheta $$
$$u = a\sec\varTheta \implies du = a\sec\varTheta \tan\varTheta d\varTheta$$
 $$\int \frac{1}{a\tan\varTheta + 3}\, a\sec\varTheta \tan\varTheta d\varTheta$$
 $$a\int \frac{\sec\varTheta \tan\varTheta}{a\tan\varTheta + 3}\, d\varTheta$$
How can I continue here ?
Attempt II - By First Euler Substitution
$$\sqrt{u^2 - a^2} = u - t$$
$\sqrt{u^2 - a^2} = u - t$
$ u^2 - a^2 = (u - t)^2$
$u^2 - a^2 = u^2 -2ut + t^2$
$- a^2 = -2ut + t^2$
$2ut =  t^2 + a^2$
$$u =  \frac{t^2 + a^2}{2t} \implies du = \frac{1}{2} - \frac{a^2}{2t^2}\, dt$$
Thus the integral takes the form
$$\int \frac{1}{u - t +3}\, \left( \frac{1}{2} - \frac{a^2}{2t^2}\right) \,du$$
Since $u =  \frac{t^2 + a^2}{2t}$ and $\left( \frac{1}{2} - \frac{a^2}{2t^2}\right)  = -\frac{a^2 - t^2}{2t^2}$ then
$$I = \int \frac{1}{ \frac{t^2 + a^2}{2t}  - t +3} \left( -\frac{a^2 - t^2}{2t^2} \right) \, dt$$
$$-\int \frac{a^2 - t^2}{ ta^2 - t^3 +6t^2}\, dt$$
$$-\int \frac{a^2}{ ta^2 - t^3 +6t^2}\, dt + \int \frac{t^2}{ ta^2 - t^3 +6t^2}\, dt$$
How can I continue?
Attempt III -By First Euler Substitution
$$\sqrt{x^2 + 5x} = x + t$$
$\sqrt{x^2 + 5x} = x + t$
$ x^2 + 5x = (x + t)^2$
$x^2 + 5x = x^2 + 2ut + t^2$
$x^2 + 5x = x^2 + 2xt + t^2$
$5x = 2xt + t^2$
$5x -2xt = t^2$
$x(5 -2t) = t^2$
$$x = \frac{t^2}{(5 -2t)} \implies \frac{dt}{dx} = -\frac{2(t - 5)t}{(5 - 2t)^2 } \iff dx =  -\frac{(5 - 2t)^2 }{2(t - 5)t}\,dt $$
$$\int \frac{1}{x + t + 3}\, \left( -\frac{(5 - 2t)^2 }{2(t - 5)t}\right)dt$$ 
$$-\int \frac{1}{\frac{t^2}{(5 -2t)} + t + 3}\, \left(\frac{(5 - 2t)^2 }{2(t - 5)t}\right)dt$$ 
$$-\int\frac{(5 - 2t)^2}{\frac{2(t - 5)t^3}{5 -2t} + 2(t - 5)t^2 + 6(t - 5)t}\,dt$$
How can I continue here?
 [/INST] Setting $$\sqrt{x^2+7x}=t+x$$ then we have $$x=\frac{t^2}{7-2t}$$ and $$dx=-\frac{2 (t-7) t}{(2 t-7)^2}$$ and $$t+x=\frac{(t-7) t}{2 t-7}$$
and our integral will be $$\int -\frac{2 (t-7) t(2t-7)}{9\left(21-t+t^2\right)}dt$$
</s>