# Homework Help: Integrating Rational Function

1. Jan 31, 2013

### whatlifeforme

1. The problem statement, all variables and given/known data
Integrate the following:

2. Relevant equations
∫(x^2+x-7)/(x+3)

3. The attempt at a solution
The only way I can think of solving this would be to split up each term into a separate fraction.

2. Jan 31, 2013

### Dick

It's easier if you do the polynomial division. Divide (x^2+x-7) by (x+3).

3. Jan 31, 2013

### whatlifeforme

how would i do that? i tried to separate the numerator into a product of two terms (x+3)(another term)... but that doesn't work.

4. Jan 31, 2013

### Dick

No, factoring doesn't work. Hopefully you learned polynomial division at some point and then forgot you knew it. See http://en.wikipedia.org/wiki/Polynomial_long_division

5. Jan 31, 2013

### Ray Vickson

Why not substitute u = x+3 and do a u-integration instead?

6. Jan 31, 2013

### Hysteria X

Wouldn't that be a little too long as the numerator is not directly divisible by x+3?? or is there any shortcuts

7. Jan 31, 2013

### whatlifeforme

so i would have:

1. ∫(x+3)(x-2) - 1 / (x+3)
2. ∫(x-2) - ∫1/(x+3) [i'm not sure how to take this integral though]

8. Jan 31, 2013

### Hysteria X

Yep that should work :)

9. Jan 31, 2013

### Whovian

Use a substitution of u=x+3, du=dx. A general rule of thumb is that if L is a linear function of x, then integrating

$$\int\left(f\left(L\left(x\right)\right)\right) \cdot\mathrm{d}x$$

is a matter of making a simple substitution. Another thing I've learned is that when integrating functions, try making any substitutions which might simplify it and see where they get you, unless you're almost certain they won't get you anywhere.

10. Jan 31, 2013

### Dick

Same advice as to Hysteria X. Write ((x+3)(x-2)-1)/(x+3). That's what you really meant. That's the polynomial division part alright. The first integral is easy, the second is a substitution. Think 'log' for the actual integration.

11. Jan 31, 2013

### whatlifeforme

x^2 - 2x - ln(x+3) + c

12. Jan 31, 2013

### Dick

I think the x^2 term is missing something.

13. Jan 31, 2013

### SammyS

Staff Emeritus
For this integration, Ray's suggestion appears to be most straight forward. (I realize that in general it's important to know how to do long division when integrating a rational expression for which the degree of the numerator is equal to or greater than hte degree of the denominator.)

$\displaystyle \int \frac{x^2+x-7}{x+3}\,dx$

Let u = x+3  → x = u-3  → dx = du  → x^2+x-7 = (u-3)^2+(u-3)-7 = u^2 - 5u - 1

The integral becomes $\displaystyle\ \ \int \frac{ u^2 - 5u - 1 }{u}\,du = \int (u-5-u^{-1})\,du$