Evaluate the integral:
$\int \frac{5 x-2}{1+2 x+3 x^{2}} d x$
$I=\int \frac{5 x-2}{3 x^{2}+2 x+1} d x$
As we can see that there is a term of $x$ in numerator and derivative of $x^{2}$ is also $2 x$. So there is a chance that we can make substitution for $3 x^{2}+2 x+1$ and I can be reduced to a fundamental integration.
As, $\frac{\mathrm{d}}{\mathrm{dx}}\left(3 \mathrm{x}^{2}+2 \mathrm{x}+1\right)=6 \mathrm{x}+2$
$\therefore$ Let, $5 x-2=A(6 x+2)+B$
$\Rightarrow 5 x-2=6 A x+2 A+B$
On comparing both sides -
We have,
$6 A=5 \Rightarrow A=5 / 6$
$2 \mathrm{~A}+\mathrm{B}=-2 \Rightarrow \mathrm{B}=-2 \mathrm{~A}-2=-11 / 3$
Hence,
$I=\int \frac{\frac{5}{6}(6 x+2) \frac{11}{2}}{3 x^{2}+2 x+1} d x$
$\therefore I=\int \frac{\frac{5}{6}(6 x+2)}{3 x^{2}+2 x+1} d x+\int \frac{\frac{11}{3}}{3 x^{2}+2 x+1} d x$
Let, $I_{1}=\frac{5}{6} \int \frac{(6 x+2)}{3 x^{2}+2 x+1} d x$ and $I_{2}=-\frac{11}{3} \int \frac{1}{3 x^{2}+2 x+1} d x$'
Now, $I=I_{1}+I_{2} \ldots$ eqn $I$
We will solve $\mathrm{I}_{1}$ and $\mathrm{I}_{2}$ individually.
$A s, I_{1}=\frac{5}{6} \int \frac{(6 x+2)}{3 x^{2}+2 x+1}$
Let $u=3 x^{2}+2 x+1 \Rightarrow d u=(6 x+2) d x$
$\therefore \mathrm{I}_{1}$ reduces to $\frac{5}{6} \int \frac{\mathrm{du}}{\mathrm{u}}$
Hence,
$I_{1}=\frac{5}{6} \int \frac{d u}{u}=\frac{5}{6} \log |u|+C\left\{\because \int \frac{d x}{x}=\log |x|+C\right\}$
On substituting value of $u$, we have:
$I_{1}=\frac{5}{6} \log \left|3 x^{2}+2 x+1\right|+C \ldots .$ eqn 2
As, $I_{2}=-\frac{11}{3} \int \frac{1}{3 x^{2}+2 x+1} d x$ and we don't have any derivative of function present in denominator. $\therefore$ we will use some special integrals to solve the problem.
As denominator doesn't have any square root term. So one of the following two integrals will solve the problem.
i) $\int \frac{1}{x^{2}-a^{2}} d x=\frac{1}{2 a} \log \left|\frac{x-a}{x+a}\right|+C$ ii) $\int \frac{1}{x^{2}+a^{2}} d x=\frac{1}{a} \tan ^{-1}\left(\frac{x}{a}\right)+C$
Now we have to reduce $I_{2}$ such that it matches with any of above two forms.
We will make to create a complete square so that no individual term of $\mathrm{x}$ is seen in denominator.
$\therefore I_{2}=-\frac{11}{3} \int \frac{1}{3 x^{2}+2 x+1} d x=\frac{-11}{3} \int \frac{1}{3\left(x^{2}+\frac{2}{2} x+\frac{1}{2}\right)} d x=-\frac{11}{9} \int \frac{1}{x^{2}+\frac{2}{3} x+\frac{1}{2}} d x$
$\Rightarrow I_{2}=-\frac{11}{9} \int \frac{6}{\left\{x^{2}+2\left(\frac{1}{2}\right) x+\left(\frac{1}{2}\right)^{2}\right\}+\frac{1}{2}-\left(\frac{1}{2}\right)^{2}} d x$
Using: $a^{2}+2 a b+b^{2}=(a+b)^{2}$
We have:
$\mathrm{I}_{2}=-\frac{11}{9} \int \frac{1}{\left(\mathrm{x}+\frac{1}{3}\right)^{2}+\left(\frac{\sqrt{2}}{3}\right)^{2}} \mathrm{dx}$
$I_{2}$ matches with the form $\int \frac{1}{x^{2}+a^{2}} d x=\frac{1}{a} \tan ^{-1}\left(\frac{x}{a}\right)+C$
$\therefore I_{2}=-\frac{11}{9} \frac{1}{\frac{\sqrt{2}}{3}} \tan ^{-1}\left(\frac{x+\frac{1}{2}}{\frac{\sqrt{2}}{3}}\right)+C$
$\therefore I_{2}=-\frac{11}{3 \sqrt{2}} \tan ^{-1}\left(\frac{3 x+1}{\sqrt{2}}\right)+C \ldots$ eqn 3
From eqn 1, we have:
$I=I_{1}+I_{2}$
Using eqn 2 and 3 , we get -
$I=\frac{5}{6} \log \left|3 x^{2}+2 x+1\right|-\frac{11}{3 \sqrt{2}} \tan ^{-1}\left(\frac{3 x+1}{\sqrt{2}}\right)+C$