Let if and if . Show that and evaluate its integral.
I'm not sure of the latex code for partitions...
As for the integrability, try treating them as two functions and where only when and is zero otherwise.
When you show that both of those are integrable, then you know that the sum of them (which gives you f) is integrable.