Since the force of gravity on the roofing material is constant, the work done raising just this material to the top of the building is the product of force and the distance through which the force moves. Hence, this work is 50 lbs × 45 ft = 2250 ft-lbs.
The force exerted by gravity on the rope decreases during the lift because the amount of rope hanging from the roof varies from 45 to 0 ft. So, with y measured positive from the ground, an infinitesimal segment of the rope of length dy weighs lbs. This segment must be lifted through a distance ft. Hence, the work done in lifting just the rope is given by the integral
ft-lbs