#### explain solution RD Sharma class 12 Chapter 18 Indefinite Integrals exercise 18.30 question 36

$\frac{-1}{2} \log \left|x^{2}+1\right|+2 \tan ^{-1} x+\log |x+2|+C$

Hint:

To solve this integration, we use partial fraction method

Given:

$\int \frac{5}{\left(x^{2}+1\right)(x+2)} d x \\$

Explanation:

Let

\begin{aligned} &I=\int \frac{5}{\left(x^{2}+1\right)(x+2)} d x \\ &\frac{5}{\left(x^{2}+1\right)(x+2)}=\frac{A x+B}{x^{2}+1}+\frac{C}{x+2} \\ &5=(A x+B)(x+2)+C\left(x^{2}+1\right) \\ &5=x^{2}(A+C)+x(2 A+B)+(2 B+C) \end{aligned}

Equating the similar terms

\begin{aligned} &A+C=0 \\ &A=-C \end{aligned}                       (1)

\begin{aligned} &2 A+B=0 \\ &B=-2 A \\ &2 B+C=5 \\ &-4 A-A=5 \end{aligned}                     [From equation (1) and equation (2)]

\begin{aligned} &-5 A=5 \\ &A=-1 \end{aligned}

Equation (2)

$B=2$

Equation (1)

\begin{aligned} &C=1 \\ &\frac{5}{\left(x^{2}+1\right)(x+2)}=\frac{-x+2}{x^{2}+1}+\frac{1}{x+2} \\ &I=\int \frac{2-x}{x^{2}+1} d x+\int \frac{1}{x+2} d x \\ &I=2 \int \frac{1}{x^{2}+1} d x-\frac{1}{2} \int \frac{2 x d x}{x^{2}+1}+\int \frac{1}{x+2} d x \\ &I=2 \tan ^{-1} x-\frac{1}{2} \log \left|x^{2}+1\right|+\log |x+2|+C \end{aligned}