Let the inlet pipe fill at a rate of x L/min; since the leak empties the full tank in 6 hours (360 minutes), its rate is the capacity (C) divided by 360. The net emptying rate is the leak rate minus the inlet rate, so C divided by 360 minus 4 equals C divided by 8 hours (480 minutes). Solving the equation C/360 - 4 = C/480 involves finding a common denominator to get 4C - 480 = 3C, which means C equals 480 minutes times 12 to yield a capacity of 5760 L. Alternatively, since the net emptying rate is 1/8 of the tank per hour and the leak is 1/6, the inlet fills 1/24 of the tank per hour; at 4 L/min (240 L/hour), the capacity is 240 times 24 to equal 5760 L.