Suppose we have a strictly increasing, continuous scalar variable function $f(x)$ such that $f'(x) = 0 \text{ a.e.}$ The problem is $$\underset{x \in [a, b]}{\max}\ f(x) - cx$$ for some positive $c$. Since we have a sum of two continuous functions, it follows from the Weirstrass theorem that there exists a solution. If solution is interior, we cannot find it from the first order condition since $f'(x) = 0 \text{ a.e}$.
My question is: are there ways to characterize the interior solution analytically in general (without specifying $f(x)$)? I am also interested in a more general setting, where instead of $-cx$ there could be any continuous function.
If you have references to papers which study this, would be very grateful if you share.