- x + y if y < x
x - y if y >= x
so i used this:
in solving this:
i got a result of - 1/3
but the answer at back of book is 1/3
x - y for y in [0,x]
x is the maximum value
x is greater than or equal to y
x - y >= 0 so |x-y| = x-y
x - y for y in [x,1]
x is the minimum value
x is less than or equal to y
x - y <= 0 so |x-y| = -x+y
It looks to me like you just have it backwards. Give it another go.