First we need to define the function piecewise :
f(x) = -(x + 1) , if x < -1
= x + 1 , otherwise
So given integral simplifies to :
= ( x2 / 2 + x ) |3-1 - ( x2 / 2 + x ) | -1-3
= (9/2 + 3 - 1/2 + 1) - ( 1/2 - 1 - 9/2 + 3 )
= (4 + 3 + 1) - ( - 4 - 1 + 3 )
= 8 + 2
= 10
Hence the given integral evaluates to 10