How do you solve #int_4^-2 |x-1|dx#?

1 Answer
Aug 10, 2016

#-9#

Explanation:

Firstly, you evaluate rather than solve ;-)

But moving on to the real stuff, we just need to break that absolute vaue thing out

#|x-1| =-( x-1), x in (-oo,1]#
and
#|x-1| = x-1, x in [1, oo)#

so first we split the integral

#int_4^-2 |x-1|dx #

#= int_4^1 |x-1| \ dx + int_1^-2 |x-1| \ dx #

#= int_4^1 x-1 \ dx + int_1^-2 -(x-1) \ dx #

switching the limits on the second integral
#= int_4^1 x-1 \ dx + int_-2^1 x-1 \ dx #

#= [ x^2 / 2 - x]\_4^1 + [ x^2/2-x ]_(-2)^1 #

#= 2 [ x^2 / 2 - x]\_(x=1) - [ x^2/2-x ]_(x=4) - [ x^2/2-x ]\_(x=-2)#

#= 2 [- 1/2] - [4 ] - [ 4 ] = -9#

We could also have recognised the symmetry, namely that the

#int_4^-2 |x-1|dx = 2 int_4^1 x-1 \ dx #

which becomes apparent from sketching the function itself

enter image source here