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

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

This can now be integrated to give

$\displaystyle 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)
$\displaystyle \int\frac{x+2}{x+5}\,dx$

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

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

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

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

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

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