\(\displaystyle \int_0^1 \frac{x^2+ 2x-5}{x+3} dx\)

Since the denominator has lower degree than the numerator, start by dividing: \(\displaystyle \frac{x^2+ 2x- 5}{x+ 3}= x+ 5+ \frac{10}{x+ 3}\)

\(\displaystyle \int_0^1 (x+ 5+ \frac{10}{x+ 3}dx= \int_0^5 (x+ 5) dx+ 10\int_0^1 \frac{dx}{x+ 3}\)

For that last integral, make the substitution u= x+ 3.

I factor the numerator and obtain a different result.

\(\displaystyle \frac{x^2+ 2x-5}{x+3} = \frac{x(x+2) - 5}{x+3} = \frac{x(x+2+1-1) - 5}{x+3} = \frac{ x(x+3) - x - 5 }{x+3} \)

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

I cant see where I've made a mistake?

Edit- I subbed in numbers and found that yours has an error somewhere

\(\displaystyle \frac{x^2+ 2x- 5}{x+ 3}= x+ 5+ \frac{10}{x+ 3}\)

Using x=2

\(\displaystyle \frac{4+ 4 - 5}{2+ 3}= 2+ 5+ \frac{10}{2+ 3}\)

\(\displaystyle \frac{3}{5}= 2+ 5+ \frac{10}{5} = 9\) which is not true obviously

Edit Edit (lol) -

The second you is a partial fractions, where you should start by dividing.

I hate dividing polynomials, if you can I would suggest factoring which can be done in this case. Obviously not everybody will share my hatred for dividing polynomials but I treat them like the annoying cousin: when I have to go see them I will, but not a day before!