Hilbert's integral inequality, weight function and β function