# How to evaluate the following integral, $\int\frac{x \, dx}{x^2+2x+17}$?

I am new to integration. This function is kinda tricky for me : $$\int\frac{x \, dx}{x^2+2x+17}$$

I came up with following three approaches:

1. Partial fraction decomposition, but I can't factor the denominator into different parts.
2. Substitution: I tried $u = x^{2}$ and $u = x^2+2x+17$, but both of them seem not to be helpful.
3. I also tried dividing both denominator and numerator by $x$, then the fraction became $\frac{1}{x+\frac{17}{x}+2}$ . It is more complex.

Any suggestions or hints? Thank you so much!

Notice that after completing the square,

$$x^2 + 2x + 17 = (x + 1)^2 + 4^2$$

so we can rewrite the integral as a difference:

$$\int \frac{x + 1}{(x + 1)^2 + 4^2} \, dx - \int \frac{1}{(x + 1)^2 + 4^2} \, dx$$

There is a natural substitution in each of these integrals, one leading to a logarithm and the other leading to an arctangent.

• I see, thank you so much. I am just wondering did this idea (trying the square form) come from your experience? It is pretty hard for me to think this further :( Jan 2, 2016 at 21:09
• @JayWong If you can't factor a polynomial, then completing the square is very frequently the next step.
– user296602
Jan 2, 2016 at 21:10
• Thank you, I will remember this tip. I will also do more practice to get this "natural sense" :) Jan 2, 2016 at 21:13

Variations on this one come up here from time to time.

There is a standard technique in algebra for reducing a problem involving a quadratic polynomial with a first-degree term to a problem involving a quadratic polynomial without a first-degree term. $$u = x^2+2x+17,\qquad du = (2x+2)\,dx, \qquad \frac{du} 2 = (x+1)\,dx$$ $$\frac{x}{x^2+2x+17} = \underbrace{\frac{x+1}{x^2+2x+17}} + \frac{-1}{x^2+2x+17}$$ The integral of the function over the $\underbrace{\text{underbrace}}$ is done via the substitution above. Then next term has to be treated differently.

$$\underbrace{x^2+2x+17 = (x^2 + 2x + 1) + 16 = (x+1)^2 + 16}_\text{completing the square}$$

$$\int \frac 1 {(x+1)^2 + 16} \,dx = \int \frac{1/16}{\left( \frac{x+1} 4 \right)^2 + 1} \, dx = \int \frac{1/4}{\left( \frac{x+1} 4 \right)^2 + 1} \, \frac{dx} 4 = \frac 1 4 \int \frac{du}{u^2+1}$$ etc.

There is a standard technique in algebra for reducing a problem involving a quadratic polynomial with a first-degree term to a problem involving a quadratic polynomial without a first-degree term.

• Thank you, your explanation really helps. Happy new year! Jan 2, 2016 at 21:20
• Glad it helps. ${}\qquad{}$ Jan 2, 2016 at 21:21
• Hi, could you please also take a look of my other question? I would highly appreciate it if you could help me :) Jan 9, 2016 at 23:24

You could also do $\int\frac{x+2-2 \mathrm dx}{{x}^2+2x+17}=\int\frac{x+2 \mathrm dx}{{x}^2+2x+17}+\int\frac{-2 \mathrm dx}{{x}^2+2x+17}$

For the first term, let $u=x^2+2x+17$ and $\mathrm du=2x+2 \mathrm dx$.

For the second term, complete the square in the denominator and use the formula for the integral for the form $\frac{1}{a^2+x^2}$. Please comment if you need more elaboration.

• Yeah, this makes sense. How did you know doing$+2-2$ could help tho? Jan 2, 2016 at 21:11
• When you have a trinomial in the denominator and a single term in the numerator, it is often helpful to rewrite the numerator as the derivative of the denominator. Then, you have the form $\int {f'(x) \over f(x)}.$ This little trick is just one of many you'll come across in your explorations of calculus. Jan 2, 2016 at 21:13
• I see, thank you @zz20s Happy new year! Jan 2, 2016 at 21:15