A beam AB is subjected to concentrated loads P and 2P as shown in the figure. The beam rests on a foundation that exerts a continuously distributed reaction against the beam. Assuming that the distributed reaction varies Iinearly in intensity from A to B, determine the intensities qa and qb of the reaction at the ends A and B, respectively. Also, construct the shear-force and bending-moment diagrams for the beam.