I'm working on my textbook's exercise for hours but just can't prove it.
This question might has connections with the integral form of the remainder of the Taylor polynomial.
By using the first fundamental theorem of calculus, let $F(x) = \int_0^x f(t)dt$ on $[0,2]$, we know $F'(x) = f(x)$.
Then I used Taylor polynomial twice to get these: $$F(x) = F(0) + F'(0)(x-0)+\int_0^x (x-t)F''(t)dt $$ $$F(x) = F(2) + F'(2)(x-2)+\int_2^x (x-t)F''(t)dt $$
And easily know $F(0)=0, F(2)=\int_0^2 f(x)dx,F'(0)=F'(2)=f(0)=f(2)=1$, after simplifying these two equations above, I got
\begin{align} F(2)&=2+\int_0^x (x-t)f'(t)dt +\int_x^2 (x-t)f'(t)dt \\ &=2+\int_0^2(x-t)f'(t)dt \\ &=2+\int_0^2xf'(t)dt-\int_0^2 tf'(t)dt \\ &=2-\int_0^2 tf'(t)dt \end{align} We now have $\lvert f'\rvert \le 1$ and $\int_0^2 f'(x)dx = 0$, but I don't know how to prove that $ 1 \le 2-\int_0^2 tf'(t)dt \le 3$.
Maybe I got the wrong way but I couldn't figure out a better one.
It's not anything as hard as that. Basically, use the conditions given to show that the graph of $f(x)$ is below the triangle with vertices $(0,1), (1,2),$ and $(2,1)$, and above the triangle with vertices $(0,1), (1,0),$ and $(2,1)$. So $\int_0^2 f(x)$ is between the integrals of the two functions with the above triangular graphs.
Rigorously: If $0 < x \leq 1$, then the mean value theorem says that $f(x) - 1 = f(x) - f(1) = xf'(y)$ for some $0 < y < 1$. Since $|f'| \leq 1$, this means that $$-x \leq f(x) - 1 \leq x$$ Equivalently, $$1 - x \leq f(x) \leq x + 1 \tag{1}$$ By applying the above to $f(2-x)$, for $0 < x \leq 1$ one has $$1 - x \leq f(2 - x) \leq x + 1$$ Replacing $x$ by $2 - x$, for $1 \leq x < 2$ we have $$x - 1 \leq f(x) \leq 3 - x \tag{2} $$ Now just use $\int_0^2 f(x) = \int_0^1 f(x) + \int_1^2 f(x)$ and use $(1)$ and $(2)$ for upper and lower bounds for the integrals.