Maximum and minimum value of $\int_0^1 f(x)dx $ given $|f'(x)|<2$
Solution 1:
Your estimates are correct, but not sharp. For example, in $$ I = 1 - \int_0^1 xf'(x)dx > 1 - \int_0^1 2 x dx = 0 $$ $I$ would be close to the lower bound $0$ only if $f'(x) \approx 2$ on the entire interval, which is not possible with $f(0)=0$ and $f(1) =1$.
The solution is actually simpler: Use the mean-value theorem to obtain upper and lower bounds for the admissible functions $f$.
From $f(0) = 0$ and $f'(x) < 2$ it follows that $f(x) < 2x$ for $0 < x \le 1$.
From $f(1) = 1$ and $f'(x) > -2$ it follows that $f(x) < 1 - 2(x-1) = 3-2x$ for $0 \le x < 1$.
Together: $f(x) < \max(2x, 3-2x)$ for $0 < x < 1$, which implies that $\int_0^1 f(x) \, dx < \frac 78$.
Similarly show that $\int_0^1 f(x) \, dx > \frac 18$.
Finally show that the integral can be arbitrarily close to those bounds.
You can also solve it graphically by drawing lines with slopes $-2$ and $+2$, starting from the given points $(0, f(0))$ and $(1, f(1))$.
The graph of $f$ must lie between the green and the red curve. $(b-a)$ is the area between those curves, and that is equal to the area of the blue rectangle.