In differential equations, mixing problems are used to model concentrations of a substance dissolved in a fluid. This can include anything from salt content in water to pollution in air. When doing mixing problems, we make the following assumptions:
For this particular equation, we make the further assumption that the rate at which fluid flows into the mixture is the same as the rate at which fluid flows out so that the volume is constant, but this will not always be the case. We also assume the concentration of the substance in the fluid flowing in and the flow rates are constant and not a function of time, though again this will not always be the case.
This basic version of the mixing problem produces a first order linear differential equation. We have `(dS)/(dt) = "rate in - rate out"`, where `(dS)/(dt)` is the rate of change of the concentration of the substance in the mixture. The `"rate in"` is `"(rate of fluid flowing in)"*"(concentration of substance in the fluid flowing in)"`, and the `"rate out"` is `("(rate of fluid flowing out)")/("(volume of mixture)")*S(t)`, where `S(t)` is the concentration of the substance in the mixture at time `t`. And again, in this version of the problem we're assuming that the rate flowing in is equal to the rate flowing out. We'll call this rate `R`, the concentration `C`, and the volume `V`.
So
`(dS)/(dt)=R*C-(R*S(t))/V`
This is our first order linear differential equation. To solve it we use the method of integrating factors. Moving the `"rate out"` term to the other side, we have
`(dS)/(dt)+(R*S(t))/V=R*C`
So we want to find `e^(int R"/"V dt)`. Since neither `R` nor `V` depend on time, we know our integrating factor is `e^(Rt"/"V)`. We multiply this through both sides to get
`e^(Rt"/"V)*(dS)/(dt)+R/V*e^(Rt"/"V)*S(t)=e^(Rt"/"V) *R*C`, which is equivalent to
`(e^(Rt"/"V)*S(t))'=e^(Rt"/"V) *R*C`
Integrating both sides with respect to t gives
`int (e^(Rt"/"V)*S(t))'=int e^(Rt"/"V) *R*C dt`
`e^(Rt"/"V)*S(t) =V/R*R*C*e^(Rt"/"V)+K`
`S(t)=V*C+K*e^-(Rt"/"V)`
Where `K` is the constant of integration determined by the initial conditions.
Suppose you have a tank which holds 200 gallons of pure water. At time `t=0` a solution of 3lb of salt per gallon flows into the tank at a rate of 4 gallons per minute. At the same time, a well-mixed solution begins to flow out of the tank at a rate of 4 gallons per minute.
To set up the equation, we need to determine what our `"rate in"` and `"rate out"` are.
`"rate in" = "(rate of fluid flowing in)"*"(concentration of salt in the fluid flowing in)" = 3*4 = 12`
`"rate out" = ("(rate of fluid flowing out)")/("(volume of mixture)")*S(t) = (4*S(t))/(200)`
So our differential equation is
`(dS)/(dt) = 12- (4*S(t))/(200)`,
and we want to find an equation for `S(t)`.
We move the `"rate out"` part to the left hand side and get
`(dS)/(dt) +(4*S(t))/(200) = 12`
and find the integrating factor:
`e^(int 4"/"200 dt) = e^(4t"/"200)`.
We multiply this through both sides to get
`e^(4t"/"200 ) (dS)/(dt) + 4/200 e^(4t"/"200) S(t) = 12e^(4t"/"200)`
So by the method of integrating factors, we get to
`[e^(4t"/"200) S(t)]' = 12e^(4t"/"200)`
We integrate both sides with respect to `t` to get
`e^(4t"/"200) S(t) = int 12e^(4t"/"200)`
`e^(4t"/"200) S(t) = 600e^(4t"/"200) + C`
`S(t)=600+Ce^(-4t"/"200)`
This is the general solution for the differential equation (and the one this calculator will give you). To find the specific solution and find the value of `C` we need to use our initial conditions. We know that before the salt solution started to enter the tank it was pure water, so in terms of our equations that means at `t=0` we had `S(0)=0`. Plugging this in,
`0=600+Ce^0`
`-600=C`.
So with our initial conditions applied, we can write the final solution:
`S(t)=600-600e^(-4t"/"200)`
Polking, John C., Albert Boggess, and David Arnold. "Mixing Problems." Differential Equations with Boundary Value Problems. Upper Saddle River, NJ: Pearson/Prentice Hall, 2006. N. pag. Print.