#### Need solution for RD Sharma maths class 12 chapter Indefinite Integrals exercise 18.16 question 3

$tan^{-1}(sin\: x+2)+C$

Hint:

Use substitution method as well as special integration formula to solve this type of problem

Given:

$\int \frac{\cos x}{\sin ^{2} x+4 \sin x+5} d x$

Solution:

$Let\: \: I=\int \frac{\cos x}{\sin ^{2} x+4 \sin x+5} d x$

$Put\: \: sin\: x=t\Rightarrow cos\: x\: dx=dt$

$Then\: \: I=\int \frac{1}{t ^{2}+4 t+5} d x$

\begin{aligned} &=\int \frac{1}{t^{2}+2 \cdot 2 \cdot t+2^{2}-2^{2}+5} d t \\ &=\int \frac{1}{(t+2)^{2}-4+5} d t \\ &=\int \frac{1}{(t+2)^{2}+1} d t \end{aligned}

$Put\: \: t+2=u\Rightarrow dt=du$

$Then\: \: I=\int \frac{1}{u ^{2}+1} d u$

$\begin{array}{ll} =\tan ^{-1}\left(\frac{u}{1}\right)+C \quad & {\left[\because \int \frac{1}{a^{2}+x^{2}} d x=\frac{1}{a} \tan ^{-1}\left(\frac{x}{a}\right)+C\right]} \\ \\=\tan ^{-1}\left(\frac{t+2}{1}\right)+C \quad & {[\because u=t+2]} \\ \\=\tan ^{-1}(\sin x+2)+C & {[\because t=\sin x]} \end{array}$