# Evaluate the following integrals:

Question:

Evaluate the following integrals:

$\int \frac{x+2}{\sqrt{x^{2}+2 x-1}} d x$

Solution:

Given $I=\int \frac{x+2}{\sqrt{x^{2}+2 x-1}} d x$

Integral is of form $\int \frac{\mathrm{px}+\mathrm{q}}{\sqrt{\mathrm{ax}^{2}+\mathrm{bx}+\mathrm{c}}} \mathrm{dx}$

Writing numerator as $\mathrm{px}+\mathrm{q}=\lambda\left\{\frac{\mathrm{d}}{\mathrm{dx}}\left(\mathrm{ax}^{2}+\mathrm{bx}+\mathrm{c}\right)\right\}+\mu$

$\Rightarrow p x+q=\lambda(2 a x+b)+\mu$

$\Rightarrow x+2=\lambda(2 x+2)+\mu$

$\therefore \lambda=1 / 2$ and $\mu=1$

Let $x+2=1 / 2(2 x+2)+1$ and split,

$\Rightarrow \int \frac{\mathrm{x}+2}{\sqrt{\mathrm{x}^{2}+2 \mathrm{x}-1}} \mathrm{dx}=\int\left(\frac{2 \mathrm{x}+2}{2 \sqrt{\mathrm{x}^{2}+2 \mathrm{x}-1}}+\frac{1}{\sqrt{\mathrm{x}^{2}+2 \mathrm{x}-1}}\right) \mathrm{dx}$

$=\int \frac{x+1}{\sqrt{x^{2}+2 x-1}} d x+\int \frac{1}{\sqrt{x^{2}+2 x-1}} d x$

Consider $\int \frac{x+1}{\sqrt{x^{2}+2 x-1}} d x$

Let $u=x^{2}+2 x-1 \rightarrow d x=\frac{1}{2 x+2} d u$

$\Rightarrow \int \frac{\mathrm{x}+1}{\sqrt{\mathrm{x}^{2}+2 \mathrm{x}-1}} \mathrm{dx}=\int \frac{1}{2 \sqrt{\mathrm{u}}} \mathrm{du}$

$=\frac{1}{2} \int \frac{1}{\sqrt{\mathrm{u}}} \mathrm{du}$

We know that $\int \mathrm{x}^{\mathrm{n}} \mathrm{dx}=\frac{\mathrm{x}^{\mathrm{n}+1}}{\mathrm{n}+1}+\mathrm{c}$

$\Rightarrow \frac{1}{2} \int \frac{1}{\sqrt{\mathrm{u}}} \mathrm{du}=\frac{1}{2}(2 \sqrt{\mathrm{u}})$

$=\sqrt{\mathrm{u}}=\sqrt{\mathrm{x}^{2}+2 \mathrm{x}-1}$

Consider $\int \frac{1}{\sqrt{x^{2}+2 x-1}} d x$

$\Rightarrow \int \frac{1}{\sqrt{x^{2}+2 x-1}} d x=\int \frac{1}{\sqrt{(x+1)^{2}-2}} d x$

Let $u=\frac{x+1}{\sqrt{2}} \rightarrow d x=\sqrt{2} d u$

$\Rightarrow \int \frac{1}{\sqrt{(\mathrm{x}+1)^{2}-2}} \mathrm{dx}=\int \frac{\sqrt{2}}{\sqrt{2 \mathrm{u}^{2}-2}} \mathrm{du}$

$=\int \frac{1}{\sqrt{\mathrm{u}^{2}-1}} \mathrm{du}$

We know that $\int \frac{1}{\sqrt{x^{2}-1}} d x=\log \left(\sqrt{x^{2}-1}+x\right)+c$

$\Rightarrow \int \frac{1}{\sqrt{u^{2}-1}} d u=\log \left(\sqrt{u^{2}-1}+u\right)$

$=\log \left(\sqrt{\frac{(x+1)^{2}}{2}-1}+\frac{x+1}{\sqrt{2}}\right)$

Then,

$\Rightarrow \int \frac{x+2}{\sqrt{x^{2}+2 x-1}} d x=\int \frac{x+1}{\sqrt{x^{2}+2 x-1}} d x+\int \frac{1}{\sqrt{x^{2}+2 x-1}} d x$

$=\sqrt{x^{2}+2 x-1}+\log \left(\sqrt{\frac{(x+1)^{2}}{2}-1}+\frac{x+1}{\sqrt{2}}\right)+c$

$=\sqrt{x^{2}+2 x-1}+\log \left(\sqrt{(x+1)^{2}-2}+x+1\right)+c$

$\therefore I=\int \frac{2 x+1}{\sqrt{x^{2}+2 x-1}} d x=\sqrt{x^{2}+2 x-1}+\log \left(\sqrt{(x+1)^{2}-2}+x+1\right)+c$