Let be the pressure exerted on the wall at a depth of . Consider the infinitesimal strip at with height and width equal to the width of the trough at that depth. Then the force exerted on that strip is the area of the strip times the pressure exerted by the oil: .

Add up the force on all these strips (integrate from to or to depeding on how you think about the problem) and you should get the total force on the wall.