Give an integrable function $h$ on $[a,\,b]$. Let $f(x) = \int_{a}^{x} h$ for all $x\in [a,\,b]$. Prove that $f$ is differentiable almost everywhere on $(a,\,b)$\
My attempt: I tried to show that $f$ is differentiable on any subinterval $[c,d]\subset (a,b)$, but I could not see how to use the assumption $h$ is integrable despite spending several hours. Can anyone please help me with this problem?
Note that
$$h = h^+ - h^-,$$
where
$$h^+ = \max(h,0) \geqslant 0, \\ h^- = \max(-h,0) \geqslant 0. $$
Then
$$f(x) = \int_a^x h^+ - \int_a^xh^-.$$
Since $f$ is the difference of two monotone increasing functions, it is of bounded variation and is differentiable almost everywhere.