Here is Canvas object wihch demonstrate the problem.

Bending moments act on a segment of the beam,
creating linearly distributed normal stresses.

Compression bending stresses are shown in green,
and tension bending stresses are shown in blue.