# Integral of absolute value function

1. May 23, 2015

### PsychonautQQ

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

2. May 23, 2015

### 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|.

3. May 23, 2015

### micromass

Staff Emeritus
Split up the integral in two parts.

4. May 24, 2015

### HallsofIvy

Staff Emeritus
Notice that the specific problem given, $\int_{-3}^3 |x+ 1|dx$ can be done by finding the area of two triangles and adding!

5. May 24, 2015

### PsychonautQQ

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?

6. May 24, 2015

### fishspawned

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.

7. May 24, 2015

### PsychonautQQ

Is this correct? integral(x)dx from 0 to 4 + integral(x)dx from 0 to 3?

8. May 24, 2015

### fishspawned

could you post your graph? I am not sure where you are deriving this equation.

9. May 24, 2015

### HallsofIvy

Staff Emeritus
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?

10. May 25, 2015

### PsychonautQQ

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.

11. May 25, 2015

### HallsofIvy

Staff Emeritus
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 $y= x+ 1$ changes $\int_{-3}^{-1} |x+1|dx$ to $\int_{-2}^0|y|dy= -\int_{-2}^0 y dy$.

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.