Beam deflections by integration method

For the beam shown, derive the equation for the elastic curve and determine expressions for the slope and deflection of the beam at B. Use the double-integration method.