Evaluate $\displaystyle \int \dfrac{3 x + 2}{2 x^2 + x + 1} \; dx$
Let $I = \displaystyle \int \dfrac{3 x + 2}{2 x^2 + x + 1} \; dx$ $\;\;\; \cdots$ (1)
Let $3 x + 2 = m \dfrac{d}{dx} \left(2 x^2 + x + 1\right) + n$
i.e. $3 x + 2 = m \left(4 x + 1\right) + n$ $\;\;\; \cdots$ (2)
i.e. $3 x + 2 = 4 m x = m + n$
Comparing the coefficient of x and constant term on both sides, we get
$4 m = 3$ $\implies$ $m = \dfrac{3}{4}$ $\;\;\; \cdots$ (3a)
and $m + n = 2$ $\implies$ $n = 2 - m = 2 - \dfrac{3}{4} = \dfrac{5}{4}$ $\;\;\; \cdots$ (3b)
In view of equations (3a) and (3b), equation (2) can be written as
$3 x + 2 = \dfrac{3}{4} \left(4 x + 1\right) + \dfrac{5}{4}$ $\;\;\; \cdots$ (4)
In view of equation (4), equation (1) becomes
$\begin{aligned}
I & = \int \dfrac{\dfrac{3}{4} \left(4 x + 1\right) + \dfrac{5}{4}}{2 x^2 + x + 1} \; dx \\\\
& = \dfrac{3}{4} \int \dfrac{4 x + 1}{2 x^2 + x + 1} \; dx + \dfrac{5}{4} \int \dfrac{dx}{2 x^2 + x + 1} \\\\
& = \dfrac{3}{4} \; I_1 + \dfrac{5}{4} \; I_2 \;\;\; \cdots (5)
\end{aligned}$
where $I_1 = \displaystyle \int \dfrac{4x + 1}{2 x^2 + x + 1} \; dx$ $\;\;\; \cdots$ (5a)
and $I_2 = \displaystyle \int \dfrac{dx}{2 x^2 + x + 1} \; dx$ $\;\;\; \cdots$ (5b)
Consider $I_1$. Put $2 x^2 + x + 1 = p$ $\;\;\; \cdots$ (6a)
Differentiating equation (6a) gives $\left(4 x + 1\right) \; dx = dp$ $\;\;\; \cdots$ (6b)
In view of equations (6a) and (6b), equation (5a) becomes
$\begin{aligned}
I_1 & = \displaystyle \int \dfrac{dp}{p} \\\\
& = \log \left|p\right| + c_1 \\\\
& = \log \left|2 x^2 + x + 1\right| + c_1 \;\;\; \cdots (7a) \;\;\; \left[\text{In view of equation (6a)}\right]
\end{aligned}$
$\begin{aligned}
I_2 & = \int \dfrac{dx}{2 x^2 + x + 1} \\\\
& = \dfrac{1}{2} \int \dfrac{dx}{x^2 + \dfrac{x}{2} + \dfrac{1}{2}} \\\\
& = \dfrac{1}{2} \int \dfrac{dx}{\left(x^2 + \dfrac{1}{2} x + \dfrac{1}{16}\right) + \dfrac{1}{2} - \dfrac{1}{16}} \\\\
& = \dfrac{1}{2} \int \dfrac{dx}{\left(x + \dfrac{1}{4}\right)^2 + \left(\dfrac{\sqrt{7}}{4}\right)^2} \\\\
& \left[\text{Note: } \int \dfrac{dx}{x^2 + a^2} = \dfrac{1}{a} \tan^{-1} \left(\dfrac{x}{a}\right)\right] \\\\
& = \dfrac{1}{2} \times \dfrac{4}{\sqrt{7}} \tan^{-1} \left(\dfrac{x + \dfrac{1}{4}}{\dfrac{\sqrt{7}}{4}}\right) + c_2 \\\\
& = \dfrac{2}{\sqrt{7}} \tan^{-1} \left(\dfrac{4 x + 1}{\sqrt{7}}\right) + c_2 \;\;\; \cdots (7b)
\end{aligned}$
$\therefore$ We have from equations (7a), (7b) and (5)
$\begin{aligned}
I & = \dfrac{3}{4} \log \left|2 x^2 + x + 1\right| + c_1 + \dfrac{5}{4} \times \dfrac{2}{\sqrt{7}} \tan^{-1} \left(\dfrac{4 x + 1}{\sqrt{7}}\right) + c_2 \\\\
& = \dfrac{3}{4} \log \left|2 x^2 + x + 1\right| + \dfrac{5}{2 \sqrt{7}} \tan^{-1} \left(\dfrac{4 x + 1}{\sqrt{7}}\right) + c
\end{aligned}$
where $c = c_1 + c_2$