calculating bending moments in cantilever beams