The following problem is stated as Exercise 22.A(iii) in the book Van Rooij, Schikhof: A Second Course on Real Functions.
Let $f\colon [a,b]\to{\mathbb R}$ be Lebesgue integrable and upper semicontinuous. If $v$ is an indefinite integral of $f$, then $D^+v \le f$.
This serves an auxiliary result used a few times when defining and proving some basic properties of Perron integral. The same result can be found as Theorem 5.32 in Gordon: The integrals of Lebesgue, Denjoy, Perron, and Henstock.
Here indefinite integral means that $v(y)-v(x) = \int_x^y f(t) \; \mathrm{d}t$ for each $x,y\in[a,b]$ and $D^+v$ is defined as $$D^+v(x) = \limsup_{y\to x} \frac{v(y)-v(x)}{y-x}.$$ This quantity is related to Dini derivatives, with the difference the the limit superior is not one-sided. (Some texts use the notation $\overline Dv$ instead of $D^+v$, but I used here notation from the text where I saw this problem.)
How can we show the above result?
I'll be grateful for comments on my approach posted below as an answer and also for other possible solutions.
Since $v$ is indefinite integral of $f$, we have $$v(y)-v(x) = \int_x^y f(t) \; \mathrm{d}t$$ for any $x,y\in[a,b]$.
We have \begin{align*} D^+ v(x) &= \limsup_{y\to x} \frac{v(y)-v(x)}{y-x} \\ &= \limsup_{y\to x} \frac{\int_x^y f(t) \; \mathrm{d}t}{y-x}. \\ \end{align*} From upper semicontinuity we know that for any given $x$ and $\varepsilon>0$ we have $f(y)<f(x)+\varepsilon$ for all $y$'s that are close enough to $x$. So for such $y$'s we get $$\int_x^y f(t) \; \mathrm{d}t \le (f(x)+\varepsilon)(y-x)$$ and $$D^+ v(x) \le f(x)+\varepsilon.$$ Since this is true for every $\varepsilon>0$, we finally get $D^+ v(x) \le f(x).$