This question came up for me as I was trying to wash out some milk from my toddler's cup with a bottle of water that I had in my car. I do this every day -- drive him to school while he drinks milk, and then wash out his sippy cup as much as possible so that it's clean for him to use in the afternoon when I pick him up.
Imagine that I have a sippy cup that when filled with a liquid and poured out, is left with volume $\mathit{D}$ of that liquid stuck to the inside. To start with, this is milk -- I've poured out as much milk as I can, but $\mathit{D}$ milk is still stuck to the inside of the cup. I have a finite amount $\mathit{W}$ of clean water, and a integer number of operations $\mathit{T}$ which is the number of different "pour in a quantity of clean water, shake the cup to mix up the milk with the water, and pour out the washing liquid" operations I can perform in the time that I have.
Every time I pour in water, shake up the cup, and pour out the water, the same volume $\mathit{D}$ of this mixture sticks to the inside of the container. This volume $\mathit{D}$ is a property of the container. This means that no matter how many times I pour in water, shake, and pour out, there will always be some amount of milk left in the container (which can approach zero as the amount of water and the number of washings approaches infinity). Assume that each mixing operation mixes the remaining milk perfectly with the water that's introduced.
Doing this in my car, I was torn between two ideas. One theory is to pour in very small amounts of water at the beginning, to waste the smallest amount of water when the cup is at its dirtiest. The other theory is to use large amounts of water up front, to get the bulk of the milk out early, and use the final washings to get the cup as clean as possible. I was unable to intuit which theory was more correct.
Mathematically, what strategy minimizes the milk remaining in the container after $\mathit{T}$ washings? After these $\mathit{T}$ washings, how much milk remains in the milk-water mixture stuck to the inside of the cup?
Thanks very much for your help! I will actually use the answer to guide my behavior next time!