Define $\displaystyle f(x) = x $ if $\displaystyle x \in [2,3] $ and $\displaystyle f(x) = 2 $ on $\displaystyle (3,4] $.

Prove that the function $\displaystyle f:[2,4] \rightarrow \mathbb {R} $ is integrable.

Proof.

Now, I know that a theorem says that a function that is continuous over a bounded interval is integrable. And I also know that another theorem says that a function that has finitely many discontinuities over a bounded interval is also integrable. So since both x and 2 are continuous, this function 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 $\displaystyle | U(P,f)-L(P,f) | < \epsilon $?