Find f if f''(x) = 2 + cos(x), f(0) = -1 and f(pi/2) = 0
After going through the steps, I found f(x) = x^2 - cos(x) - (pi/2)x
This follows through correctly if you differentiate it twice, and it satisfies both given substitutions in the question, but my answer key says:
f(x) = -cos(x) + x^2 - x + (pi/2)(1 - pi/2)
Did I slip up somewhere?