We are told that
$$\displaystyle \int_0^x f(t) \, dt = 2\cos x + 3x + 2$$
and are asked to find $f$. If we apply the Fundamental Theorem of Calculus, then
$$\displaystyle f(x) = \frac{d}{dx}\int_0^x f(t) \, dt = -2\sin x + 3$$
but
$$\displaystyle \int_0^x -2\sin t + 3 \, dt = 2\cos x+3x - 2$$
It seems to me that the problem stems from using the FTC: Since I don't know anything about $f$, I cannot apply it. My question is: How exactly do I go about finding $f$ ?