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

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

Hint:

To solve the given integration, we use partial fraction method

Given:

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

Explanation:

Let

$I=\int \frac{x^{2}+x-1}{x^{2}+x-6} d x$

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

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

Let

$I_{1}=\int \frac{5}{(x+3)(x-2)} d x \quad\left[x^{2}+x-6=(x+3)(x-2)\right]$

Now express the function in terms of partial fraction

$\frac{5}{(x+3)(x-2)}=\frac{A}{x+3}+\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]$

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

On comparing the coefficient we get

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

Equation (3)

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

Now

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

\begin{aligned} &I_{1}=-\log |x+3|+\log |x-2|+C \quad\left[\int \frac{1}{a x+b} d x=\frac{1}{a} \log |a x+b|\right] \\ &I_{1}=\log \left|\frac{x-2}{x+3}\right|+C \end{aligned}

Putting the value of $I_{1}$ in equation (1)

$I=x+\log \left|\frac{x-2}{x+3}\right|+C$