Math/CS Question

enwar3

Golden Member
Jun 26, 2005
1,086
0
0
This was a puzzle question I heard but I'm not what the answer is or how to approach it using differential equations.

Say you have two paint buckets, both of the same size, one with red paint and one with green paint (containing the same amount of paint). Now one bucket is above the other bucket, and both buckets have a hole at the bottom that leak at the same rate. So as red paint leaks out of the top bucket, green paint is leaking out of the bottom bucket at the same rate. Finally, assume mixing occurs instantly. What is the ratio of red paint to green paint when the top bucket is empty?
 

Hacp

Lifer
Jun 8, 2005
13,923
2
81
This was a puzzle question I heard but I'm not what the answer is or how to approach it using differential equations.

Say you have two paint buckets, both of the same size, one with red paint and one with green paint (containing the same amount of paint). Now one bucket is above the other bucket, and both buckets have a hole at the bottom that leak at the same rate. So as red paint leaks out of the top bucket, green paint is leaking out of the bottom bucket at the same rate. Finally, assume mixing occurs instantly. What is the ratio of red paint to green paint when the top bucket is empty?

Something is missing or else it will be 1.

Do you mean what is the ratio of red to green the instant the top bucket is empty? That still doesn't make sense because it could well be 0 depending on the distance the paint has to fall.
 
Last edited:

Matthiasa

Diamond Member
May 4, 2009
5,755
23
81
Solution is going to come from something similar to a dA/dt= Rin(t)- Rout(t) ... probably.
Where Rin(t) is the inflow red paint and Rout(t) is the outflow of the mixed solution. To tired/ slow right now to put the the proper things for it though. :(

Oh and that could be entirely wrong as well but oh well.
 

DrPizza

Administrator Elite Member Goat Whisperer
Mar 5, 2001
49,601
167
111
www.slatebrookfarm.com
Relatively simple differential equations problem.

Compare the problem to something like this (every differential equation book & probably every Calc II book will have a similar mixing problem): you have a vat of pure water. Saline solution (whatever concentration) is pouring in at 1 gallon per second. The mixture is pouring out at 1 gallon per second. Assume (all your assumptions above) - find a similar problem in a calc II book or a diff eq's book, study it, and apply it to your problem.
 

Hacp

Lifer
Jun 8, 2005
13,923
2
81
Relatively simple differential equations problem.

Compare the problem to something like this (every differential equation book & probably every Calc II book will have a similar mixing problem): you have a vat of pure water. Saline solution (whatever concentration) is pouring in at 1 gallon per second. The mixture is pouring out at 1 gallon per second. Assume (all your assumptions above) - find a similar problem in a calc II book or a diff eq's book, study it, and apply it to your problem.

From the information he gave us we can't figure if its as simple as you say.

What if the the rate of both cans is 1 drop per second and there is only one drop in both of them and the distance from the bottom of the top bucket to the bottom of the bottom bucket is 5 meters. Then, even with instant mixing, the paint doesn't mix at all.
 

Matthiasa

Diamond Member
May 4, 2009
5,755
23
81
Umm its not quite that simple, it would only be that if time was allowed to go to infinity and there was a constant inflow of the paint, both of which aren't the case...
 

DrPizza

Administrator Elite Member Goat Whisperer
Mar 5, 2001
49,601
167
111
www.slatebrookfarm.com
Hmmmm.... differential equations not necessary.

Let's do this:

Start with a gallon of each. Dump out a 1/2 gallon from the bottom, add a 1/2 gallon from the top. The resulting mixture will contain 1/2 gallon of green. Do it again & your remaining mixture will contain 1/4 gallon of green. So, doing it in two successive mixes results in the final gallon containing (1/2)^2 gallon of green.

Let repeat this, but use 1/3 gallon at a time. Dump out 1/3 gallon of the green, you're left with 2/3 of a gallon. Dump out 1/3 of the remaining & you have 2/3 of 2/3 of a gallon remaining. Do it again and you have (2/3)^3 gallons of green left in the remaining gallon of paint after you add the rest of the red.

Of course, this isn't fast enough. Dump out 1/10 of a gallon at a time & you'll see that the final mixture contains (9/10)^10 gallons of green.

Do one hundredth of a gallon at a time & you have (99/100)^100 gallons of red remaining.

You should recognize this as a limit.
What's the limit of [(x-1)/x]^x as x approaches positive infinity?

Since (x-1)/x is the same as 1 - 1/x, you can rewrite this as
[1 - 1/x]^x as x approaches positive infinity. This is VERY similar to the definition of Euler's number; how to find that limit is in every calculus book in the section on L'Hopital's rule.
 
Last edited:

DrPizza

Administrator Elite Member Goat Whisperer
Mar 5, 2001
49,601
167
111
www.slatebrookfarm.com
From the information he gave us we can't figure if its as simple as you say.

What if the the rate of both cans is 1 drop per second and there is only one drop in both of them and the distance from the bottom of the top bucket to the bottom of the bottom bucket is 5 meters. Then, even with instant mixing, the paint doesn't mix at all.

You're trying to be technical. Any intelligent person would recognize that the intended interpretation of the problem means that is the very first drop of paint is leaving the bottom bucket, the very first drop of paint is entering from the top bucket at the same rate.

i.e. your interpretation led to a contradiction of the stated conditions: that MIXING OCCURS.
 
Last edited:

DrPizza

Administrator Elite Member Goat Whisperer
Mar 5, 2001
49,601
167
111
www.slatebrookfarm.com
Okay, I've brought the solution of the problem down to the level of Calculus I. The new challenge for this problem is to do it using pre-calculus mathematics... Think you can? I also think that my Calc I solution, and given the mythical "instantaneous mixing" results in a solution, also satisfies Matthiasa's objection.
 
Last edited:

Matthiasa

Diamond Member
May 4, 2009
5,755
23
81
Hmmmm.... differential equations not necessary.
<snip>

You should recognize this as a limit.
What's the limit of [(x-1)/x]^x as x approaches positive infinity?

Since (x-1)/x is the same as 1 - 1/x, you can rewrite this as
[1 - 1/x]^x as x approaches positive infinity. This is VERY similar to the definition of Euler's number; how to find that limit is in every calculus book in the section on L'Hopital's rule.

Booo you cheated. :(

:p
 

Hacp

Lifer
Jun 8, 2005
13,923
2
81
You're trying to be technical. Any intelligent person would recognize that the intended interpretation of the problem means that is the very first drop of paint is leaving the bottom bucket, the very first drop of paint is entering from the top bucket at the same rate.

i.e. your interpretation led to a contradiction of the stated conditions: that MIXING OCCURS.

Ok but what happens when the top bucket is empty? At that instant, there is still a stream of red paint flowing down unmixed.
 

jersiq

Senior member
May 18, 2005
887
1
0
Ok but what happens when the top bucket is empty? At that instant, there is still a stream of red paint flowing down unmixed.

Reread the problem and you'll see that condition won't be met.

Say you have two paint buckets, both of the same size, one with red paint and one with green paint (containing the same amount of paint).
 
Oct 27, 2007
17,009
5
0
Ok but what happens when the top bucket is empty? At that instant, there is still a stream of red paint flowing down unmixed.
It's in the spirit of these types of problems that we ignore details like this. Hell, we're not even considering paint "drips", it's more like a continuous inflow/outflow stream. The instant the paint leaves the red bucket, it appears in the green bucket.
 

Hacp

Lifer
Jun 8, 2005
13,923
2
81
It's in the spirit of these types of problems that we ignore details like this. Hell, we're not even considering paint "drips", it's more like a continuous inflow/outflow stream. The instant the paint leaves the red bucket, it appears in the green bucket.

Its a puzzle question, not a homework problem. These types of problems are meant to be tricky, not boring.
 

DrPizza

Administrator Elite Member Goat Whisperer
Mar 5, 2001
49,601
167
111
www.slatebrookfarm.com
Its a puzzle question, not a homework problem. These types of problems are meant to be tricky, not boring.

Just a wild shot in the dark, but the only "tricky" thing you can do is make stupid arguments. And, for the sake of your faulty interpretation, as the last atom of paint is half in and half out of the top bucket = 1/2 in and 1/2 out of the bottom bucket, It's already mixed uniformly throughout the bucket. When 1 billionth of the last atom from the top bucket is flowing into the bottom bucket, there's only 1 billionth of an atom left to flow out. We can take this limit to infinity. As has been pointed out - it's obvious that the conditions are impossible: instantaneous mixing. However, that condition is satisfactory for making your interpretation idiotic within the context of this problem.
 

mjrpes3

Golden Member
Oct 2, 2004
1,876
1
0
Its a puzzle question, not a homework problem. These types of problems are meant to be tricky, not boring.

But the way you frame the question there are now two unknown variables. You would now have to know the distance between the two cans and the flow rate. This is a puzzle question not a nightmare.
 
Oct 27, 2007
17,009
5
0
Are differential equations hard? I think we do 'em in Calc BC next year.
If you're comfortable with calculus concepts then they're not a particularly big step up, at least at first. Really if you've been doing integration then you're already familiar with simple differential equations, for example
Int(f(x)) dx = g(x)
is the same as
g'(x) = f(x) <-- a differential equation

(Int means 'integral', dunno how to do the elongated S)
 

Leros

Lifer
Jul 11, 2004
21,867
7
81
Are differential equations hard? I think we do 'em in Calc BC next year.

You'll do some of the easier ones in Calc BC. When you take a full on Differential Equations class you'll be exposed to many different types of differential equations.

They're sort of like integrals in that you have to figure out what form your problem is in, then use that specialized solution.
 

Toastedlightly

Diamond Member
Aug 7, 2004
7,215
6
81
Now what if you had 3 buckets. Red, Yellow, and Blue. Yellow drips into blue, blue into red. Same assumptions as before. When yellow bucket runs out, what is the concentration of the different pigments in the other 2 buckets. When blue runs out, what is the concentration in the red bucket? Differential equations are fun.