## Recommended Posts

I am working on some problems on particle dynamics and I keep making errors originating from the following:

$\int \frac{1}{x} = log_e x$

or

$\int \frac{1}{x} = \int \frac{-1}{-x} = log_e -x$

Why is it that there are two solutions and how can I identify which is the correct one to follow?

##### Share on other sites

One can best write: ∫(1/x)dx = log(|x|) + C. This always gives correct results and no surprises.

For negative x, this results in log(-x) and for positive x this results in log(x). Also, (improper) integration through the singularity then gives the correct result.

E.g. integration from -1 to +2 yields log(|2|) - log(|-1|) = log(2) - log(1) = log(2). This is the expected result, because the infinite areas from -1 to 0 and from 0 to -1 cancel precisely.

Integration of 1/x from -2 to -1 yields log(|-1|) - log(|-2|) = -log(2). This also is correct, because the curve is below the x-axis, so we expect a negative value for the integral.

This is a somewhat sloppy description. It can be described in a much more formal way, using limits, but I think that this answer is sufficient to understand the problem.

##### Share on other sites

Thankyou very much woelen, that answers my question perfectly.

##### Share on other sites

The problem is resolved but I am still curious about something, is the absolute sign that you suggested related to the definition of logarithms in the complex plane?: $log_e(z) = log_e(|z|) + arg(z)i$

If so, why is it that the improper integration you mentioned does not work out like so? Does it make sense to have complex area?

$\int_{-1}^{2} \frac{1}{x} dx = [log_e x]_{-1}^{2} = log_e(2) - log_e(-1) = log_e(2) - (log_e(1) + \pi i) = log_e(2) - \pi i$

##### Share on other sites

You cannot do that integral. It does not exist. You have integrated over a singularity at x=0.

##### Share on other sites

As I already said in my previous post, my description was somewhat sloppy. If you really want to understand, than you have to resort to complex analysis.

http://clem.mscd.edu/~talmanl/PDFs/APCalculus/OnAnIntegral.pdf

Important notice is that ln(|x|) comes in handy, when you do real analysis, but in reality, one can also write ln(x) + C as the integral of 1/x.

Also for negative x, this works out OK. E.g. integration of 1/x from -2 to -1 gives ln(-1) - ln(-2) = ln(1) + pi*i - ln(2) - pi*i = -ln(2). In real analysis, you merely take another function (with another C) as the integral of 1/x, in order to get rid of the need to deal with pi*i. These terms with pi*i cancel out.

Integration over the singularity indeed is not possible, as Matt pointed out. It can be done, when you choose a path along the singularity over the complex plane, but in that case, you have to take into account which way you take and which branch of the logarithm is used (the log is not uniquely defined, it is a multibranched function: Log(z) = log(z) + 2*k*pi*i).

Sometimes, however, integrals through a singularity are regarded as limits of two simple real integrals. In your example: from -1 to -eps, and from +eps to +2 and then you take the limit of the sum of both integrals, while you let eps go to zero. This yields log(2). But I must admit, that this is a sloppy way of working, and not at all strictly correct. The correct way of understanding this is to use complex analysis and integrate along a curve, not through the singularity, but around the singularity.

In practical situations, also for real analysis, you do not integrate through this singularity, you either stay at the negative side only, and then it is easiest to work with ln(-x) as primitive, or you stay at the positive side only, and then the primitive of choice is ln(x).

Summarizing:

In real analysis, you take ln(x) + Cp as primitive for positive x, and you take ln(x) + Cn as primitive for negative x, with Cn and Cp different numbers. Cp usually is taken equal to 0, and Cp is taken equal to pi*i. This is "hidden" by writing ln(|x|) for the entire domain, except 0.

##### Share on other sites

Another way that you can take this: (will latexify later)

log_e(x) + C = log_e(x) + pi*i + C_2 = log_e(x) + log_e(-1) + C_2 = log_e(-x) + C_2

Therefore, the two expressions are equivalent.

=Uncool=

##### Share on other sites

As people have said already, this really wonders off into the realms of integrating around a singularity. woelen's done a pretty good job of explaining the fundamentals, but complex analysis can be, well, complex.

If you're interested in this sort of stuff then the only real understanding you're going to get is by taking a course or reading a book on complex analysis. I suggest Stewart and Tall's 'Complex Analysis', but you're going to need some background on real analysis first.

## Create an account

Register a new account