# Integration of a quotient with a factor in the denominator that has no real root

1. Oct 22, 2012

### Naridax

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

$$\int \frac{x-1}{(x+1)(x^2+1)} dx$$

2. Relevant equations

N/A

3. The attempt at a solution
I thought that I would use partial fractions, so:

$$\frac{x-1}{(x+1)(x^2+1)} = \frac{A}{x+1} + \frac{B}{x^2+1}$$
$$x-1 = A(x^2+1) + B(x+1)$$
$x=-1 \Rightarrow (-1)-1 = A((-1)^2+1) + B((-1)+1) = 2A \Rightarrow A = -1$

I don't think my instructor wants me to use complex numbers, but $\forall x\in\mathbb R, x^2+1 \neq0$ and $x^2+1$ is irreducible in $\mathbb R$.

Last edited: Oct 22, 2012
2. Oct 22, 2012

### Staff: Mentor

Your decomposition is incorrect. For the second fraction on the right side, use
$$\frac{Bx + C}{x^2 + 1}$$

3. Oct 22, 2012

### Naridax

Okay, if I use that, then
$$\frac {x-1}{(x+1)(x^2+1} = \frac {A}{x+1} + \frac {Bx+C}{x^2+1} \Rightarrow x-1 = A(x^2+1) + (Bx+C)(x+1),$$
but won't I still need to use the imaginary number $i$?

Last edited: Oct 22, 2012
4. Oct 22, 2012

### SammyS

Staff Emeritus
You shouldn't need to use the imaginary unit, i .

Simply equate the constant terms and equate coefficients of x and equate coefficients of x2

5. Oct 22, 2012

### Naridax

If I do you use $i$, then
$$x=i \Rightarrow (i)-1 = A((i)^2+1) + (B(i)+C)((i)+1)$$
$$= A((-1)+1) + (Bi^2+Bi+Ci+C) = (0) + (-B+Bi+Ci+C)= (B+C)i + (C-B).$$
Two complex numbers are equal only if both their real and imaginary parts are equal, so
$$Im(i-1) = 1 = B+C = Im((B+C)i + (C-B)), Re(i-1) = -1 = (C-B) = Re((B+C)i + (C-B)).$$
The system of equations
$$1 = B+C$$
$$-1= -B+C$$
has solutions $C=0, B=1$. Then,
$$\int \frac{x-1}{(x+1)(x^2+1)} dx = -\int \frac{dx}{x+1} + \int \frac{x}{x^2+1} dx = -\ln|x+1|+\frac{1}{2}\ln|x^2+1|+C = ln\frac{\sqrt{x^2+1}}{x+1}+C$$

Does this look right?

I don't quite understand.

Actually, I think I understand now.

$$x-1=A(x^2+1)+(Bx+C)(x+1)=Ax^2+A+(Bx^2+Bx+Cx+C)=(A+B)x^2+(B+C)x+(A+C)$$
Noticing that $x-1=0x^2+x-1$, I get the following equalities
$$0=A+B$$
$$1=B+C$$
$$-1=A+C.$$
If $A=-1$, then I get the same values for B and C and the same answer to this question as I did when I used $i$ to solve this question.

Last edited by a moderator: Oct 22, 2012
6. Oct 22, 2012

### Staff: Mentor

Why don't you check it yourself? If you differentiate what you ended up with, you should get your integrand.
When you solve for the constants (A, B, and C in this case), the equation x−1=A(x2 +1)+(Bx+C)(x+1) is identically true for all values of x. The only way two polynomials, x - 1, and the one on the right, can be equal is for their corresponding coefficients to be equal. Since x - 1 doesn't have an x2 term (meaning that the coefficient of x2 is 0), the coefficient of x2 on the right has to be 0 as well. On the left, the coefficient of x is 1, so the coefficient of x on the right also has to be 1. Finally, the constant term on the left is -1, which must be the same as the constant term on the right.

You have 3 variables, A, B, and C. Use any values of x to get three equations in these unknowns. Using i is probably more work than it's worth.

Last edited: Oct 22, 2012
7. Oct 22, 2012

### Naridax

Yeah, I realized that, but it took a while to edit my previous post. Thank you for your help. :)

And it all works out when I differentiate my answer! Thanks again.

Last edited: Oct 22, 2012