Maximum slope and deflection of beam for different loading