# Integral of 1/x

by SprucerMoose
Tags: 1 or x, integral
 Sci Advisor PF Gold P: 1,776 Note that the function 1/x is defined for both x>0 and x<0. ln(x) has domain only x>0. So solve the two parts in pieces. What function had derivative 1/x when x< 0? answer ln(-x). What function has derivative 1/x when x > 0? answer ln(x). Define a(x) = x if x>0 and -x if x < 0 and you have the general answer ln(a(x)). This 'a' is a commonly defined function with a standard notion a(x) = |x|. Remember the definition of "the" indefinite integral of a function. It is the set of anti-derivatives i.e. the solution set of y'=f(x). So $$\int x^{-1}dx = ln|x| + c$$. One other point. If it bothers you that we must throw in that absolute value, think about how ln(x) is defined. We define it in terms of solution to an exponential equation. We could have defined the notation to be the antiderivative of 1/x and absorb the |x| into the notation: Ln(x) = ln(|x|), and then derive that Ln(x) is the "antiexponential" for positive x, (and is also an even function since 1/x is an odd function). It is a matter of historic convention that Napier considered solutions to exponential equations and we invented notation for that first.
 Math Emeritus Sci Advisor Thanks PF Gold P: 39,568 (This is in response to SpruceMoose's last post. bigubau snuck in ahead of me.) What you are talking about is the "Cauchy Principle Value" of an improper integral. If f(x) is not continuous at x= c, and a< c< b, then the standard definiton of the improper integral is $$\int_a^b f(x)dx= \lim_{\alpha\to c^-}\int_a^\alpha f(x)dx+ \lim_{\lim_{\beta\to c^-}\int_\beta^b f(x)dx$$ while the Cauchy Principal Value is $$C.P.V.\int_a^b f(x)dx= \lim_{\gamma\to 0^+}\int_a^{c-\gamma} f(x)dx+ \int_{c+ \gamma}^b f(x)dx$$ If the "standard" improper integral exists, then so does the Cauchy Principal Value and they are equal but the Cauchy Principal Value may exist when the standard integral does not. In particular, for f(x)= 1/x, a= -1, b= 1, the Cauchy principal value is $$C.P.V.\int_{-1}^1 \frac{1}{x}dx= \lim_{\gamma\to 0+}\int_{-1}^{-\gamma} \frac{1}{x}dx+ \int_\gamma^1 \frac{1}{x}dx$$ $$= \lim_{\gamma\to 0^+}\left(ln(|-1|)- ln|-\gamma|\right)+ \left(ln(1)- ln(\gamma)\right)$$ which equals 0 because everything on the left and right cancels. If we had use "$\alpha$" and "$\beta$" as in the standard definition, that would not happen and we would have $$\lim_{\alpha\to 0} ln(|\alpha|)+ \lim_{\beta\to 0} ln(|\beta|)$$ and now neither limit exists.
 Engineering Sci Advisor HW Helper Thanks P: 7,177 A more elementary way of thinking about this, if you restrict yourself to real variables, is to see (by looking at the graph of y = 1/x) that your "integral" definition of ln(x) only makes obvious sense for x > 0. From that definition, is it clear that $$\int_a^b \frac 1 x dx = \log b - \log a$$ when a and b are both positive However it is equally clear from the graph (or by substituting u = -x) what the value of definite integral $$\int_a^b \frac 1 x dx$$ is when both a and b are both negative. That explains where the |x| comes from. Personally I think the |x| notation is confusing for beginners. It's probably easier to think about the "positive" and "negative" cases separately, till you are confident about what is going on.