# Mixing Problem - Linear First Order ODE

1. Jan 18, 2008

### ColdFusion85

[SOLVED] Mixing Problem - Linear First Order ODE

1. The problem statement, all variables and given/known data

A 500-gallon tank initially contains 50 gallons of brine solution in which 28 pounds of salt have been dissolved. Beginning at time zero, brine containing 2 pounds of salt per gallon is added at the rate of 3 gallons per minute, and the mixture is poured out of the tank at the rate of 2 gallons per minute. How much salt is in the tank when it contains 100 gallons of brine? Hint: The amount of brine in the tank at time t is 50+t.

3. The attempt at a solution

Let Q(t) be the amount of salt in the mixture at time t. Then dQ/dt = (rate in) - (rate out), or dQ/dt = (2 lbs/gallon)(3 gallons/min) - (Q(t)/50 lbs/gallon)(2 gallons/min). So

dQ/dt = 6-(1/25)*Q(t)

Rearranging, finding the integrating factor, and solving gives

Q(t) = 150 + C*e^(-t/25)

We know at t=0 there is 28 lbs of salt in the tank, so C = -122, and

Q(t) = 150-122e^(-t/25)

The hint tells us that, when 100 gallons of brine are in the tank, 50 seconds have passed. So, the amount of salt in the tank when the tank contains 100 gallons of brine is

Q(50) = 150-122e^(-50/25)

= 133.49 gallons

Is this correct? Does the tank size matter at all? I didn't use it in my calculations, so I was just wondering. Thanks.

2. Jan 19, 2008

### HallsofIvy

Staff Emeritus
No. There are 3 gallons of water per minute coming in, only 2 gallons per minute of water going out. The amount of water in is 1 gal per minute more than the water going out and so the amount of water in the tank at time t is 50+ t gallons- eactly what the hint says. The concentration of brine in the tank is not "Q(t)/50" it is "Q(t)/(50+ t).

3. Jan 19, 2008

### ColdFusion85

this is true. but the 500 gallon tank size is irrelevant?

4. Jan 19, 2008

### dynamicsolo

There's a problem with the second term. The rate at which the salt is being removed from the tank is given by the current concentration times the rate at which volume flows out of the tank. The current concentration will be given by the current mass of salt in the tank divided by the current volume of brine. That volume starts at 50 gallons, but (as the hint and HallsofIvy point out) is increasing at (3 gal/min in) - (2 gal/min out) = 1 gal/min net; this is why the volume must be represented as a function of time, 50+t .

dQ/dt = (2 lbs/gallon)(3 gallons/min) - (Q(t) lbs/[50+t]gallon)(2 gallons/min)

= 6 - [2Q(t)/(50+t)] , with Q(0) = 28 lbs.

This is no longer a separable equation (now you need to use an integrating factor), so the solution is a little more complicated than a simple exponential function.

Quite so. That merely limits the amount of brine that you can reach before the tank overflows, ending the utility of this model...

Last edited: Jan 19, 2008
5. Jan 19, 2008

### HallsofIvy

Staff Emeritus
Since you start out with 50 gallons of brine in the tank and are asked how much salt there will be in the tank when there are 100 gallons of brine, yes- the fact that the tank can only hold 500 gallons is irrelevant- you get nowhere near the capacity of the tank.

6. Jan 19, 2008

### ColdFusion85

Alright, well now I am stuck.

$$Q'(t)+\frac{2Q(t)}{50+t}=6$$

$$p(t) = \frac{2}{50+t}$$

$$e^{\int p(t)dt} = e^{\int \frac{2}{50+t} dt} = (t+50)^{2}$$

$$Q'(t)(t+50)^{2} + 2(t+50)Q(t) = 6(t+50)^{2}$$

$$[Q(t)(t+50)^{2}]' = 6(t+50)^{2}$$

$$Q(t)(t+50)^{2} = 6\int (t+50)^{2}dt = 2(t+50)^{3} + 6C$$

$$Q(t) = 2(t+50)+\frac{6C}{(t+50)^{2}}$$

$$Q(0) = 28= 100+\frac{6C}{2500}$$
$$C=-30000$$

$$Q(t)=2(t+50)-30000$$

100 gallons of brine in tank when 100=50+t, or t=50, so

$$Q(50)=200-30000$$

Clearly I did something wrong here. Did I perform the integral incorrectly?

7. Jan 20, 2008

### HallsofIvy

Staff Emeritus
What happened here? Your formula just above was
$$Q(t) = 2(t+50)+\frac{6C}{(t+50)^{2}}$$
but you appear to have replace the entire last term with C? You should have
$$Q(t) = 2(t+50)+\frac{6(-30000)}{(t+50)^{2}}$$
$$Q(t) = 2(t+50)- \frac{180000}{(t+50)^{2}}$$
Now evaluate that when t= 50 so t+ 50= 100.

8. Jan 21, 2008

### dynamicsolo

Another check you have on your solution is obtained by dividing the mass function by the volume function to get the concentration function. In mixing problems of this sort, the concentration of salt in the tank asymptotically approaches the concentration of the incoming liquid. In this problem, you would have

$$c(t) = 2 - \frac{180000}{(t+50)^{3}}$$ ,

which does approach 2 lbs/gallon as t -> infinity . From a practical standpoint, of course, this won't happen because the tank will overflow in finite time. (There is a similar limitation for problems where the net volume flow rate for the tank is negative. The asymptotic concentration still equals the input concentration, but the tank is emptied first.)