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:


*

*Partial fraction decomposition, but I can't factor the denominator into different parts.

*Substitution: I tried $u = x^{2}$ and $u = x^2+2x+17$, but both of them seem not to be helpful.

*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!
 A: 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.
A: 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.
A: 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. 
