find f(x) if $\displaystyle f''(x)=2+cos x, f'(0)=-1, f(\pi/2)=0$

This is what I get:

$\displaystyle f'(x)=2x+sin x -1$

$\displaystyle f(x)=x^2-cos x-x+(\frac{\pi}{2})-(\frac{\pi}{2})^2$

The correct answer is: $\displaystyle x^2-cos x-\frac{1}{2}\pi x$

What did I do incorrectly?