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

$\frac{2}{9} \log \left|\frac{x-1}{x+2}\right|-\frac{1}{3(x-1)}+C$

Hint:

To solve this integration, we use partial fraction method

Given:

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

Explanation:

Let

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

Equating the similar terms

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

$A+B-2C=1$            (2)

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

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

\begin{aligned} &3 B=1 \\ &B=\frac{1}{3} \end{aligned}

Equation (3)

\begin{aligned} &\frac{1}{3}+3 A=1 \\ &3 A=1-\frac{1}{3} \\ &3 A=\frac{2}{3} \\ &A=\frac{2}{9} \\ &C=\frac{-2}{9} \end{aligned}

$\frac{x}{(x-1)^{2}(x+2)}=\frac{2}{9(x-1)}+\frac{1}{3(x-1)^{2}}+\frac{-2}{9(x+2)}$

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