Solve the integral $\int \frac{dx}{\left(\sqrt{x^2+1}+x\right)^2}$ $$\int \frac{dx}{\left(\sqrt{x^2+1}+x\right)^2}$$
I think I need to use replace, but not sure: 
$$x=\frac{u^2-1}{2\cdot u}$$
$$dx=\left(1-\frac{u^2-1}{2u^2}\right)$$
 A: If you replace $x$ with $\sinh t$, you are left with:
$$ \int \frac{\cosh t}{e^{2t}}\,dt = C-\frac{1}{6}\left(e^{-3t}+3e^{-t}\right),$$
hence the original integral equals $C-\frac{4+6 x \left(x+\sqrt{1+x^2}\right)}{6 \left(x+\sqrt{1+x^2}\right)^3}$.
A: Here, it might be a good idea to first simplify the integrand. We write
$$
\begin{aligned}
\frac{1}{\bigl(\sqrt{1+x^2}+x\bigr)^2}&=\frac{\bigl(\sqrt{1+x^2}-x\bigr)^2}{\bigl(\sqrt{1+x^2}+x\bigr)^2\bigl(\sqrt{1+x^2}-x\bigr)^2}\\
&=\bigl(\sqrt{1+x^2}-x\bigr)^2\\
&=1+2x^2-2x\sqrt{1+x^2}.
\end{aligned}
$$
Here, we have multiplied by the conjugate in the first step, simplified the denominator to 1 in the second step (conjugate rule twice, or squared if you want), and expanded the parenthesis in the last step. Thus,
$$
\int \frac{1}{\bigl(\sqrt{1+x^2}+x\bigr)^2}\,dx
=\int 1+2x^2-2x\sqrt{1+x^2}\,dx
=x+\frac{2}{3}x^3-\frac{2}{3}(1+x^2)^{3/2}+C.
$$
A: Here are some methods which are strictly less efficient than Jack's (probably optimal) approach, but which are naive in the sense that they only use techniques typically seen in a first course in integral calculus.
The radical expression $\sqrt{1 + x^2}$ in the integrand suggests the trigonometric substitution $$x = \tan \theta, \quad dx = \sec^2 \theta \, d\theta.$$ (In fact, the substitution Jack recommends is just the hyperbolic analogue of this one.) Applying this substitution transforms the integral to
$$\int \frac{\sec^2 \theta \,d\theta}{(\sec \theta + \tan \theta)^2}.$$ One can approach this in several ways:


*

*Writing the expression out in terms of $\sin \theta$ and $\cos \theta$ suggests multiplying both the numerator and denominator by $\cos^2 \theta$, simplifying the integral some, to
$$\int \frac{d \theta}{(1 + \sin \theta)^2}.$$ This can in turn be handled in several ways, including using the Weierstrass substitution, $\theta = 2 \arctan t,$ which transforms a rational expression in trigonometric functions into a rational expression in $t$. In this case, it's not too hard to manage the resulting rational integrand.

*Alternatively, we might recognize the quantity in parentheses from an uncommon trigonometric identity, $$\sec \theta + \tan \theta = \tan \left(\frac{\theta}{2} + \frac{\pi}{4}\right) ,$$
which is in turn a special case of the tangent angle sum identity, $$ \tan(\alpha + \beta) = \frac{\tan \alpha + \tan \beta}{1 - \tan \alpha \tan \beta}.$$ In this case, the integral becomes $$\int \cot^2 \left(\frac{\theta}{2} + \frac{\pi}{4}\right),$$ which can be handled readily with the Pythagorean identity $$1 + \cot^2 \gamma = \csc^2 \gamma$$ and the fact that $\frac{d}{d \gamma} \cot \gamma = -\csc^2 \gamma$.
