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

$\log \left|\frac{x^{n}}{x^{n}+1}\right|+C$

Hint:

To solve this integration, we use partial fraction method

Given:

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

Explanation:

Let

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

Let

\begin{aligned} &x^{n}=y \\ &n x^{n-1} d x=d y \\ &x^{n-1} d x=\frac{d y}{n} \\ &I=\int \frac{d y}{n y(y+1)} \end{aligned}

\begin{aligned} &I=\frac{1}{n} \int \frac{d y}{y(y+1)} \\ &\frac{1}{y(y+1)}=\frac{A}{y}+\frac{B}{y+1} \\ &1=A(y+1)+B \end{aligned}                    (1)

At  $y=0$ equation (1) becomes

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

At $y=-1$ equation (1) becomes

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

Thus
\begin{aligned} &I=\int \frac{1}{y} d y-\int \frac{1}{y+1} d y \\ &I=\log |y|-\log |y+1|+C \end{aligned}

As $y=x^{n}$

\begin{aligned} &I=\log \left|x^{n}\right|-\log \left|x^{n}+1\right|+C \\ &I=\log \left|\frac{x^{n}}{x^{n}+1}\right|+C \mid \end{aligned}