[Math] Help setting up a differential equation with rate in – rate out

applicationsordinary differential equations

I'm in a differential equations class and I am not getting it. It's been over a year since any calculus classes and I am struggling to set up the following problem. If some one can explain to me the process of setting it up I would appreciate it.

Problem:

A 400-gal tank initially contains 100 gallons of brine containing 50 lbs of salt. Brine containing 1 lb of salt per gallon enters the tank at a rate of 5 gal/s, and the well-mixed brine in the tank flows out at the rate of 3 gal/s. How much salt will be in the tank when it is full of brine?

My set-up so far:

I know that Q(t) = rate in – rate out. I set up the problem to be:

 (dQ/dt) = 5 - 3(Q(t))

But when I solved it I got for the general solution:

 My integrating factor: u = e^(3t)
 50 - (5/3) = C

That doesn't look right.
If someone can tell me how to set up the problem correctly and explain why that would be awesome. Thank you!

Best Answer

You have 100 gal of brine with 50 lbs of salt, so V0 = 100 gal, Q0 = 50 lbs.

We know that 5 gal is entering per second, and 3 gal is exiting, so to find the total volume in the tank:

$V=100+\left( V_{in}-V_{out} \right)t=100+\left( 3-2 \right)t$

where t is time in seconds, so at any time t:

$$V=100+2t$$

concentration = C = $\frac{Q}{V}$

$Q=\mbox{C}\cdot V$ and we can also take this as a rate:

$$\frac{dQ}{dt}=\mbox{C}\cdot \frac{dV}{dt}$$

So basically if $V_{in}=$ 5 gal flows in every second, with a concentration of 1 lb per gallon, then $Q_{in}=$ 5 lb flows in every second.

And if we also have a $V_{out}=$ 3 gal that flows out from the tank every second, with a concentration of Q/V (we don’t know the concentration here, but it’s the concentration of the tank), where Q is the total salt in the tank and V is the total volume (since we’re flushing out solution from the tank), then $Q_{out}=\mbox{C}\cdot V_{out}=\frac{Q}{V}\cdot 3=\frac{3Q}{100+2t}$ lbs of salt flows out every second.

Now we subtract the two rates:

$$\frac{dQ}{dt}=5-\frac{3Q}{100+2t}$$

I think many people get confused with the Qout part, you need to know that Qout≠Q and Vout≠V (in context). Here we don't know the concentration as with Qin, but we do know that the concentration is that of the tank (since we ARE taking out volume from the tank), so we can take the concentration as Q/V, and then we multiply that by how much volume is going out (Vout) to get Qout every second.