Find the function $f(x)$ which solves the equation $$\int_0^x f(t)\,dt = 3f(x)+k\,,$$ where $k$ is a constant.