integrate(max(x,1-x), x, 0, 1)