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

Integral of absolute value function

  1. May 23, 2015 #1
    how do i evaluate say a definite integral from [-3,3] of |x+1|? Any advice? I'm so confused.
     
  2. jcsd
  3. May 23, 2015 #2

    Mark44

    Staff: Mentor

    Do this by getting rid of the absolute value. How is |x + 1| defined? If you're not sure of this, draw a graph of y = |x + 1|.
     
  4. May 23, 2015 #3

    micromass

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2016 Award

    Split up the integral in two parts.
     
  5. May 24, 2015 #4

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    Notice that the specific problem given, ##\int_{-3}^3 |x+ 1|dx## can be done by finding the area of two triangles and adding!
     
  6. May 24, 2015 #5
    Will this integral be equivalent to adding the two integrals together: (x+1)dx from 0 to 3 with (x+1)dx from 0 to 2?
     
  7. May 24, 2015 #6
    You should do the following:
    Graph the function. Notice where it changes from one function to the other. Notice you are looking at two triangles
    Now - consider what the functions are over each triangle. See if you cannot make an integral made up of two parts.
    Remember that when you drop the abs value you are left with TWO cases.
     
  8. May 24, 2015 #7
    Is this correct? integral(x)dx from 0 to 4 + integral(x)dx from 0 to 3?
     
  9. May 24, 2015 #8
    could you post your graph? I am not sure where you are deriving this equation.
     
  10. May 24, 2015 #9

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    No, that's not at all correct and I don't see how you could have got that from anything said here! Have you drawn the graph of this function as suggested? Have you at least determined where x+ 1= 0? Do you see why that is important? Do you see the two triangles I mentioned?
     
  11. May 25, 2015 #10
    Okay so i drew the graph of |x+1. It looks like a big V that touches the x axis at -1. To me and my nooby brain, it makes sense that the area would be equal to the integral of x(dx) from 0 to 2 plus the integral of x(dx) from 0 to 4. This is because i am finding the total area under the graph from -3 to 3, the slope of the graph is 1, and it touches the x axis at x = -1. Therefore, the total area under this V i have drawn will be equal to area of the graph of just x from 0 to 4 plus a graph of x from 0 to 2.

    So basically i'm saying the integral from -1 to -3 of x+1 is going to equal the integral of 0 to 2 of x, and the integral from -1 to 3 of x+1 is going to equal the integral of 0 to 4 of x.
     
  12. May 25, 2015 #11

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    The way you say that is a little confusing! First you want to integrate from -3 to -1, not the other way around! But yes, the substitution [itex]y= x+ 1[/itex] changes [itex]\int_{-3}^{-1} |x+1|dx[/itex] to [itex]\int_{-2}^0|y|dy= -\int_{-2}^0 y dy[/itex].

    I will point out again that this can be written as the sum of the areas of two triangles. Perhaps you can use that to check your result.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook