An inlet pipe on a swimming pool can be used to fill the pool in 24 hours. The drain pipe can be used to empty the pool in 40 hours. If the pool is one-third filled and then the drain pipe is accidentally opened, how long will it take to fill the pool?

If the pool was empty it would take:

1/T = 1/24 - 1/40,
LCM = 120.
1/T = 5/120 - 3/120 = 2/120 = 1/60.
T = 60h if tank was empty.

T = (2/3) * 60 = 40h.

To solve this problem, we can determine the rates at which water is being added and removed from the pool.

Let's assume that the total capacity of the pool is 1 unit. Since the pool is currently one-third filled, this means it has a volume of 1/3 unit of water.

The inlet pipe can fill the entire pool in 24 hours. This means that the rate at which water is added to the pool is 1/24 unit per hour.

The drain pipe can empty the entire pool in 40 hours. This means that the rate at which water is removed from the pool is 1/40 unit per hour.

When the drain pipe is accidentally opened, it will start removing water from the pool. Since the rate at which water is removed from the pool is greater than the rate at which water is added, the pool will eventually be empty.

To find out how long it will take to fill the pool after the drain pipe is accidentally opened, we need to determine how long it will take for the pool to go from one-third filled to completely filled.

Let's assume it takes t hours for the pool to be completely filled.

During these t hours, the inlet pipe will add water at a rate of (1/24) * t units.

The drain pipe will remove water from the pool at a rate of (1/40) * t units.

Since the pool is initially one-third filled with a volume of (1/3) unit of water, the net change in the volume of water is given by:

[(1/24) * t] - [(1/40) * t] = (1/3)

Now, we can solve for t:

[(1/24) * t] - [(1/40) * t] = (1/3)

Multiply through by the least common denominator, which is 120:

5t - 3t = 40

2t = 40

t = 20

Therefore, it will take 20 hours to fill the pool after the drain pipe is accidentally opened.