Closed-form error estimates for the numerical solution of Fredholm integral equations of the second kind