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

$\frac{1}{6} \log \frac{x-1}{x+1}+\frac{\sqrt{2}}{3} \tan ^{-1} \frac{x}{\sqrt{2}}+C$

Hint:

To solve this integration, we use partial fraction method

Given:

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

Explanation:

\begin{aligned} &\text { Let }\\ &I=\int \frac{x^{2}}{x^{4}+x^{2}-2} d x \end{aligned}

\begin{aligned} &\text { Put } x^{2}=y \\ &\frac{y}{y^{2}+y-2}=\frac{y}{(y-1)(y+2)}=\frac{A}{y-1}+\frac{B}{y+2} \\ &y=A(y+2)+B(y-1) \end{aligned}

$\! \! \! \! \! \! \! \! \! \! \text { At } y=1 \\ \\1=3 A \\\\ A=\frac{1}{3}$
\begin{aligned} &\text { At } y=-2 \\ &-2=-3 B \\ &B=\frac{2}{3} \end{aligned}
\begin{aligned} &\int \frac{x^{2}}{x^{4}+x^{2}-2}=\frac{1}{3} \int \frac{1}{x^{2}-1} d x+\frac{2}{3} \int \frac{1}{x^{2}+2} d x \\ &=\frac{1}{3} \cdot \frac{1}{2} \log \frac{x-1}{x+1}+\frac{2}{3} \cdot \frac{1}{\sqrt{2}} \tan ^{-1} \frac{x}{\sqrt{2}}+C \\ &I=\frac{1}{6} \log \frac{x-1}{x+1}+\frac{\sqrt{2}}{3} \tan ^{-1} \frac{x}{\sqrt{2}}+C \end{aligned}