Indefinite Integration

Evaluate $\displaystyle \int \dfrac{x^2 \; dx}{x^2 + 7 x + 10}$ $\;\;\;$ $\left(x \neq - 5, - 2\right)$


Let $I = \displaystyle \int \dfrac{x^2}{x^2 + 7 x + 10} \; dx$ $\;\;\; \cdots$ (1)

$\begin{array}{rll} x^2 + 7 x + 10 ) & x^2 & (1 \\ & \underline{x^2 + 7 x + 10} & \\ & \hspace{6.5mm} - 7 x - 10 & \end{array}$

$\therefore$ $\;$ $\dfrac{x^2}{x^2 + 7 x + 10} = 1 - \dfrac{7 x + 10}{x^2 + 7 x + 10}$ $\;\;\; \cdots$ (2)

Substituting equation (2) in equation (1) gives

$\begin{aligned} I & = \int \left(1 - \dfrac{7 x + 10}{x^2 + 7 x + 10}\right) \; dx \\\\ & = \int dx - \int \dfrac{7 x + 10}{x^2 + 7 x + 10} \; dx \;\;\; \cdots (3) \end{aligned}$

Now, $\int dx = x + c_1$ $\;\;\; \cdots$ (4)

Consider $\displaystyle \int \dfrac{7 x + 10}{x^2 + 7 x + 10} \; dx$ $\;\;\; \cdots$ (5)

Let $7 x + 10 = M \; \dfrac{d}{dx} \left(x^2 + 7 x + 10\right) + N$

i.e. $7 x + 10 = M \left(2 x + 7\right) + N$ $\;\;\; \cdots$ (5a)

i.e. $7 x + 10 = 2 M x + 7 M + N$

Comparing the x coefficients gives

$2 M = 7$ $\implies$ $M = \dfrac{7}{2}$ $\;\;\; \cdots$ (5b)

Comparing the constant terms gives

$10 = 7 M + N$ $\implies$ $N = 10 - 7 M$ $\implies$ $N = 10 - \dfrac{49}{2} = \dfrac{-29}{2}$ $\;\;\; \cdots$ (5c)

In view of equations (5a), (5b) and (5c), equation (5) becomes

$\begin{aligned} \int \dfrac{7 x + 10}{x^2 + 7 x + 10} \; dx & = \int \dfrac{\dfrac{7}{2} \left(2 x + 7\right) - \dfrac{29}{2}}{x^2 + 7 x + 10} \; dx \\\\ & = \dfrac{7}{2} \int \dfrac{\left(2 x + 7\right) \; dx}{x^2 + 7 x + 10} - \dfrac{29}{2} \int \dfrac{dx}{x^2 + 7x + 10} \;\;\; \cdots (6) \end{aligned}$

Consider $\displaystyle \int \dfrac{\left(2x + 7\right) \; dx}{x^2 + 7 x + 10}$

Let $x^2 + 7x + 10 = u$

Then, $\left(2 x + 7\right) \; dx = du$

$\begin{aligned} \therefore \; \int \dfrac{\left(2 x + 7\right) \; dx}{x^2 + 7 x + 10} & = \int \dfrac{du}{u} \\\\ & = \log \left|u\right| + c_2 \\\\ & = \log \left|x^2 + 7 x + 10\right| + c_2 \;\;\; \cdots (6a) \end{aligned}$

$\begin{aligned} \text{Consider } \int \dfrac{dx}{x^2 + 7 x + 10} & = \int \dfrac{dx}{\left(x^2 + 7 x + \dfrac{49}{4}\right) + 10 - \dfrac{49}{4}} \\\\ & = \int \dfrac{dx}{\left(x + \dfrac{7}{2}\right)^2 - \left(\dfrac{3}{2}\right)^2} \\\\ & = \dfrac{1}{2} \times \dfrac{2}{3} \log \left|\dfrac{x + \dfrac{7}{2} - \dfrac{3}{2}}{x + \dfrac{7}{2} + \dfrac{3}{2}}\right| + c_3 \\\\ & \left[\text{Note: } \int \dfrac{dx}{x^2 - a^2} = \dfrac{1}{2a} \log \left|\dfrac{x - a}{x + a}\right| + c\right] \\\\ & = \dfrac{1}{3} \log \left|\dfrac{2 x + 4}{2 x + 10}\right| + c_3 \\\\ & = \dfrac{1}{3} \log \left|\dfrac{x + 2}{x + 5}\right| + c_3 \;\;\; \cdots (6b) \end{aligned}$

$\therefore$ $\;$ In view of equations (6a) and (6b), equation (6) becomes

$\displaystyle \int \dfrac{7 x + 10}{x^2 + 7 x + 10} \; dx = \dfrac{7}{2} \log \left|x^2 + 7 x + 10\right| + \dfrac{7}{2} c_2 - \dfrac{29}{6} \log \left|\dfrac{x + 2}{x + 5}\right| - \dfrac{29}{2} c_3$ $\;\;\; \cdots$ (7)

$\therefore$ $\;$ In view of equations (4) and (7), equation (3) becomes

$I = x - \dfrac{7}{2} \log \left|x^2 + 7 x + 10\right| + \dfrac{29}{6} \log \left|\dfrac{x + 2}{x + 5}\right| + c$

where $c = c_1 - \dfrac{7}{2} c_2 + \dfrac{29}{2} c_3$