Evaluate the following integrals:
$\int \frac{3 x+1}{\sqrt{5-2 x-x^{2}}} d x$
Given $I=\int \frac{3 x+1}{\sqrt{-x^{2}-2 x+5}} d x$
Integral is of form $\int \frac{p x+q}{\sqrt{a x^{2}+b x+c}} d x$
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 3 x+1=\lambda(-2 x-2)+\mu$
$\therefore \lambda=-3 / 2$ and $\mu=-2$
Let $3 x+1=-(3 / 2)(-2 x-2)-2$
$\Rightarrow \int \frac{3 x+1}{\sqrt{-x^{2}-2 x+5}} d x=\int\left(\frac{-3(-2 x-2)}{2 \sqrt{-x^{2}-2 x+5}}-\frac{2}{\sqrt{-x^{2}-2 x+5}}\right) d x$
$=3 \int \frac{x+1}{\sqrt{-x^{2}-2 x+5}} d x-2 \int \frac{1}{\sqrt{-x^{2}-2 x+5}} d x$
Consider $\int \frac{x+1}{\sqrt{-x^{2}-2 x+5}} d x$
Let $u=-x^{2}-2 x+5 \rightarrow d x=\frac{1}{-2 x-2} d u$
$\Rightarrow \int \frac{\mathrm{x}+1}{\sqrt{-\mathrm{x}^{2}-2 \mathrm{x}+5}} \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{x^{\mathrm{n}+1}}{\mathrm{n}+1}+\mathrm{c}$
$\Rightarrow-\frac{1}{2} \int \frac{1}{\sqrt{u}} d u=-(\sqrt{u})$
$=-\sqrt{-x^{2}-2 x+5}$
Consider $\int \frac{1}{\sqrt{-\mathrm{x}^{2}-2 \mathrm{x}+5}} \mathrm{dx}$
$\Rightarrow \int \frac{1}{\sqrt{-x^{2}-2 x+5}} d x=\int \frac{1}{\sqrt{6-(x+1)^{2}}} d x$
Let $u=\frac{x+1}{\sqrt{6}} \rightarrow d x=\sqrt{6} d u$
$\Rightarrow \int \frac{1}{\sqrt{6-(x+1)^{2}}} \mathrm{dx}=\int \frac{\sqrt{6}}{\sqrt{6-6 u^{2}}} \mathrm{du}$
$=\int \frac{1}{\sqrt{1-u^{2}}} \mathrm{du}$
We know that $\int \frac{1}{\sqrt{1-x^{2}}} d x=\sin ^{-1}(x)+c$
$\Rightarrow \int \frac{1}{\sqrt{1-u^{2}}} d u=\sin ^{-1}\left(\frac{x+1}{\sqrt{6}}\right)$
Then,
$\Rightarrow \int \frac{3 x+1}{\sqrt{-x^{2}-2 x+5}} d x=3 \int \frac{x+1}{\sqrt{-x^{2}-2 x+5}} d x-2 \int \frac{1}{\sqrt{-x^{2}-2 x+5}} d x$
$=-3 \sqrt{-x^{2}-2 x+5}-2\left(\sin ^{-1}\left(\frac{x+1}{\sqrt{6}}\right)\right)+c$
$\therefore I=\int \frac{3 x+1}{\sqrt{-x^{2}-2 x+5}} d x=-3 \sqrt{-x^{2}-2 x+5}-2 \sin ^{-1}\left(\frac{x+1}{\sqrt{6}}\right)+c$