# Math Help - Improper integral help

1. ## Improper integral help

So this was on my test today and I couldnt figure it out.

int[ (x+2) / (x+5) ]

obviously part of the answer was ln|x+5|, but i couldnt figure out what to do with the (x+2)

2. Originally Posted by sj9110
So this was on my test today and I couldnt figure it out.

int[ (x+2) / (x+5) ]

obviously part of the answer was ln|x+5|, but i couldnt figure out what to do with the (x+2)

by long division we get

$\frac{x+2}{x+5}=1-\frac{3}{x+5}$

This can now be integrated to give

$x-3\ln(x+5)+c$

3. Originally Posted by sj9110
So this was on my test today and I couldnt figure it out.

int[ (x+2) / (x+5) ]

obviously part of the answer was ln|x+5|, but i couldnt figure out what to do with the (x+2)
$\int\frac{x+2}{x+5}\,dx$

$=\int\frac{x+2\color{red}+3-3}{x+5}\,dx$

$=\int\frac{x+5-3}{x+5}\,dx$

$=\int\left(\frac{x+5}{x+5}-\frac3{x+5}\right)dx$

$=\int\left(1-\frac3{x+5}\right)dx$

$=\int dx-3\int\frac1{x+5}\,dx$

$=x-3\ln|x+5|+C$