TITLE: a Differential inequality without integration
QUESTION [5 upvotes]: Let $f:\mathbb{R}\rightarrow\mathbb{R}$ a differentiable function with $f(x)+f^{'}(x)\leq1$ for all $x \in \mathbb{R}$ and $f(0)=0$. Which is the maximum possible value of $f(1)$?
The question is "solved" here : maximum value and a differential inequality
but I did a mistake by supposing that $\frac{d}{d x} (e^x f(x)) $ is integrable in the interval $[0,1]$. I don't know how to solve the problem without such condition. Someone could help me?
thanks in advance

REPLY [3 votes]: The solution to $f'(x) + f(x) = 1$ with $f(0) = 0$ is given by $f(x) = 1 - e^{-x}$ as can be shown via integrating factors for example. 
Inspired by this integrating factor method, if $f'(x) + f(x) \leq 1$, you can let $g(x) = e^x f(x) - (e^x - 1)$, and then you have $g'(x) \leq 0$ with $g(0) = 0$. So $g(x)$ is decreasing
with $g(0) \leq 0$. Hence $g(1) \leq 0$. 
Writing this out, we see that $ef(1) - (e - 1) \leq 0$ or $f(1) \leq 1 - e^{-1}$. The function $f(x) = 1 - e^{-x}$ from above will achieve this minimum.