beta function and derivative