# When to use 'ln' in integration?

1. May 20, 2010

### Shaybay92

I get confused when it is 'ok' to use the natural logarithm when integrating a function. As soon as I see a denominator, I am always tempted to simply go 'ln(denominator)/d denominator)' but this is clearly wrong....

Is it wrong in situations where you have a polynomial denominator? For example

Integral 1/(x^2 + 2x + 5) dx... would this be ln(x^2 + 2x + 5) / 2x + 2?

2. May 20, 2010

### CompuChip

You can always check it by differentiating your anti-derivative and checking if you get the integrand back.
When you have something like
$$\int \frac{1}{2x + 3} \, dx$$
and you "guess"
$$\frac{\ln |2x + 3|}{2}$$
you can differentiate and see that it nicely works out (you need the chain rule, which gives a factor of 2 cancelling the denominator).

However, if you try that for
$$\frac{\ln(x^2 + 2x + 5)}{2x + 2}$$
you have to use a more complicated rule (e.g. quotient or product + chain rule) to differentiate, you don't just get
$$\frac{1}{x^2 + 2x + 5} \frac{2x + 2}{2x + 2}$$
but it is followed by "+ .... something you don't want ... "

So in this case you need to come up with something better. For example, in this quadratic function, you can try "completing the square": if you write
$$\frac{1}{x^2 + 2x + 5} = \frac{1}{(x + a)^2 + b}$$
you can substitute $u = (x + a) / \sqrt{b}$ and use that
$$\int \frac{1}{1 + u^2} \, du = \operatorname{arctan}(u)$$

3. May 25, 2010

### Shaybay92

Thanks for the help!