# Integration of 1/x

1. Oct 28, 2012

### kuskus94

First, I apologise that I have posted this question in the wrong section. I should have posted it in the precalculus section.

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

$$\int \frac {1}{u^2+3u+2} du$$

2. Relevant equations

$$\int \frac {1}{x} dx = ln{x}$$

We know that $$\frac {d(ln(u^2+3u+2))}{dx}$$
$$=\frac {1}{u^2+3u+2} * \frac {d(u^2+3u+2)}{dx}$$
$$= \frac {2u+3}{u^2+3u+2}$$
3. The attempt at a solution

To remove the $$2u+3$$ is by multiplying $$\frac{1}{2u+3}$$

In the end, i get $$\int \frac {1}{u^2+3u+2} du = \frac {ln(u^2+3u+2)}{2u+3}$$.

Is this correct?

Can I use subtitution?

$$\int \frac {1}{u^2+3u+2} du = \int \frac {1}{a} \frac{da}{2u+3} =\frac{1}{2u+3} \int \frac {1}{a}da$$

for $$a = u^2+3u+2$$
$$\frac {da}{du} = 2u+3$$
$$\frac {da}{2u+3} =du$$

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

### Saitama

No, this is not correct.

A better approach would be to convert the denominator in a perfect square. For example:
$$x^2+x+1=(x+\frac{1}{2})^2+\frac{3}{4}$$
This could be then evaluated using the standard integral ∫dx/(x^2+a^2) where a is a constant.

3. Oct 28, 2012

### Millennial

Another approach :
The denominator has the quadratic $x^2+3x+2$, which is equal to $(x+2)(x+1)$. Now, we can use partial fractions:
$$\frac{1}{x^2+3x+2}=\frac{1}{(x+2)(x+1)}=\frac{A}{x+2}+\frac{B}{x+1}$$
Would you solve that and then integrate?

4. Oct 28, 2012

### lurflurf

hint
$$d \log(\frac{p}{q})=\frac{q dp-p dq}{p q}$$

5. Oct 28, 2012

### kuskus94

Wait, shouldn't it have to be in a form like $$\frac{1}{x(x-2)^2}=\frac{A}{x}+\frac{B}{(x-2)^2}+\frac{C}{x-2}$$

I still don't get it. Is the "d" coefficient or the symbol of differentiation?

Last edited: Oct 28, 2012
6. Oct 28, 2012

### Staff: Mentor

???
Why would it have this form. x2 + 3x + 2 = (x + 2)(x + 1). Where are you getting x(x - 2)2?
The d is part of a differential - it is not a coefficient.

7. Oct 29, 2012

### aralbrec

You can do this but your last step is wrong. u is not independent of a, it is a function of a so you cannot take it out of the integral. You can solve for u from $$a = u^2+3u+2$$ and stick that into the last step but as you see, it will not bring you closer to a solution.

To use the ln thing you are trying to use, the derivative of the denominator should appear in the numerator of the integrand. There's no obvious way to do that in this case so you should try another method. If you see a polynomial in the denominator, factoring it is usually a good first step as someone else pointed out already.

8. Oct 29, 2012

### kuskus94

Oh, it was just an example... :)

How can I put it into the form of log?

So, the first thing I have to do is factorizing the denominator
$$\int \frac {1}{u^2+3u+2} du=\int \frac {1}{(u+2)(u+1)} du$$
and after that, I should get something like
$$=\int (u+2)^{-1}(u+1)^{-1} du$$
then, assume that (u+2) is q and (u+1) is p
$$=qp-\int p dq$$
Is this correct?

Last edited: Oct 29, 2012
9. Oct 29, 2012

### Staff: Mentor

The form above is no help.
No. Integration by parts is not the way to go. Instead, use partial fraction decomposition to write $\frac{1}{(u + 2)(u + 1)}$ as $\frac{A}{u + 2} + \frac{B}{u + 1}$. The goal here is to find constants A and B so that the two sides are identically equal.

Once you have found A and B, you can write your integral as
$$\int \frac{Adu}{u + 2} + \int \frac{Bdu}{u + 1}$$

(This assumes that you have already found A and B.) The integrals above are where the ln part comes from.

10. Oct 30, 2012

### kuskus94

Okay, I am having trouble on determining the A and B.

$$\frac {1}{(u+2)(u+1)}$$

$$\frac {A}{(u+2)} + \frac {B}{(u+1)}$$

$$\frac {A(u+1)+B(u+2)}{(u+2)(u+1)}$$

$$A(u+1)+B(u+2)=1$$

There are two constants that I can not determine its value.

Or is it something like this :

$$1 = Au+A+Bu+2B$$
$$1 = Au+Bu+A+2B$$
$$1 = u(A+B)+(A+2B)$$

since there is no u, it is considered its constant is 0

$$(A+B) = 0$$
$$A=-B$$

and

$$(A+2B) = 1$$
$$-B+2B=1$$
$$B=1$$
$$A=-1$$

$$=\int \frac{-1 du}{u + 2} + \int \frac{1 du}{u + 1}$$

$$= - ln(u+2) + ln(u+1)$$

11. Oct 30, 2012

### Staff: Mentor

1=Au+Bu+A +2B, or
1 = (A + B)u + A + 2B

Since this equation has to be identically true (i.e., true for all values of u), then it must be the case that
A + B = 0 and
A + 2B = 1

From the first equation, A = -B

Substituting into the second equation, we have
-B + 2B = 1, so B = 1 and A = - 1

This is what you got, but I'm trying to explain what it is that you're doing.

$$\int \frac{du}{(u + 1)(u + 2)} = -ln(u + 2) + ln(u + 1) + C$$

How can you check to see if an antiderivative is correct?

12. Oct 31, 2012

### kuskus94

By differentiating it?

$$\frac {d(-ln(u + 2) + ln(u + 1) + C)}{du}$$
$$= \frac{-1}{(u+2)} + \frac {1}{(u+1)}$$
$$= \frac {-(u+1)+(u+2)}{(u+2)(u+1)}$$
$$= \frac {1}{(u+2)(u+1)}$$

13. Oct 31, 2012

### Staff: Mentor

14. Oct 31, 2012

### aralbrec

There is a shorter way to do this. The equation has to be true for all values of u. So in your last step, what happens if u=-1 or u=-2.

You can get that straight from the expansion equation:

$$\frac {1}{(u+2)(u+1)} = \frac {A}{(u+2)} + \frac {B}{(u+1)}$$

Multiply both sides by (u+2) and set u=-2. Multiply both sides by (u+1) and set u=-1.

The shortcuts are a little more difficult if the denominator is second order (eg (u2+a2) or if the roots are repeated (eg (u+a)2) but you should read the section on partial fraction expansion in your textbook to learn those cases.

In any case you can always do this:

$$1 = u(A+B)+(A+2B)$$

and equate corresonding coefficients of un as you've done.