Find the indefinite integral: $\int { {\sqrt{x+1}} \over {\sqrt{x+2} - \sqrt{x-2}} }dx$ Find the indefinite integral:
$$\int { {\sqrt{x+1}} \over {\sqrt{x+2} - \sqrt{x-2}} }dx$$
I don't know how to start, multiplying by ${ {\sqrt{x+2} + \sqrt{x-2}} \over {\sqrt{x+2} + \sqrt{x-2}} }$ hasn't helped neither...
 A: Notice, $$\int\frac{\sqrt{x+1}}{\sqrt{x+2}-\sqrt{x-2}} \ dx$$
$$=\int\frac{\sqrt{x+1}(\sqrt{x+2}+\sqrt{x-2})}{(\sqrt{x+2}+\sqrt{x-2})(\sqrt{x+2}-\sqrt{x-2})} \ dx$$
$$=\int\frac{\sqrt{x^2+3x+2}+\sqrt{x^2-x-2}}{x+2-(x-2)} \ dx$$
$$=\int\frac{\sqrt{\left(x+\frac{3}{2}\right)^2-\frac{1}{4}}+\sqrt{\left(x-\frac{1}{2}\right)^2-\frac{9}{4}}}{4} \ dx$$
$$=\frac{1}{4}\int\sqrt{\left(x+\frac{3}{2}\right)^2-\left(\frac{1}{2}\right)^2} \ dx+\frac{1}{4}\int\sqrt{\left(x-\frac{1}{2}\right)^2-\left(\frac{3}{2}\right)^2} \ dx$$
Now, you can use standard formula $\int\sqrt{x^2-a^2}\ dx=\frac{1}{2}\left(x\sqrt{x^2-a^2}-a^2\ln\left|x+\sqrt{x^2-a^2}\right|\right)$

Proof:
  let $$I=\int \sqrt{x^2-a^2}\ dx=\int \underbrace{\sqrt{x^2-a^2}}_{I}\cdot \underbrace{1}_{II}\ dx$$ using integration by parts $$I=x\sqrt{x^2-a^2}-\int \frac{2x}{2\sqrt{x^2-a^2}}x\ dx$$
  $$I=x\sqrt{x^2-a^2}-\int \frac{(x^2-a^2)+a^2}{\sqrt{x^2-a^2}}\ dx$$
  $$I=x\sqrt{x^2-a^2}-\int \sqrt{x^2-a^2}\ dx-a^2\int \frac{1}{\sqrt{x^2-a^2}}\ dx$$
  $$I=x\sqrt{x^2-a^2}-I-a^2\int \frac{1}{\sqrt{x^2-a^2}}\ dx$$$$\implies I=\frac{1}{2}\left(x\sqrt{x^2-a^2}-a^2\int \frac{1}{\sqrt{x^2-a^2}}\ dx\right)\tag 1$$
  Now, let $x=a\sec\theta\implies dx=a\sec\theta\tan \theta\ d\theta$ hence, 
  $$\color{red}{\int \frac{1}{\sqrt{x^2-a^2}}\ dx}=\int\frac{a\sec\theta\tan\theta\ d\theta}{\sqrt{a^2\sec^2\theta-a^2}}=\int\frac{a\sec\theta\tan\theta\ d\theta}{a\tan\theta}=\int \sec\theta\ d\theta$$$$=\ln\left|\sec\theta+\tan\theta\right|+c=\ln\left|\sec\theta+\sqrt{\sec^2\theta-1}\right|+c=\ln\left|\frac{x}{a}+\sqrt{\left(\frac{x}{a}\right)^2-1}\right|+c$$ $$=\ln\left|x+\sqrt{x^2-a^2}\right|+\ln|a|+c=\color{red}{\ln\left|x+\sqrt{x^2-a^2}\right|+c_1}$$
  now, setting the value of integral: $\int\frac{1}{\sqrt{x^2-a^2}}\ dx$ in (1), we get $$I=\frac{1}{2}\left(x\sqrt{x^2-a^2}-a^2\ln\left|x+\sqrt{x^2-a^2}\right|\right)+C$$
  hence, we get
  $$\bbox[5pt, border:2.5pt solid #FF0000]{\color{blue}{\int\sqrt{x^2-a^2}\ dx=\frac{1}{2}\left(x\sqrt{x^2-a^2}-a^2\ln\left|x+\sqrt{x^2-a^2}\right|\right)+C}}$$

