$\int \frac{x^2}{x^4-x^2-12} d x$
Let $I=\int \frac{x^2}{x^4-x^2-12} d x$
$$\begin{aligned} & =\int \frac{x^2}{x^4-4 x^2+3 x^2-12} d x \\ & =\int \frac{x^2 d x}{x^2\left(x^2-4\right)+3\left(x^2-4\right)} \\ & =\int \frac{x^2 d x}{\left(x^2-4\right)\left(x^2+3\right)} \\ \text{Now,}\quad & \frac{x^2}{\left(x^2-4\right)\left(x^2+3\right)}\quad \left[\text { let } x^2=t\right] \end{aligned}$$
$\Rightarrow \quad \frac{t}{(t-4)(t+3)}=\frac{A}{t-4}+\frac{B}{t+3}$
$\Rightarrow \quad t=A(t+3)+B(t-4)$
On comparing the coefficient of t on both sides, we get
$$\begin{array}{lrl} & A+B=1 \quad\text{.... (i)}\\ \Rightarrow & 3 A-4 B=0 \quad\text{.... (ii)}\\ \Rightarrow & 3(1-B)-4 B=0 \\ \Rightarrow & 3-3 B-4 B=0 \\ \Rightarrow & 7 B=3 \\ \Rightarrow & B=\frac{3}{7} \end{array}$$
If $B=\frac{3}{7}$, then $A+\frac{3}{7}=1$
$\Rightarrow\quad A=1-\frac{3}{7}=\frac{4}{7}$
$\frac{x^2}{\left(x^2-4\right)\left(x^2+3\right)}=\frac{4}{7\left(x^2-4\right)}+\frac{3}{7\left(x^2+3\right)}$
$$\begin{aligned} \therefore\quad I & =\frac{4}{7} \int \frac{1}{x^2-(2)^2} d x+\frac{3}{7} \int \frac{1}{x^2+(\sqrt{3})^2} d x \\ & =\frac{4}{7} \cdot \frac{1}{2 \cdot 2} \log \left|\frac{x-2}{x+2}\right|+\frac{3}{7} \cdot \frac{1}{\sqrt{3}} \tan ^{-1} \frac{x}{\sqrt{3}}+C \\ & =\frac{1}{7} \log \left|\frac{x-2}{x+2}\right|+\frac{\sqrt{3}}{7} \tan ^{-1} \frac{x}{\sqrt{3}}+C \end{aligned}$$
$\int \frac{x^2}{\left(x^2+a^2\right)\left(x^2+b^2\right)} d x$
Let $I=\int \frac{x^2}{\left(x^2+a^2\right)\left(x^2+b^2\right)} d x$
Now, $\frac{x^2}{\left(x^2+a^2\right)\left(x^2+b^2\right)}\quad \left[\text { let } x^2=t\right]$
$$\begin{aligned} & =\frac{t}{\left(t+a^2\right)\left(t+b^2\right)}=\frac{A}{\left(t+a^2\right)}+\frac{B}{\left(t+b^2\right)} \\ & t=A\left(t+b^2\right)+B\left(t+a^2\right) \end{aligned}$$
On comparing the coefficient of t, we get
$$\begin{aligned} A+B & =1 \quad\text{.... (i)}\\ b^2 A+a^2 B & =0 \quad\text{.... (i)}\\ \Rightarrow\quad b^2(1-B)+a^2 B & =0 \\ \Rightarrow\quad b^2-b^2 B+a^2 B & =0 \\ \Rightarrow\quad b^2+\left(a^2-b^2\right) B & =0 \\ \Rightarrow\quad B=\frac{-b^2}{a^2-b^2} & =\frac{b^2}{b^2-a^2} \end{aligned}$$
From Eq. (i), $A+\frac{b^2}{b^2-a^2}=1$
$\Rightarrow\quad A=\frac{b^2-a^2-b^2}{b^2-a^2}=\frac{-a^2}{b^2-a^2}$
$$\begin{aligned} \therefore\quad I & =\int \frac{-a^2}{\left(b^2-a^2\right)\left(x^2+a^2\right)} d x+\int \frac{b^2}{b^2-a^2} \cdot \frac{1}{x^2+b^2} d x \\ & =\frac{-a^2}{\left(b^2-a^2\right)} \int \frac{1}{x^2+a^2} d x+\frac{b^2}{b^2-a^2} \int \frac{1}{x^2+b^2} d x \\ & =\frac{-a^2}{b^2-a^2} \cdot \frac{1}{a} \tan ^{-1} \frac{x}{a}+\frac{b^2}{b^2-a^2} \cdot \frac{1}{b} \tan ^{-1} \frac{x}{b} \\ & =\frac{1}{b^2-a^2}\left[-\tan ^{-1} \frac{x}{a}+b \tan ^{-1} \frac{x}{b}\right] \\ & =\frac{1}{a^2-b^2}\left[\tan ^{-1} \frac{x}{a}-b \tan ^{-1} \frac{x}{b}\right] \end{aligned}$$
$\int_0^\pi \frac{x}{1+\sin x}$
Let $I=\int_0^\pi \frac{x}{1+\sin x} d x\quad\text{.... (i)}$
and $I=\int_0^\pi \frac{\pi-x}{1+\sin (\pi-x)} d x=\int_0^\pi \frac{\pi-x}{1+\sin x} d x\quad\text{.... (ii)}$
$$\begin{aligned} &\text { On adding Eqs. (i) and (ii), we get }\\ &\begin{aligned} 2 I & =\pi \int_0^\pi \frac{1}{1+\sin x} d x \\ & =\pi \int_0^\pi \frac{(1-\sin x) d x}{(1+\sin x)(1-\sin x)} \end{aligned} \end{aligned}$$
$$\begin{aligned} & =\pi \int_0^\pi \frac{(1-\sin x) d x}{\cos ^2 x} \\ & =\pi \int_0^\pi\left(\sec ^2 x-\tan x \cdot \sec x\right) d x \\ & =\pi \int_0^\pi \sec ^2 x d x-\pi \int_0^\pi \sec x x \cdot \tan x d x \\ & =\pi[\tan x]_0^\pi-\pi[\sec x]_0^\pi \\ & =\pi[\tan x-\sec x]_0^\pi \\ & =\pi[\tan \pi-\sec \pi-\tan 0-\sec 0] \end{aligned}$$
$$\begin{aligned} \Rightarrow & & 2 I & =\pi[0+1-0+1] \\ & & 2 I & =2 \pi \\ \therefore & & I & =\pi \end{aligned}$$
$\int \frac{2 x-1}{(x-1)(x+2)(x-3)} d x$
Let $I=\int \frac{(2 x-1)}{(x-1)(x+2)(x-3)} d x$
Now, $\quad \frac{2 x-1}{(x-1)(x+2)(x-3)}=\frac{A}{(x-1)}+\frac{B}{(x+2)}+\frac{C}{(x-3)}$
$\Rightarrow \quad 2 x-1=A(x+2)(x-3)+B(x-1)(x-3)+C(x-1)(x+2)$
Put $x=3$, then
$$\begin{aligned} 6-1 & =C(3-1)(3+2) \\ \Rightarrow\quad 5 & =10 C \Rightarrow C=\frac{1}{2} \end{aligned}$$
$$\begin{aligned} &\text { Again, put } x=1 \text {, then }\\ &2-1=A(1+2)(1-3) \end{aligned}$$
$\Rightarrow \quad 1=-6 A \Rightarrow A=-\frac{1}{6}$
$$\begin{aligned} &\text { Now, put } x=-2 \text {, then }\\ &\begin{aligned} & -4-1 =B(-2-1)(-2-3) \\ & \Rightarrow -5 =15 B \Rightarrow B=-\frac{1}{3} \end{aligned} \end{aligned}$$
$\therefore \quad I=-\frac{1}{6} \int \frac{1}{x-1} d x-\frac{1}{3} \int \frac{1}{x+2} d x+\frac{1}{2} \int \frac{1}{x-3} d x$
$$\begin{aligned} & =-\frac{1}{6} \log |(x-1)|-\frac{1}{3} \log |(x+2)|+\frac{1}{2} \log |(x-3)|+C \\ & =-\log |(x-1)|^{1 / 6}-\log |(x+2)|^{1 / 3}+\log |(x-3)|^{1 / 2}+C \\ & =\log \left|\frac{\sqrt{x-3}}{(x-1)^{1 / 6}(x+2)^{1 / 3}}\right|+C \end{aligned}$$
$\int e^{\tan ^{-1} x}\left(\frac{1+x+x^2}{1+x^2}\right) d x$
Let $I=\int e^{\tan ^{-1} x}\left(\frac{1+x+x^2}{1+x^2}\right) d x$
$$\begin{aligned} & =\int e^{\tan ^{-1} x}\left(\frac{1+x^2}{1+x^2}+\frac{x}{1+x^2}\right) d x \\ & =\int e^{\tan ^{-1} x} d x+\int \frac{x e^{\tan ^{-1} x}}{1+x^2} d x \end{aligned}$$
$I=I_1+I_2\quad\text{.... (i)}$
Now, $I_2=\int \frac{x \mathrm{e}^{\tan ^{-1} x}}{1+x^2} d x$
Put $\tan ^{-1} x=t \Rightarrow x=\tan t$
$\Rightarrow \quad \frac{1}{1+x^2} d x=d t$
$\therefore\quad I=\int_{\mathrm{I}}^{\tan } t \cdot e_{\mathrm{II}}^t d t$
$$\begin{aligned} & =\tan t \cdot e^t-\int \sec ^2 t \cdot e^t d t+C \\ & =\tan t \cdot e^t-\int\left(1+\tan ^2 t\right) e^t d t+C \quad\left[\because \sec ^2 \theta=1+\tan ^2 \theta\right] \end{aligned}$$
$$\begin{aligned} I_2 & =\tan t \cdot e^t-\int\left(1+x^2\right) \frac{e^{\tan ^{-1} x}}{1+x^2} d x+C \\ I_2 & =\tan t \cdot e^t-\int e^{\tan ^{-1} x} d x+C \\ \therefore\quad I & =\int e^{\tan ^{-1} x} d x+\tan t \cdot e^t-\int e^{\tan ^{-1} x} d x+C \\ & =\tan t \cdot e^t+C \\ & =x e^{\tan ^{-1} x}+C \end{aligned}$$