# Integral of (x-4)/(x^2-x+2)

1. Oct 30, 2013

### Nicolaus

1. The problem statement, all variables and given/known data
$\frac{x-4}{x^2-x+2}$

2. Relevant equations

3. The attempt at a solution

$\frac{x-4}{(x-1/2)^2+7/4}$
u = x - 1/2 = $\frac{\sqrt{7}}{2}$tan$\theta$ ; du = $\sqrt{7}$/2 sec^2(theta)
x = u + 1/2
$\int\frac{(u−7/2)(\sqrt{7}/2sec^2(\theta)}{7/4 sec^2(\theta)}$

This simplifies to: $\int tan(\theta) - \sqrt{7}$
= ln(sec(theta)) - $\sqrt{7}$(theta)
= ln($\frac{\sqrt{(2x-1)^2+7}}{\sqrt{7}}$) - $\sqrt{7}$arctan($\frac{2x-1}{\sqrt{7}}$) + C

2. Oct 30, 2013

### Staff: Mentor

Do you have a question?

You can check your answer by differentiating. If you end up with the same as the original integrand, your answer is correct. It's pretty messy, but if you use log properties before you differentiate, that will make things a lot simpler.

Another approach that is probably simpler is to split up the integrand using partial fractions.

3. Oct 30, 2013

### iRaid

I cant think of any "tricks" to solving this. I don't see how you could use partial fractions either... Did you make this problem up?

4. Oct 30, 2013

### Staff: Mentor

Yeah, on second thought, partial fractions wouldn't be as easy as I thought. The factors would include complex numbers.

5. Oct 30, 2013

### Saitama

It is quite easy to solve the given integral.

Rewrite it as
$$\frac{1}{2}\int \frac{2x-1}{x^2-x+2}dx-\frac{7}{2}\int\frac{dx}{x^2-x+2}$$

Both the integrals can be easily solved.

6. Oct 30, 2013

### iRaid

How did you even think of that o.o and it still is pretty difficult to solve the 2nd one.

7. Oct 30, 2013

### Dick

You complete the square, just like Nicolaus did in the OP. Everybody here knows that the answer in the first post is correct, yes? The only problem with it is that the log term is in a pretty awkward form.

8. Oct 30, 2013

### Nicolaus

I am just wondering if that is correct. Ya, the log form is messy.
To simplify that:

ln((2x−1)2+7√7√) - 7√arctan(2x−17√) + C
= 1/2(ln(2x-1)^2+1) - ln(7))

So, the integral in the OP is correct, right?

9. Oct 30, 2013

### Dick

Yes it's correct, but I could read the integral in the OP. I can't read what you have written there or what you are thinking.

10. Oct 31, 2013

### ehild

The solution looks a bit simpler in the form $1/2 \ln |x^2-x+2|-\sqrt7 \arctan(\frac{2x-1}{\sqrt7})+C$

ehild

11. Nov 1, 2013

### sankalpmittal

iRaid, the question can not be solved by partial fractions. The method is as follows :

You have to get the form Pranav got. I would tell you how ?

Method I: By inspection: Just break the fraction and try to get the form f'(x)dx/f(x)...

Method II :

Let,

x-4=λd(x2-x+2)/dx + μ

You can find λ, and μ by comparing the coefficients. Then break the fraction to get,

FORM : Integral of Derivative of function/Function + Integration of reciprocal of a quadratic.

The second one is integrated by method of perfect squares which I hope you know.