In a cantilever beam subjected to general loading, the maximum bending moment is at