# Homework Help: Integral of a rational function

1. Jun 25, 2013

### SithsNGiggles

1. The problem statement, all variables and given/known data

I came across this integral recently while tutoring:
$\displaystyle \frac{1}{5} \int \frac{-x^3+2x^2-3x+4}{x^4-x^3+x^2-x+1}~dx$

2. Relevant equations

3. The attempt at a solution

I'm not sure how to approach this. At first I suspected partial fraction decomposition might be the way to go, but I don't know how to factor that denominator.

I've checked with WolframAlpha, and I'm getting a result that I haven't come across yet and don't quite understand: http://www.wolframalpha.com/input/?i=Integrate%5B%28-x%5E3%2B2x%5E2-3x%2B4%29%2F%28x%5E4-x%5E3%2Bx%5E2-x%2B1%29%2Cx%5D

$\displaystyle \int \cdots=\frac{1}{5}\sum_{\left\{\omega~:~\omega^4-\omega^3+\omega^2-\omega+1=0\right\}} \frac{4\ln(x-\omega)-3\omega\ln(x-\omega)+2\omega^2\ln(x-\omega)-\omega^3\ln(x-\omega)}{4\omega^3-3\omega^2+2\omega-1}+C$

How did WA get that answer? Is there some specific name for the method? (I've tried looking it up, but I can't quite put the question into words.)

From what I can tell, $\omega$ is an index indicating the roots of the polynomial in the denominator, or something like that.

2. Jun 25, 2013

### Bacle2

Have you tried using WA to factor the denominator?

3. Jun 26, 2013

### Ray Vickson

The $\omega$ will be related to the fifth roots of $-1$, because the denominator is $(x^5+1)/(x+1)$. WA likely did a partial-fraction expansion using these roots of the denominator.

Maple 11 gets the integral as
-3/10*5^(1/2)*ln(2*x^2-x-5^(1/2)*x+2)+5/(10-2*5^(1/2))^(1/2)*arctan((4*x-1-5^(1/2))/(10-2*5^(1/2))^(1/2))-7/5/(10-2*5^(1/2))^(1/2)*arctan((4*x-1-5^(1/2))/(10-2*5^(1/2))^(1/2))*5^(1/2)+3/10*5^(1/2)*ln(2*x^2-x+5^(1/2)*x+2)+7/5/(10+2*5^(1/2))^(1/2)*arctan((4*x-1+5^(1/2))/(10+2*5^(1/2))^(1/2))*5^(1/2)+5/(10+2*5^(1/2))^(1/2)*arctan((4*x-1+5^(1/2))/(10+2*5^(1/2))^(1/2))

To parse this properly, you need to know that in ASCII, Maple prints a^b*c to mean (a^b)*c.

When differentiated, the above produces a result that looks quite different from the original integrand, but when the difference between the two is plotted, it produces a plot of random roundoff noise. Probably, with more work one could demonstrate the equality of the two.

4. Jun 26, 2013

### ehild

Note that the numerator multiplied by x+1 is -x^4+x^3-x^2+x+4= - denominator +5, and the denominator multiplied by x+1 is x^5+1. You can find the complex roots of x^5+1=0 and factor it.

ehild

Ray beat me by 1 minute :)

5. Jun 26, 2013

### lurflurf

The wolfram alpha answer is the same as you would get from partial fractions.

6. Jun 26, 2013

### ehild

(x+1)(x^4-x^3+x^2-x+1)=x^5+1.

X^5+1=0 has got the roots exp(i(2k+1)∏/5) for k=0,1,2,3,4.

X^5+1 can be factored as

x^5+1=(x-ei∏/5)(x-ei3∏/5)(x-ei5∏/5)(x-ei7∏/5)(x-ei9∏/5)

The product of the first and last factor is
(x-ei∏/5)(x-ei9∏/5)=(x-ei∏/5)(x-e-i∏/5)=x2-2cos(∏/5)+1.

In the same way, (x-ei3∏/5)(x-ei7∏/5)=x2-2cos(3∏/5)+1.

It is known (or you can prove ) that cos(∏/5)=(1+√5)/4 and cos(3∏/5)=(1-√5)/4.

So the denominator in the integrand can be factored as
(x2-x(1+√5)/2+1)(x2-x(1-√5)/2+1).

ehild

7. Jun 26, 2013

### jackmell

The Mathematica answer is a nicely-concise representation of the antiderivative. It's a rootsum: a sum over the roots of a polynomial. This is what I think you should do. Solve (via partial fractions):

$$\int \frac{-x^3+2x^2-3x+4}{(x-a)(x-b)(x-c)(x-d)}dx$$

and then see if you can formulate your answer in terms of a rootsum.

Last edited: Jun 26, 2013