f and g are function of a real variable such that $g(x) = \int_0^x f(y)(y-x)dy$ for all $x$. If g is three times continuously differentiable, what is the greatest integer n for which f must be $n$ times continuously differentiable. Apparently the answer is $1$. Can anyone explain how to do this problem?
Since the derivative of $g$ is $0$, the integral must be constant, but I don't see how to quickly use this to say anything about $f$.