<s>[INST] Compute $I=\int(x+3)\sqrt\frac{x+2}{x-2}\mathrm dx$ 
Compute $$I=\int(x+3)\sqrt\frac{x+2}{x-2}\mathrm dx$$

The way I approach this problem was to:


*

*Set $u=\sqrt{x-2}$ and arrive at $$I=2\int\frac{u^2(u^2+1)}{\sqrt{u^2-4}}\mathrm du$$

*Set $u=2\sec t\implies\mathrm du=2\sec t\tan t\mathrm dt$ to get $I=8\int\sec^3(t)(4\sec^2(t)+1)\mathrm dt$


Now this integral involves $\sec^5t$ and $\sec^3t$ which does not make me very happy. I think there should be a simpler method. Can anyone show me simpler steps? (the first few steps/substitutions would suffice)
 [/INST] When you end up with $\int\sec\theta\,d\theta$ it often means that you would have been better off making a $\cosh\theta$ substitution instead. Here we are going to use $x=2\cosh\theta$ so $\sqrt{x^2-4}=2\sinh\theta$ and $dx=2\sinh\theta\,d\theta$
$$\begin{align}\int(x+3)\sqrt{\frac{x+2}{x-2}}dx&=\int\frac{(x+3)(x+2)}{\sqrt{x^2-4}}dx\\
&=\int\frac{(2\cosh\theta+3)(2\cosh\theta+2)}{2\sinh\theta}2\sinh\theta\,d\theta\\
&=\int\left(4\cosh^2\theta+10\cosh\theta+6\right)d\theta\\
&=\int(2\cosh2\theta+10\cosh\theta+8)d\theta\\
&=\sinh2\theta+10\sinh\theta+8\theta+C_1\\
&=2\sinh\theta\cosh\theta+10\sinh\theta+8\theta+C_1\\
&=2\frac{\sqrt{x^4-4}}2\frac x2+10\frac{\sqrt{x^2-4}}2+8\cosh^{-1}\left(\frac x2\right)+C_1\\
&=\left(\frac12x+5\right)\sqrt{x^2-4}+8\ln\left(\frac x2+\sqrt{\frac{x^2}4-1}\right)+C_1\\
&=\left(\frac12x+5\right)\sqrt{x^2-4}+8\ln\left(x+\sqrt{x^2-4}\right)+C\end{align}$$
Where $C=C_1-\ln2$. Differentiation verifies this result.  

Given that the OP doesn't know about the hyperbolic functions:
$$\begin{align}\cosh x&=\frac{e^x+e^{-x}}2\\
\sinh x&=\frac{e^x-e^{-x}}2\end{align}$$
So
$$\begin{align}\cosh^2x-\sinh^2x&=\frac{e^{2x}+2+e^{-2x}}4-\frac{e^{2x}-2+e^{-2x}}4=1\\
\cosh^2x+\sinh^2x&=\frac{e^{2x}+2+e^{-2x}}4+\frac{e^{2x}-2+e^{-2x}}4=\frac{e^{2x}+e^{-2x}}2=\cosh2x\end{align}$$
On addition of the last $2$ formulas we have
$$2\cosh^2x=\cosh2x+1$$
And finally there is
$$\begin{align}\frac d{dx}\cosh x&=\frac d{dx}\frac{e^x+e^{-x}}2=\frac{e^x-e^{-x}}2=\sinh x\\
\frac d{dx}\sinh x&=\frac d{dx}\frac{e^x-e^{-x}}2=\frac{e^x+e^{-x}}2=\cosh x\end{align}$$
Oh, there is one more thing: if $y=\cosh^{-1}x$ then
$$x=\cosh y=\frac{e^y+e^{-y}}2$$
So
$$e^{2y}-2xe^y+1=0$$
Solving for $y$,
$$y=\cosh^{-1}x=\ln\left(x+\sqrt{x^2-1}\right)$$
Now you know!
</s>