Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Antiderivative of 1/x

  1. Nov 4, 2015 #1
    We are going over antiderivatives in my calculus course and reached a question regarding ##f(x) = \frac {1}{x}##.

    My instructor went on to say that ##\int \frac {1}{x}dx = \ln |x| + C##. This makes sense to me, but only to a certain point. For ##f(x) = \frac {1}{x}##, ##f## is defined ##\forall x \neq 0##. So we should have two interavls which we are looking at: ##x < 0## and ##x > 0##. Because of this, we would then have:

    [tex] \int \frac {1}{x}dx = \ln |x| + C_1 \qquad x > 0 [/tex]
    [tex] \text {and} [/tex]
    [tex] \int \frac {1}{x}dx = \ln (-x) + C_2 = \ln |x| + C_2 \qquad x < 0 [/tex]

    The second integral comes into being because ##-x > 0## when ##x<0##. I brought this up to my teacher and he said that it made no sense and served no purpose to look at it this way. The argument I brought up was that the constants of integration could be different for the two intervals. I was hoping some of you may be able to help me explain why this is the case, or, if I am wrong, explain to me why I am.

    Thanks!
     
  2. jcsd
  3. Nov 4, 2015 #2

    pwsnafu

    User Avatar
    Science Advisor

    You are correct. The "constant of integration" is constant over connected components of the domain. See also Wikipedia's article on antiderivative.
     
  4. Nov 4, 2015 #3

    fzero

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    It's an interesting idea, but the problem is that
    $$ \frac{d}{dx} \ln (-x) = - \frac{1}{x},$$
    instead of ##1/x##, so this isn't an antiderivative.
     
  5. Nov 4, 2015 #4

    pwsnafu

    User Avatar
    Science Advisor

    No ##\frac{d}{dx} \ln(-x) = \frac{1}{x}##
     
  6. Nov 4, 2015 #5
    If we are considering ##x < 0##, ##-x > 0## so
    [tex] \frac {d}{dx} \ln (-x) = \frac {1}{x} [/tex]

    Also, by the chain rule where ## u = -x##, ##\frac {du}{dx} = -1##, and

    [tex] \frac {d}{dx} \ln(-x) = \frac {1}{-x}(-1) = \frac {1}{x} [/tex]
     
  7. Nov 4, 2015 #6
    You are completely correct. There are two different constants of integration. Your teacher must not be very good if he doesn't know this.
     
  8. Nov 4, 2015 #7

    pwsnafu

    User Avatar
    Science Advisor

    Seconded. This
    worries me. Mathematics is not concerned with with whether something "serves a purpose". There is plenty of mathematical research that serves no purpose other than itself.
     
  9. Nov 4, 2015 #8
    I appreciate the replies thus far. I suppose I'm having a hard time developing an argument for my case to propose to him.
     
  10. Nov 4, 2015 #9

    PeroK

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Essentially, you are correct. You can demonstrate this by taking:

    ##f(x) = ln|x| + 1 \ (x < 0)## and ##f(x) = ln|x| + 2 \ (x > 0)## and checking that ##f'(x) = \frac{1}{x} \ (x \ne 0)##

    Usually, however, you are only dealing with one half of the function : ##x < 0## or ##x > 0##. This is because an integral is defined for a function defined on an interval. For the function ##\frac{1}{x}##, you can't integrate it from on, say, ##[-1, 1]## because it's not defined at ##x = 0##.

    So, strictly speaking, what the integration tables are saying is:

    a) For the function ##\frac{1}{x}## defined on the interval ##(0, +\infty)##, the antiderivative is ##ln|x| + C##

    b) For the function ##\frac{1}{x}## defined on the interval ##(-\infty, 0)##, the antiderivative is ##ln|x| + C##

    In that sense, you don't need different constants of integration.
     
  11. Nov 4, 2015 #10
    I see no reason not to define the undefined integral on more general sets.
     
  12. Nov 4, 2015 #11
    Why did you arbitrarily chose ##C_1 = 1## and ##C_2 = 2## in the first part of your response?

    I understand that the antiderivative is defined only on intervals where the base function is defined, which means our integral is only defined on ##(-\infty, 0) \cup (0, \infty)##. However, when I think of a constant added to a function, I simply think of a vertical shift. I understand that ##f(x) = \frac {1}{x}## has to have two independent antiderivatives as a consequence of the discontinuity, but I cannot see why it is necessary that the constants have to be different. Of course, a difference in constants is the only way that the two sides can be different, because we've already shown that, ignoring the added constant, the two sides have identical antiderivatives.

    Am I making any sense? Sorry, and thanks again.
     
  13. Nov 4, 2015 #12

    PeroK

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Why not?

    A couple of technical points:

    1)"The" antiderivative is actually an equivalence class of functions. "An" antiderivative is one of the functions from that class. For example:

    ##sin(x) + C## (where ##C## is an arbitrary constant) is the antiderivative of ##cos(x)##; and ##sin(x) + 6## is an antiderivative (one particular function from the antiderivative class).

    2) There is no such thing as "the" function ##1/x##, as a function depends on its domain. ##1/x## defined on ##(0, \infty)##, ##1/x## defined on ##(-\infty, 0)## and ##1/x## defined on ##(0, \infty) \cup (-\infty, 0)## are three different functions.

    The antiderivative of ##1/x## defined on ##(0, \infty) \cup (-\infty, 0)## is ##ln|x| + C_1 \ (x < 0)##; ##ln|x| + C_2 \ (x > 0)##. Where ##C_1## and ##C_2## are arbitrary constants. This is the full class of functions which, when differentiated, give ##1/x##.

    The two separate functions ##1/x## defined on ##(0, \infty)##, and ##(-\infty, 0)## both have the antiderivate ##ln|x| + C##, where ##C## is an arbitrary constant, defined on the appropriate interval.

    There is, therefore, a subtle difference.
     
  14. Nov 4, 2015 #13

    HallsofIvy

    User Avatar
    Science Advisor

    Look at f(x)= ln(|x|)+ 9 for x> 0 and ln(|x|)+ 4 for x< 0. That function is differentiable for all non-zero x and its derivative is 1/x.
     
  15. Nov 4, 2015 #14
    Your second point was very well said, and is certainly something I'll carry with me. So unless a particular domain is specified, such as ##(0, \infty)##, I have to include the ##\ln|x| +C_1 \quad (x < 0); \quad \ln |x| + C_2 \quad (x > 0)##.

    I suppose my issue is coming from the fact that, when I see ##f(x) = \frac {1}{x}##, I imagine the standard hyperbola ##f(x) = \frac {1}{x}## defined on ##(- \infty, 0) \cup (0, \infty)##. Now, when I imagine the function ##f(x) = \ln x##, I think automatically of this graph:

    http://www.wolframalpha.com/share/img?i=d41d8cd98f00b204e9800998ecf8427eq1tuvuvmvh&f=HBQTQYZYGY4TMNJQMQ2WEZTBGUYDCNJQMQ3DAODGGAZTAMBQGI4Qaaaa But I've also seen this graph: 8cd98f00b204e9800998ecf8427e783rrt1us&f=HBQTQYZYGY4TONJQHAZDKNDDGAYDCNJQMQ3DAYRUG43DQMJUGQYAaaaa.gif

    Which should I be thinking of for this problem?
     
    Last edited: Nov 5, 2015
  16. Nov 4, 2015 #15

    Mark44

    Staff: Mentor

    The second graph looks like it is probably f(x) = ln|x|.
     
  17. Nov 5, 2015 #16
    You're right. I wonder why Wolfram interprets it that way, but only uses the right-hand side of the graph when I set it to show real values.
     
  18. Nov 5, 2015 #17

    Mark44

    Staff: Mentor

    What was the equation you graphed? If you entered the integral in post #1 of this thread, the antiderivative is ln|x| (plus the constant).
     
  19. Nov 5, 2015 #18
    I graphed ##f(x) = \frac {1}{x}## and got the funky results. Graphing ln|x| gave me what I needed. But if I'm given ##f(x) = \frac {1}{x}##, with no specification of the domain, I end up with ##F(x) = \ln |x| + C_1, \quad (x < 0); \ln|x| + C_2, \quad (x > 0).##

    What's weird is that when I look at the graph of ln|x|, the two halfs seem connected (obviously, they aren't - there's a discontinuity at ##x=0##), so it's hard for me to imagine why the two sides need different constants of integration. That would mean the two bits move around independently, and I can't at all think of an example of that if ##f(x) = \frac {1}{x}## with nothing else added.

    I hope that makes some sense. I'd love to get some graphical insights - I think that would help me out a bit. Sorry for asking so much on what seems to be a fairly simple topic!

    (Also, thanks for chiming in, Mark44. I can always count on you and Micromass to respond).
     
  20. Nov 5, 2015 #19

    PeroK

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    I suggest that you are getting yourself a bit confused over this. And, I guess this is why your maths instructor is saying it's not useful. There is nothing special about ##1/x##. Any function ##1/x^n## has the same issue. Wolfram Alpha, for example, doesn't get into this subtlety of having different constants of integration. The same with tan(x) - you could have a different constant of integration on each interval upon which it's defined.

    The key point is this. Suppose I have a differential equation:

    ##f'(x) = x^2## and ##f(1) = 0## ##(-\infty < x < \infty)##

    This specifies a unique function: ##f(x) = \frac{1}{3}(x^3 - 1)##

    But, if we have:

    ##f'(x) = 1/x## and ##f(1) = 0## ##(x \ne 0)##

    This does not specify a unique function. We also need a value for some ##x < 0##. For example:

    ##f'(x) = 1/x##, ##f(1) = 0## ##f(-1) = 1## ##(x \ne 0)##

    The differential equation, therefore, splits into two:

    For ##x > 0## we have ##f(x) = ln|x| + C##, ##f(1) = C = 0##, hence ##f(x) = ln|x| (x > 0)##

    For ##x < 0## we have ##f(x) = ln|x| + C##, ##f(-1) = C = 1##, hence ##f(x) = ln|x| + 1 (x < 0)##

    Now, of course, you could use ##C_1## and ##C_2## instead of reusing the symbol ##C## as I have done. But, it hardly matters. The important point is that the integration and differentiation for a function like ##1/x## must be done separately on each contiguous interval on which it's defined.

    One final point. You can have the same situation with any function. Suppose we have:

    ##f'(x) = x \ (-2 < x < -1## and ## 1 < x < 2)##

    Then we are specifying a differential equation across two discontiguous intervals, hence we need two initial values, as there is a different constant of integration on each interval.
     
  21. Nov 5, 2015 #20
    About the wolfram issue. Wolfram alpha is a very good software but not infallible. In particular, here it is (strictly speaking) wrong.

    First about this:

    3DHBQTQYZYGY4TONJQHAZDKNDDGAYDCNJQMQ3DAYRUG43DQMJUGQYAaaaa&hash=140d4d4ed867f41a8111b5126a5d654c.png
    When asked how to integrate ##1/x##, wofram alpha somehow involves complex numbers. Furthermore, it will only show one particular primitive.
    So when you ask for the primitive of ##1/x##, wolfram accurately calculates the following primitive: ##f(x) = \text{ln}(x)## for ##x>0## and ##f(x) = \text{ln}(x) + \pi i## for ##x<0##. (The explanation for why ##\pi i ## is involved requires complex analysis). Anyway, this is a correct primitive as you can differentiate it to get ##1/x##. Wolfram alpha is wrong however to say that any other primitive is of the form ##f(x) + C##. Rather, it is of the form ##f(x) + C_1## for ##x>0## and ##f(x) + C_2## for ##x<0##. In particular, we can choose ##C_1 = 0## and ##C_2 = -\pi i##, to get ##\text{ln}|x|##.

    Then this:
    3DHBQTQYZYGY4TMNJQMQ2WEZTBGUYDCNJQMQ3DAODGGAZTAMBQGI4Qaaaa&hash=2e9f29b7298c05ef7990e5b31d5c8188.gif
    So if you want only the real values, then wolframalpha works with the same primitive ##f## that has already been computed. But this primitive is complex for ##x<0## and thus wolfram ignores it. So that is why it only shows ##f(x)## for ##x>0##. There is a primitive that takes only real values (namely ##\text{ln}|x|##), but wolfram does not compute it and erroneously states that the real primitive only exists for ##x>0##.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Antiderivative of 1/x
  1. Antiderivative of x^x (Replies: 1)

Loading...