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

$-x+2 \log |x-1|+3 \log |x+2|+C$

Hint:

To solve the given integration, we use partial fraction method

Given:

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

Explanation:

Let

$I=\int \frac{3+4 x-x^{2}}{(x+2)(x-1)} d x$

$I=\int \frac{3+4 x-\left(x^{2}+x-2\right)+x-2}{x^{2}+x-2} d x$                    [Adding and subtract $\left ( x-2 \right )$in numerator]

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

Let

\begin{aligned} &I_{1}=\int \frac{1+5 x}{(x-1)(x+2)} d x \\ &\frac{1+5 x}{(x-1)(x+2)}=\frac{A}{x-1}+\frac{B}{x+2} \quad\left[\frac{N(x)}{(a x+b)(c x+d)}=\frac{A}{a x+b}+\frac{B}{c x+d}\right] \end{aligned}

\begin{aligned} &\frac{1+5 x}{(x-1)(x+2)}=\frac{A(x+2)+B(x-1)}{(x-1)(x+2)} \\ &(1+5 x)=(A+B) x+(2 A-B) \end{aligned}

Comparing the corresponding coefficient

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

\begin{aligned} &A+B=5+ \\ &\frac{2 A-B=1}{3 A=6} \\ &A=2 \end{aligned}

Now equation (2)

\begin{aligned} &2+B=5 \\ &B=3 \end{aligned}

Now

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

Now putting the value of $I_{1}$ in equation (1) and we get

$I=-x+2 \log |x-1|+3 \log |x+2|+C$