# Get Answers to all your Questions

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

$-2 \log |x+1|-\frac{1}{x+1}+3 \log |x+2|+C$

Hint:

To solve this integration, we use partial fraction method

Given:

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

Explanation:

Let

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

For $x=-1$ equation (1) becomes

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

For $x=-2$ equation (1) becomes

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

For $x=0$ equation (1) becomes

\begin{aligned} &0+0+1=A(2)+B(2)+C \\ &1=2 A+2+3 \end{aligned}                        [As$B=1,C= 3$]

\begin{aligned} &1=2 A+2+3 \\ &1=2 A+5 \\ &2 A=-4 \\ &A=-2 \\ &\therefore \frac{x^{2}+x+1}{(x+1)^{2}(x+2)}=\frac{-2}{x+1}+\frac{1}{(x+1)^{2}}+\frac{3}{x+2} \end{aligned}

Thus
\begin{aligned} &I=-2 \int \frac{d x}{x+1}+\int \frac{d x}{(x+1)^{2}}+3 \int \frac{d x}{x+2} \\ &I=-2 \log |x+1|-\frac{1}{x+1}+3 \log |x+2|+C \end{aligned}