4. (10 points) Find the continuous function f and constant c such that $$\int_c^x t f(t) dt = \cos x - \frac{1}{2}, \ \forall x \in R.$$