And when x≥y, x-y =x-y, x.
∴E[ 乸乸乸 X-Y 乸] = ∫ (0, a) dy ∫ (y, a) (x-y) f (x, y) dx+∫ (0, a) dx ∫
For reference.