We begin by considering a free-body diagram of a short portion of the beam.

This element of the beam has a length Δx.

Here is Canvas object wihch demonstrate the problem.

On the left side of the beam element, we will assume a shear force V and a bending moment M.