The shear force diagram of a given beam is shown in figure. The loading and bending moment diagram of the beam are