# Filling a Cistern: Three Pipes, No Numbers

#### (A new question of the week)

Today we’ll look at a classic algebra word problem: Finding how long it takes to fill a cistern through two pipes, with a drain open. But usually these problems are given with specific numbers, as a simple exercise in algebra. What if it’s all variables? the discussion provides some ideas on how to approach a problem that’s a little harder than you are used to.

## The problem

Here is the problem, from late April:

A basin is filled by two pipes separately at p and q minutes, respectively. The cistern is emptied in r minutes by another tube. The 1st tube was closed s minutes after the three tubes were opened together. How long will it take to complete the cistern?

This is a classic, as I said. Of course, in normal usage one would close the drain before starting to fill; in this scenario, we turn on both inlets along with the drain, and then turn off one of the inlets while still keeping the drain open! Less math would be needed if only these people did the right thing … but then, that’s always been true of word problems, which are designed as challenges, not realistic scenarios! ### Clarifying the problem

Doctor Rick answered in the way we usually do when we are given no work by which to judge a “patient’s” needs:

Because you have not shown any work on the problem (as we asked you to do on the submission page), I can’t be sure what methods you have learned or where you are having difficulty.

I am fairly sure that you would not have been assigned such a problem, with only variables and no numbers, unless you had previously learned how to solve similar problems with numbers – for instance,

A basin is filled by two pipes separately in 10 minutes and 8 minutes, respectively. The cistern is emptied in 20 minutes by another tube. The basin was empty and the three tubes were opened at the same time; then after 5 minutes the first tube was closed. How much longer will it take to completely fill the cistern?

Can you solve this problem? I would approach it by working with rates, in “basins per minute”. In other words, what fraction of the basin is filled (or emptied) by each pipe in a minute? Then I could work out the fraction that remains to be filled after the first 5 minutes, and go on from there.

If you still can’t solve this one, can you show me a similar problem, probably a little simpler, that you can solve?

And if you can solve my problem with numbers, can you show me your work on the original problem with variables only, so I can see where you are having trouble?

He has done several things here. First, he has asked to see some work, in order to see more clearly where Zawad needs help. Second, he has suggested the simpler problem as a way to ease into the problem, on the assumption that it is the multiplicity of variables that is the main issue. Third, and more subtle, he has clarified some of the wording of the problem, improving the English grammar without calling attention to it, explicitly indicating that the cistern started out empty, and also clarifying what time is to be determined: “how much longer (after the first tube is closed)”, rather than how long in total. The latter detail may turn out not to be what was expected (especially if the problem has been translated from another language that made it clearer). All of these things are helpful in dealing with a challenging problem.

He also suggested a standard method for solving such a problem, expecting that to be only a reminder (and therefore not going into too much detail, and trusting that Zawad will ask for more if needed).

### Trying it with specific numbers

Here is the new problem: Zawad replied, confirming the central issue and solving the simpler problem with ease:

Yes, I haven’t solved such problem with only variables.

I’ve tried to solve the math you given.

Together three pipes can fill {(1/10) + (1/8) – (1/20)} = 7/40 portion in one minute.

Together they were opened for five minutes. Thus the basin filled 7/8 portion  and left (1-(7/8)) portion = 1/8.

Now, together 2nd and 3rd pipe can fill 1/8 – 1/20 = 3/40 portion in one minute. The remaining ⅛ portion will be filled in 40/3 × 1/8 = 5/3 minute.

So, the total time is = 5 + (5/3) = 20/3 = 6.67 minute (approx).

Is this right? I think the problem with variable is

s + [qr(pqr – qrs – rsp – spq)/(r – q)]

Let’s examine his solution of the numerical problem, filling in some details he didn’t need to show, knowing we would understand:

The three pipes respectively increase the amount of liquid in the cistern by $$\frac{1}{10}$$, $$\frac{1}{8}$$, and $$-\frac{1}{20}$$ of its volume per minute, each rate being the reciprocal of the time it takes to fill, and the negative meaning it drains it.

Therefore, together the volume increases by $$\frac{1}{10}+\frac{1}{8}-\frac{1}{20}=\frac{4}{40}+\frac{5}{40}-\frac{2}{40}=\frac{7}{40}$$ per minute.

Over the first 5 minutes, the level in the cistern will reach $$\frac{7}{40}\times 5 = \frac{7}{8}$$. There is $$\frac{1}{8}$$ left to fill.

After closing one, there are two pipes open, so the new fill rate is $$\frac{1}{8}-\frac{1}{20}=\frac{5}{40}-\frac{2}{40}=\frac{3}{40}$$ per minute.

To find the number of minutes to fill $$\frac{1}{8}$$ at a rate of $$\frac{3}{40}$$ per minute, we divide: $$\frac{1}{8}\div\frac{3}{40}=\frac{1}{8}\times\frac{40}{3}=\frac{5}{3}=1\frac{2}{3}$$ minutes.

We can also check the answer. The first pipe ran for 5 minutes, and added $$\frac{5}{10}=\frac{1}{2}$$ to the cistern. The second pipe ran for $$6\frac{2}{3}$$ minutes, and added $$\frac{1}{8}\times\frac{20}{3}=\frac{5}{6}$$ to the cistern. The third pipe ran for $$6\frac{2}{3}$$ minutes, and removed $$\frac{1}{20}\times\frac{20}{3}=\frac{1}{3}$$ from the cistern. This leaves a total of $$\frac{1}{2}+\frac{5}{6}-\frac{1}{3}=\frac{3}{6}+\frac{5}{6}-\frac{2}{6}=\frac{6}{6}=1$$ full cistern.

Zawad explained this very clearly, showing that he understands the underlying principles well. But what of his answer to the real problem? $$s + \frac{qr(pqr – qrs – rsp – spq)}{(r – q)}$$ for which no work was shown?

### Correcting the original solution

Doctor Rick acknowledged the correct numerical answer, and pointed out a problem in the variable answer:

Thanks for your response, Zawad. You got the correct answer for my version of the problem with numbers.

Your result for the original problem does not look quite right to me: p, q, and r are in units of minutes, so your expression for the time has units of minutes4. But probably most of what you did (whatever it was) was correct.

Could you show me your work? I’d like to see, at least, your expression for the fraction of the basin remaining to be filled when the first pipe is closed.

In Zawad’s fraction, the numerator is a product of 5 numbers of seconds, and the denominator is a number of seconds, leaving a fourth power of seconds. So something is wrong.

Together three pipes can fill {(1/p) + (1/q) – (1/r)} portion in one minute.

Together they were opened for s minutes. Thus the basin filled {s(qr + pr – pq)}/pqr  portion and left  (pqr – sqr – spr + pqs)/pqr portion.

Now, together 2nd and 3rd pipe can fill (1/q) – (1/r) = (r-q)/qr portion in one minute. the remaining  portion will be filled in  (pqr – sqr – spr + pqs)/p(r – q)  minute.

So, total  time is s + {(pqr – sqr – spr + pqs)/p(r – q)} = {qr(p – s)}/{p(r – q)}

Sorry, I had a mistake in calculation while solving yesterday???

The method here closely parallels the method with specific numbers; that is one reason for trying a numerical version of the problem, which I often think of as a “dry run” to get used to a process in a less intimidating setting. Zawad may not have needed that practice. We won’t get to see the error he previously made, which was probably minor. Sometimes just redoing the work with someone watching (or with yourself paying closer attention) is all it takes to correct an error!

In case you don’t follow the details of the work, here is it again, with some gaps filled in:

Rate per minute with all three pipes open: $$\frac{1}{p}+\frac{1}{q}-\frac{1}{r}=\frac{qr}{pqr}+\frac{pr}{pqr}-\frac{pq}{pqr}=\frac{qr+pr-pq}{pqr}$$

Amount filled in s minutes: $$s\left(\frac{qr+pr-pq}{pqr}\right) = \frac{sqr+spr-spq}{pqr}$$

Amount yet to be filled: $$1-\frac{sqr+spr-spq}{pqr} = \frac{pqr}{pqr}-\frac{sqr+spr-spq}{pqr} = \frac{pqr-sqr-spr+spq}{pqr}$$

Rate per minute with only pipes 2 and 3 open: $$\frac{1}{q}-\frac{1}{r}=\frac{r}{qr}-\frac{q}{qr}=\frac{r-q}{qr}$$

Minutes to fill remaining amount: $$\left(\frac{pqr-sqr-spr+spq}{pqr}\right)\div\left(\frac{r-q}{qr}\right) =\\ \left(\frac{pqr-sqr-spr+spq}{pqr}\right)\cdot\left(\frac{qr}{r-q}\right) =\\ \frac{(pqr-sqr-spr+spq)(qr)}{pqr(r-q)} =\\ \frac{pqr-sqr-spr+spq}{p(r-q)}$$

If it is the total time that is required, we have to add on the initial s minutes: $$s+\frac{pqr-sqr-spr+spq}{p(r-q)} =\\ \frac{(sp(r-q)+(pqr-sqr-spr+spq)}{p(r-q)} =\\ \frac{spr-spq+pqr-sqr-spr+spq}{p(r-q)} =\\ \frac{pqr-sqr}{p(r-q)} = \frac{qr(p-s)}{p(r-q)}$$

Doctor Rick confirmed the answer, and took it a little further:

Yes, that’s the answer I got (the second time I tried — it is easy to make a mistake in solving!).

Examining the expression

qr(p – s)
———–
p(r – q)

I see first that it has the correct units (minutes).

Then I notice the (r – q) in the denominator, indicating that something problematic happens if r = q – and indeed, this means that the second input (which flows the entire time) balances the outflow, so that once the first input is turned off, the level in the basin never changes.

I am a little puzzled by the (p – s) in the numerator. If p = s then the first input pipe alone will fill the basin in the s minutes that it is open; but how could the total time to fill the basin be zero minutes? Clearly the model breaks down for some values of the variables. The “additional” time needed to fill the basin after the first pipe is closed can be negative, in which case we have an unphysical situation. In particular, if p = s then this additional time is –s, so that adding s gives a total time of zero.

This sort of examination is useful in several ways; we check our answer by looking at it from various perspectives, and also try to learn whatever can be learned from it. Or it may just satisfy curiosity.

First, he gave the answer a “sanity check”, making sure it wasn’t nonsense by checking the units (minutes cubed over minutes squared = minutes).

Second, he observed features of the rational function we obtained, particularly zeros and asymptotes, to see if they make sense in the problem. (We can ignore impossible cases where p, q, or r are zero.) Looking at the denominator, the time will be infinite if the second and third pipes have the same rate ($$r-q=0$$), since after the first pipe is turned off, we just have a steady state, with as much water going out as comes in. That makes sense. (We should also observe that if $$r<q$$, so that it takes longer to fill through the second pipe alone than to drain through the third, the time will be negative, which is again an impossible case: water just passes through, leaving the cistern empty and never allowing it to fill. You can’t take water out of an empty cistern.)

The case $$p=s$$ is odd, as he explained. Taking it a little further, the formula for the time needed after closing the first pipe is $$\frac{pqr-sqr-spr+spq}{p(r-q)}=\frac{qr(p-s)-sp(r-q)}{p(r-q)}$$ In this form, we can see that if $$p=s$$, this time is $$-s$$. Indeed, if $$p<s$$, so that the cistern would be filled through the first pipe alone, before the time to close it, then the whole procedure makes no sense.

To write a proper formula, we should determine when it is valid, by considering conditions under which various quantities along the way to the solution become negative, so that the rest is invalid. For example, among the required conditions would be that the drain is not faster than the two inlet pipes together (so that the cistern does not just remain empty for the first s minutes), and that the combination of all three pipes does not overflow the cistern within the first s minutes).

But we can do one more thing: Put the numbers from the sample problem into our general formula, to confirm that we get the same answer. We have $$p=10, q=8, r=20, s=5$$, so the formula gives $$\frac{qr(p-s)}{p(r-q)} = \frac{(8)(20)(10-5)}{10(20-8)} = \frac{800}{120} = \frac{20}{3} = 6\frac{2}{3}$$ as before.

This site uses Akismet to reduce spam. Learn how your comment data is processed.