Problem
Let $f(x)$ be a function with $f'(x)$ continuous over $[0,1]$. $f(0)+f(1)=0$. Prove $$\left|\int_0^1 f(x)dx\right|\leq \frac{1}{2}\int_0^1 |f'(x)|dx.$$
Proof
Let $x-1/2=t$,then $x=t+1/2$,$dx=dt$. Thus \begin{align*} \left|\int_0^1 f(x)dx\right|&=\left|\int_{-\frac{1}{2}}^{~~\frac{1}{2}} f\left(t+\frac{1}{2}\right)dt\right|\\ &=\left|\left[tf\left(t+\frac{1}{2}\right)\right]_{-\frac{1}{2}}^{~~\frac{1}{2}}-\int_{-\frac{1}{2}}^{~~\frac{1}{2}} tf'\left(t+\frac{1}{2}\right)dt\right|~~~&\textrm{integrating by parts}\\ &=\left|0-\int_{0}^{1} \left(x-\frac{1}{2}\right)f'\left(x\right)dx\right|~~~&\textrm{substituting $t+1/2=x$}\\ &\leq\int_0^1 \left|\left(x-\frac{1}{2}\right)f'\left(x\right)\right|dx\\ &\leq \left|\xi-\frac{1}{2}\right|\int_0^1 |f'(x)|dx~~~&\textrm{applying the first MVT for integral}\\ &\leq \frac{1}{2}\int_0^1 |f'(x)|dx, \end{align*} which is desired.
Your proof is correct. For the last few lines I propose this variation: $$\begin{align}\dots&\leq\int_0^1 \left|\left(x-\frac{1}{2}\right)f'\left(x\right)\right|dx\\ &= \int_0^1 \underbrace{\left|\left(x-\frac{1}{2}\right)\right|}_{\leq 1/2}|f'(x)|dx\\ &\leq \frac{1}{2}\int_0^1 |f'(x)|dx.\end{align}$$ In this way we avoid the application of MVT.