0
$\begingroup$

I have not encountered a problem like this before.

$\int \frac{x+4}{x^2 + 2x + 5}dx$

I do not know how to factor the bottom so I am not sure what to do.

  • 5
    @Jordan: Have you ever tried *reading the textbook* for your course? I'm sure it explains everyhing you need to know for integrating rational functions. (There's an algorithm which covers every possible case, so you don't need even an $\epsilon$ of imagination to solve this type of problem; just follow what the method tells you to do. In particular, you should *never* need to get stuck on a problem like this if you are only able to read...)2012-06-08

2 Answers 2

16

Note that $(x^2+2x+5)' = 2x+2$. So we can break up the integral into two integrals, one that can be solved by substitution, and one that needs a bit more work: $\int \frac{x+4}{x^2+2x+5}\,dx = \int\frac{x+1+3}{x^2+2x+5}\,dx = \int\frac{x+1}{x^2+2x+5}\,dx + \int\frac{3}{x^2+2x+5}\,dx.$ The first integral can be done with the substitution $u=x^2+2x+5$; then $du = (2x+2)\,dx = 2(x+1)\,dx$, so $\begin{align*} \int\frac{x+1}{x^2+2x+5}\,dx &= \int\frac{\frac{1}{2}\,du}{u}\\ &= \frac{1}{2}\int\frac{du}{u}\\ &= \frac{1}{2}\ln |u| + C\\ &= \frac{1}{2}\ln|x^2+2x+5| + C\\ &= \frac{1}{2}\ln(x^2+2x+5) + C, \end{align*}$ with the last equality because $x^2+2x+5$ is always positive.

The second integral can be done by first completing the square, then doing a change of variable to get an integral of $\frac{1}{u^2+1}$, which can be solved directly.

We have $x^2+2x+5 = (x^2+2x+1)+4 = (x+1)^2+4$. Letting $w=x+1$, we get $w^2 + 4 = 4\left(\frac{w^2}{4} + 1\right) = 4\left(\left(\frac{w}{2}\right)^2 +1\right).$ Finally letting $u=\frac{w}{2}$, we get: $\begin{align*} \int\frac{3}{x^2+2x+5}\,dx &= 3\int\frac{1}{x^2+2x+5}\,dx\\ &= 3\int\frac{1}{(x+1)^2+4}\,dx\\ &= 3\int\frac{1}{w^2+4}\,dw &\text{(letting }w=x+1\text{)}\\ &= 3\int\frac{1}{4((\frac{w}{2})^2+1)}\,dw\\ &= \frac{3}{4}\int\frac{1}{(\frac{w}{2})^2+1}\,dw\\ &= \frac{3}{4}\int \frac{2}{u^2+1}\,du &\text{(letting }u=\frac{w}{2}\text{)}\\ &= \frac{3}{2}\int\frac{1}{u^2+1}\,du\\ &= \frac{3}{2}\arctan(u) + C\\ &= \frac{3}{2}\arctan\left(\frac{w}{2}\right) + C\\ &= \frac{3}{2}\arctan\left(\frac{1}{2}(x+1)\right) + C\\ &= \frac{3}{2}\arctan\left(\frac{1}{2}x + \frac{1}{2}\right) + C. \end{align*}$ Finally, putting it all together: $\begin{align*} \int\frac{x+4}{x^2+2x+5}\,dx &= \int\frac{x+1}{x^2+2x+5}\,dx + 3\int\frac{1}{x^2+2x+5}\,dx\\ &= \frac{1}{2}\ln(x^2+2x+5) + \frac{3}{2}\arctan\left(\frac{1}{2}x + \frac{1}{2}\right) + C. \end{align*}$ Since that was a bit complicated, we can double check by differentiating our answer: $\begin{align*} &\frac{d}{dx}\left(\frac{1}{2}\ln(x^2+2x+5) + \frac{3}{2}\arctan\left(\frac{1}{2}x + \frac{1}{2}\right)\right)\\ &= \frac{1}{2}\left(\frac{(x^2+2x+5)'}{x^2+2x+5}\right) + \frac{3}{2}\left(\frac{1}{(\frac{1}{2}x+\frac{1}{2})^2 + 1}\right)\left(\frac{1}{2}x + \frac{1}{2}\right)'\\ &= \frac{2x+2}{2(x^2+2x+5)} + \frac{3}{2}\left(\frac{1}{\frac{1}{4}x^2 + \frac{1}{2}x + \frac{1}{4} + 1}\right)\left(\frac{1}{2}\right)\\ &= \frac{x+1}{x^2+2x+5} + \frac{3}{4}\left(\frac{1}{\frac{1}{4}(x^2 + 2x + 5)}\right)\\ &= \frac{x+1}{x^2+2x+5} + \frac{3}{x^2+2x+5}\\ &= \frac{x+4}{x^2+2x+5}. \end{align*}$

Note. This is a standard method for solving an integral that has an irreducible quadratic in the denominator and a linear term in the numerator. Such fractions occur often when doing integrals of rational functions, since they may be summands that show up in the partial fraction decomposition. It is imperative to be familiar with the two parts: (i) the basic algebra to break up the integral into two, one of which can be done by simple substitution; and (ii) the technique of completing the square and doing appropriate change of variables to solve an integral of the reciprocal of an irreducible quadratic.

  • 3
    @Arturo Indeed, yet his constant whining and annoying attitude has already put me against his posts. I can't stand somebody who's already at least a senior in h.s. getting upset because somebody dares to ask him to make an effort to understand something..and he ***actually*** gets mad: with mathematics, with people trying to help him, with life... I wouldn't even give him the chance to stop whining: let him complain and cry as much as he wants, I say.2012-06-08
6

Recall that $\int \frac {du} {u}=\ln|u|$

So $\int \frac {2x+2} {x^2+2x+5} dx=\ln|x^2+2x+5|$ if we substitute $x^2+2x+5=u$

Thus, we will will manipulate the integral you gave to get:

$\frac{1}{2}\int \frac {2x+2} {x^2+2x+5} + \frac{6} {x^2+2x+5}dx=\frac{1}{2} \ln |x^2+2x+5| + 3\int\frac{1}{(x+1)^2+2^2}dx$

The second integral satisfies the arctangent rule, so it equals $\frac{1}{2}\ln |x^2+2x+5| +\frac{3}{2}\arctan(\frac{x+1}{2})+C$