A cantilever beam AB supports a uniform load of intensity q acting over part of the span and a concentrated load P acting at the free end, as shown. Determine the deflection and slope at end B of the beam. The beam has length L and constant flexural rigidity E I.