First order linear function mixture problem

calculusordinary differential equationsphysics

Assuming the mixture is uniform

A $400$ gallon tank initially contains $100$ gallons of brine containing $50$lbs of salt. Brine containing 1 lb\gallon enters the tank at a rate of $5$ gal/sec. The well-mixed brine in the tank flows out at a rate of $3$ gal/seconds. How much salt will the tank contain when it is full of brine?

according to: http://tutorial.math.lamar.edu/Classes/DE/Modeling.aspx

The formula we want is: the overall rate of change is equal to rate the fluid enters the tank minus the rate at which the fluid leaves the tank. The rate at which the fluid enters or leaves is equal to the flow rate times the concentration. Concentration is equal to amount of salt divided by the amount of water.

Setting the equation up:

Concentration entering the tank: $1$ lb/gal

rate it enters the tank: $5$ gal/seconds

rate it leaves the tank: $3$ gal/seconds

volume of water at any time $t$: $100g + 2g \times t$

$Q(t):$ The amount of salt at any time t.

initial conditions: at $t=0$ the concentration = $.5 lb/gal$

Important to note that since $5$gal/sec enters the tank and $3$gal/sec leaves the tank the volume increases by $2$gal/sec which is taken into consideration above.

Setting up the equation:

Q'(t)= overall rate of change

$Q'(t)=(1 lb/gal)(5gal/sec)-(\frac{Q(t)?}{100gal + 2gal(t)})$($3$gal/sec)$

I guess I take the integral now

simplifying

$Q'(t)= 5lb/sec – \frac{?}{100+2gal(t)}(3gal/sec)$

$Q'(t) -\frac{3gal/secQ(t)}{100+2gt}= 5 $lb/sec

integrating factor $u(x)= e^{\int \frac{3gal/sec}{100+2gt}}$

$u(x)= (50+t)^{\frac{3}{2}}$

$\frac{1}{(50+t)^{\frac{3}{2}}} \int 5 (50+t)^{\frac{3}{2}}$

the fives cancel out and of course this gives:

$\frac{1}{50+t^{\frac{3}{2}}} \times 2(50+t)^{\frac{5}{2}}+c$

after multiplying through we get:

$2(50+t)+ \frac{c}{50+t)^{\frac{3}{2}}}$

applying the initial condition:

Q(0)=50:

$50 = 100+\frac{c}{\sqrt{(50)^3}}$

$-50= \frac{c}{\sqrt{(50)^3}}$

$c = (-50)(\sqrt{(50)^3}$

Now $Q(t) = 100 + 2t + \frac{c}{(50+t)^{\frac{3}{2}}}=100+2t-\frac{50^{5/2}}{(50+t)^{3/2}}$

The problem doesn't offer a time when the tank is done getting filled the book says it 397 approx. What do I do?

Best Answer

I would suggest that you call the quantity of salt as $Q(t)\rm{lb}$, and the time $t\rm{sec}$, and don't mix $\rm g$ and $\rm{gal}$ in your equations. It will make for cleaner expressions. Then you have $$Q'(t)\rm{lb/sec}=5\rm{lb/sec}-\frac{Q(t)\rm{lb}}{100\rm{gal}+2\rm{gal/sec}\ t\rm{sec}}3\rm{gal/sec}$$ The units look right, so the equation in dimensionless quantities is now: $$Q'(t)=5-\frac{3Q(t)}{100+2t}$$ Move the $Q$ term to the other side and you get $$Q'(t)+\frac{3Q(t)}{100+2t}=5$$ Now the integrating function is $$\mu(t)=e^{\int \frac{3}{100+2t}dt}=e^{\frac32\int \frac{1}{50+t}dt}=(50+t)^{3/2}$$ Just in case you need it, $\int(50+t)^{3/2}=\frac25(50+t)^{5/2}$

Related Question