If $f$ is integrable, $g$ bounded, and they coincide everywhere except on a set of measure zero, then $g$ is integrable

I need to prove that:

If $f[a,b]\to \mathbb{R}$ is an integrable function and $g:[a,b]\to \mathbb{R}$ is bounded, then if $g$ coincides with $f$ except in a set that has measure zero, then $g$ is integrable and $\int g = \int f$

I can use the theorem that if the set of discontinuities of $f$ has measure zero and $f$ is bounded, then $f$ is integrable. I tried thinking about something like:

$$\int f-g$$

the function $f-g=0$ everywhere except in a set which has measure $0$, therefore $\int f-g = 0$ by another theorem, I guess one that talks about the integral being equal the integral of the function where the measure is not $0$?

Could somebody help me? I don't know if I'm in the right track and I don't know which theorems more I can use, I was just given this one.

• Put parentheses in please: $\int(f-g).$ – zhw. Oct 5 '16 at 3:02
• If you know how to prove the theorem you mentioned, then more or less the same proof can be used to prove that if $h = 0$ except on a set of measure zero, then $\int h = 0$. Then you can, as you said, just take the integral of $f - g$ to conclude your result. – Ethan Alwaise Oct 5 '16 at 3:36