Surface-response functions obtained from equilibrium electron-density profiles