This whole argument is stupid, the definition given doesn't make sense. Because given the piecewise portion the integral is 0. You can't just define it to be 1 and make sense.
I'm going to create the Hitler function, f(x) from R->R, it's value is 6 million everywhere, but I define its integral from -inf to inf to be 0. There you go. Prove that's not a function.