# How am I supposed to integrate this by partial fractions? $\int \frac{x+2}{x^2+x}$?

This is the problem:

$$\int \frac{x+2}{x^2+x}$$

I am supposed to write $(y+2)$ as $\frac{1}{2}(2x+1)+\frac{3}{2}$

$$\frac{1}{2}\int \frac{2x+1}{x^2+x}+\frac{3}{2}\int \frac{3}{x^2+x}$$

Fine, is there supposed to be some way for me to know which fractions to use here or am I supposed to just guess or can I use any number here? What is this method?

This does not look like the integration by partial fraction method outlined in the book.

• Hint: Expand $\frac{1}{2}(2x + 1) + \frac{3}{2}$ and see what happens. Then in the second integral, complete the square. – Sean Roberson Oct 1 '17 at 6:07

As $x^2+x=x(x+1),$
Set $x+2=Ax+B(x+1)=x(A+B)+B$
$\implies B=2$
You can do this : $$\frac {(x+1)+1}{x(x+1)}=\frac 1x + \frac 1{x(x+1)}=\frac 1x + \frac {(x+1-x)}{x(x+1)}=\frac 1x + \left(\frac 1x - \frac 1{x+1}\right)=\frac 2x - \frac {1}{x+1}.$$