# Evaluate $\int\frac{\sqrt{x^2+2x-3}}{x+1}d\,x$ by trig substitution

I am preparing for an exam and found this integral in a previous test. Did I do it correctly?

My attempt.

$$\int\frac{\sqrt{x^2+2x-3}}{x+1}\,dx$$ Complete the square of $x^2+2x-3$; I changed the integral to $$\int\frac{\sqrt{(x-1)^2-4}}{x+1}\,dx$$ then set $u=x+1$ to get $$\int\frac{\sqrt{u^2-4}}{u}\,dx$$ Using the triangle, $2\sec\theta=u$ and $du=2\sec\theta\tan\theta d\theta$ $$\int\frac{\sqrt{(2\sec\theta)^2-2^2}}{2\sec\theta}2\sec\theta \tan\theta\, d\theta$$ This I simplified to $$2\int\tan^2\theta\, d\theta = 2\int\sec^2\theta-1\,d\theta =2[\tan\theta-\theta]+C$$

Back substitute $$\theta=\tan^{-1}\frac{\sqrt{u^2-4}}{2}$$ and $$\tan\theta=\frac{\sqrt{u^2-4}}{2}$$ Back substitute $u=x+1$ $$\int\frac{\sqrt{x^2+2x-3}}{x+1}\,dx= \sqrt{(x-1)^2-4}-\tan^{-1}{\sqrt{(x-1)^2-4}}+C$$

• If you just need a verification. You can use wolfram alpha – MrYouMath May 13 '16 at 12:28
• if the sign of $2x$ is right, you your mistaken has started in first line. – Guilherme Thompson May 13 '16 at 12:34
• In the third step when u take u=x+1 , Why did u put u in place of (x-1)^2 as u^2?You have written (x-1)^2 instead of (x+1)^2 – Murtuza Vadharia May 13 '16 at 12:34

I changed the integral to $$\int\frac{\sqrt{(x-1)^2-4}}{x+1}dx$$ then $$u=x+1$$

It should be $$\int\frac{\sqrt{(x\color{red}{+}1)^2-4}}{x+1}dx$$

I simplified to $$2\int tan^2\theta d\theta$$ = $$2\int\sec^2\theta-1d\theta$$ $$=2[tan\theta-\theta]+C$$

back substitute $$\theta=tan^{-1}\frac{\sqrt{u^2-4}}{2}$$and $$tan\theta=\frac{\sqrt{u^2-4}}{2}$$ back substitute $$u=x+1$$

I think you did nothing wrong here.

$$\int\frac{\sqrt{x^2+2x-3}}{x+1}dx={\sqrt{(x-1)^2-4}}-tan^{-1}{\sqrt{(x-1)^2-4}}+C$$

This is not correct :
$$\int\frac{\sqrt{x^2+2x-3}}{x+1}dx={\sqrt{(x\color{red}{+}1)^2-4}}-\color{red}{2}\tan^{-1}\frac{\sqrt{(x\color{red}{+}1)^2-4}}{\color{red}{2}}+C$$

• than you @mathlove – Gobabis May 13 '16 at 12:44

You've made a mistake. I hope you can find it using my answer

$$\int\frac{\sqrt{x^2+2x-3}}{x+1}\space\text{d}x=\int\frac{\sqrt{(x+1)^2-4}}{x+1}\space\text{d}x=$$

Substitute $u=x+1$ and $\text{d}u=\text{d}x$:

$$\int\frac{\sqrt{u^2-4}}{u}\space\text{d}u=$$

Substitute $u=2\sec(s)$ and $\text{d}u=2\tan(s)\sec(s)\space\text{d}s$.

We get that $\sqrt{u^2-4}=\sqrt{4\sec^2(s)-4}=2\tan(s)$ and $s=\text{arcsec}\left(\frac{u}{2}\right)$:

$$2\int\tan^2(s)\space\text{d}s=2\int\left[\sec^2(s)-1\right]\space\text{d}s=2\left[\int\sec^2(s)\space\text{d}s-\int1\space\text{d}s\right]$$

Notice now, the integral of $\sec^2(s)$ is equal to $\tan(s)$ and the integral of $1$ is just $s$.