The degree of the numerator is less than the degree of the denominator so we begin by applying
Key Idea 6.4.2. We have:
\begin{align*}
\frac{7x^2+31x+54}{(x+1)(x^2+6x+11)} \amp = \frac{A}{x+1} + \frac{Bx+C}{x^2+6x+11}.\\
\end{align*}
Now clear the denominators.
\begin{align*}
7x^2+31x+54 \amp = A(x^2+6x+11) + (Bx+C)(x+1)
\end{align*}
Now, letting \(x=-1\) we have \(30 = 6A \Rightarrow A=5\text{.}\) When \(x=0\text{,}\) \(54 = 11A+C\text{.}\) But we know that \(A=5\text{,}\) so \(54 =55+C \Rightarrow C=-1\) Finally, we choose \(x=1\) (with \(A=5, C=-1\)) we have \(92=90+(B-1)(2)\Rightarrow B=2\text{.}\)
Thus
\begin{equation*}
\int\frac{7x^2+31x+54}{(x+1)(x^2+6x+11)}\, dx = \int\left(\frac{5}{x+1} + \frac{2x-1}{x^2+6x+11}\right)\, dx\text{.}
\end{equation*}
The first term of this new integrand is easy to evaluate; it leads to a \(5\ln\abs{x+1}\) term. The second term is not hard, but takes several steps and uses substitution techniques.
The integrand \(\ds \frac{2x-1}{x^2+6x+11}\) has a quadratic in the denominator and a linear term in the numerator. This leads us to try substitution. Let \(u = x^2+6x+11\text{,}\) so \(du = (2x+6)\, dx\text{.}\) The numerator is \(2x-1\text{,}\) not \(2x+6\text{,}\) but we can get a \(2x+6\) term in the numerator by adding 0 in the form of “\(7-7\text{.}\)”
\begin{align*}
\frac{2x-1}{x^2+6x+11} \amp = \frac{2x-1+7-7}{x^2+6x+11}\\
\amp = \frac{2x+6}{x^2+6x+11} - \frac{7}{x^2+6x+11}\text{.}
\end{align*}
We can now integrate the first term with substitution, leading to a \(\ln\abs{x^2+6x+11}\) term. The final term can be integrated using arctangent. (We can tell there is no further factoring for this quadratic since the denominator has no real solutions). First, complete the square in the denominator:
\begin{equation*}
\frac{7}{x^2+6x+11} = \frac{7}{(x+3)^2+2}\text{.}
\end{equation*}
An antiderivative of the latter term can be found using
Theorem 5.6.20 and substitution:
\begin{equation*}
\int \frac{7}{x^2+6x+11}\, dx = \frac{7}{\sqrt{2}}\tan^{-1}\left(\frac{x+3}{\sqrt{2}}\right)+C\text{.}
\end{equation*}
Let’s start at the beginning and put all of the steps together.
\begin{align*}
\amp \int\frac{7x^2+31x+54}{(x+1)(x^2+6x+11)}\, dx\\
\amp = \int\left(\frac{5}{x+1} + \frac{2x-1}{x^2+6x+11}\right)\, dx\\
\amp = \int\frac{5}{x+1}\, dx + \int\frac{2x+6}{x^2+6x+11}\, dx -\int\frac{7}{(x+3)^2+2}\, dx\\
\amp = 5\ln\abs{x+1}+ \ln\abs{x^2+6x+11} -\frac{7}{\sqrt{2}}\tan^{-1}\left(\frac{x+3}{\sqrt{2}}\right)+C\text{.}
\end{align*}
As with many other problems in calculus, it is important to remember that one is not expected to “see” the final answer immediately after seeing the problem. Rather, given the initial problem, we break it down into smaller problems that are easier to solve. The final answer is a combination of the answers of the smaller problems.