# What am I doing wrong integrating with 1-|x|?

1. Jan 20, 2014

### zmalone

I understand $\int$$^{1}_{-1}$1-|x|dx = 1 visually just by graphing it and taking the area of the triangle but for the sake of more complicated examples I'm not exactly sure what step I'm messing up when I use the FTOC:

|x|= x when x>0, -x when x<0

$\int$$^{0}_{-1}$1-|x|dx + $\int$$^{1}_{0}$1-|x|dx

= $\int$$^{0}_{-1}$1-(-x)dx + $\int$$^{1}_{0}$1-(x)dx

= $\frac{x^2}{2}$|$^{0}_{-1}$ - $\frac{x^2}{2}$|$^{1}_{0}$

= -1/2 - 1/2 = -1 $\neq$1

Any input is appreciated and hope this makes sense lol (still getting used to the formula drawer).

2. Jan 20, 2014

### tiny-tim

hi zmalone! welcome to pf!
you missed out [x]-11, = 2

3. Jan 20, 2014

### zmalone

Wow :( I don't know why I was taking the derivative of 1 instead its anti-derivative but I certainly confused myself by doing so for the past half hour. Thanks for pointing it out!