# Integrability of a piecewise function

Define $f(x) = x$ if $x \in [2,3]$ and $f(x) = 2$ on $(3,4]$.
Prove that the function $f:[2,4] \rightarrow \mathbb {R}$ is integrable.
Is this right? Should I have a more formal proof? And is it possible to show this is integrable by using the definition or $| U(P,f)-L(P,f) | < \epsilon$?