# Math Help - integral of an absolute value function

1. ## integral of an absolute value function

Say you want to evaluate $\int^{2}_{0} \int^{1}_{0} |x-y| \ dx \ dy$

That's equivalent to evaluating $\int^{1}_{0} \int^{1}_{y} (x-y) \ dx \ dy \ + \int^{1}_{0} \int ^{2}_{x} (y-x) \ dy \ dx$ , right?

2. Originally Posted by Random Variable
Say you want to evaluate $\int^{2}_{0} \int^{1}_{0} |x-y| \ dx \ dy$

That's equivalent to evaluating $\int^{1}_{0} \int^{1}_{y} (x-y) \ dx \ dy \ + \int^{1}_{0} \int ^{2}_{x} (y-x) \ dy \ dx$ , right?
Yes but it would be more simple to write it

$\int^{1}_{0} \int^{x}_{0} (x-y) \ dy \ dx \ + \int^{1}_{0} \int ^{2}_{x} (y-x) \ dy \ dx$

3. What it the limits of integration were the following:

$\int^{3}_{\text{-}2} \int^{2}_{\text{-}1} |x-y| \ dx \ dy$

Can that be integrated exactly?

4. This is the same way to proceed

$\int^{2}_{-1} \int^{x}_{-2} (x-y) \ dy \ dx \ + \int^{2}_{-1} \int ^{3}_{x} (y-x) \ dy \ dx$