Set $g(x)=x\cdot(f(x)-\frac{1}{2})$. Then the maximum of $\lvert g(x)\rvert$ on $[0,4]$ is at most $2$. From David Speyer's answer of a similar question and the reference given there, it should follow that $g(x)=2T_n(\frac{x}{2}-1)$, where $T_n$ is the ChebychevChebyshev function of degree $n$, and $n$ is the degree of $g$. However, $g(0)=0$, while $-1$ is not a root of $T_n$. So there is no such $f$.