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

Integral abs(x)

  1. Jun 8, 2005 #1
    By what logic can I (if it's true) that [tex]\int_{-2}^{0} |x| dx = \int_{0}^{2} |x| dx = 2[/tex]

    I know the areas are both the same, positive, but the integrals can be negative. Specifically, i am trying to evaluate [tex]\int_{-2}^{1} |x| dx[/tex]

    which equals 11/5 so the negative turned positive and did the nasty with the other half, so to speak.
    Last edited: Jun 8, 2005
  2. jcsd
  3. Jun 8, 2005 #2


    User Avatar
    Science Advisor
    Homework Helper

    How can the integrals be negative? Only if you integrate from right to left (from greater x to smaller x). The logic that permits you to reflect the integral is the even symmetry of the function. Since

    [tex] |-x| = |x| [/tex]

    you can do a change of variables with u = -x to transform the integral. After proving it for one arbitrary even function, it is customary to just claim the property for any even function. A similar claim holds for odd functions, but with a minus sign upon reflection, which proves that the integral of an odd function with symmetric limits must always be zero.
  4. Jun 8, 2005 #3


    User Avatar
    Homework Helper

    You could define [itex] |x| [/itex] as a piecewise function

    [tex] |x| = \left\{\begin{array}{cc}x,&\mbox{if } x \geq 0 \\-x,& \mbox{if } x < 0 \end{array}\right[/tex]

    and use the integral porperty

    [tex] \int_{a}^{b} f(x) dx = \int_{a}^{c} f(x) dx + \int_{c}^{b} f(x) dx [/tex]
  5. Jun 8, 2005 #4
    That makes sense OlderDan.

    And I did use that integral property, but w/o substution;

    [tex]\int_{-2}^{0} |x| dx + \int_{0}^{1} |x| dx = (0 - 2^2/2) + 1/2 = -2+1/2[/tex] which isn't correct.

    I guess I should just use subsitution.
  6. Jun 8, 2005 #5
    ok, i'm really not the best person to be answering, but here's my train. Picture the graph of |x| notice the obvious symmetry, and how easy it is to get the area... they're just triangles. and you can see the area of both are equal. looking at just the integrals, you have to separate the absolute value function into a piecewise function i think. so for x<0 then you have f(x)= -x, for x>0 you have f(x)=x, right? so you get something positive either way. and when you take the integrals you get -1/2 x^2 and 1/2 x^2 respectively. combined you get that the area equals 1/2 |x|^2, so now it all works out yes?

    i hope that was helpful...

    [edit] goddam i'm sooo slow... never mind....
    Last edited: Jun 8, 2005
  7. Jun 8, 2005 #6
    yeah all this makes sense, but i was taught to do F(upper limit) - F(lower limit) (F is the antiderivative) and when I do that with 0 and -2 i get a negative answer, which make sthe integral result negative. Therein lies my problem. I can do away with it by substitution or inspection, but other than that I'm not sure.
  8. Jun 8, 2005 #7
    lets see if i'm quick enough...

    so the indefinite integral for just negative x, since that's where your problem is..
    [tex]\int |x| dx = \int -x dx = -\int x dx= - \frac {x^2}{2}[/tex] notice where that negative symbol is. now you do your definite integral, and your subraction yeilds two negatives, so they cancel, and you get the correct, positive answer.
  9. Jun 8, 2005 #8
    ahh i see. I'm mixing up the variable value and its result in the absolute value function. thanks gale17.
  10. Jun 8, 2005 #9
    no problemo! at least i feel somewhat useful now. i was confused at first too if its any consolation. there's a lot of negatives kicking around there.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook