How to solve mixing problems with differential equations

In a mixing problem, the tank can gain water while it loses salt. We’ll track the amount of salt and the volume separately, then put them together to find the concentration leaving the tank. Let’s use a tank that fills faster than it drains.

Write a rate equation for the amount of salt

Let y(t) be the amount of salt and V(t) be the liquid volume. The amount changes at the rate salt enters minus the rate salt leaves. Each salt rate is a concentration times a liquid flow rate.

dydt=Cinrin-CoutroutCout=y(t)V(t)

The outflow has the same concentration as the tank because the mixture stays uniform. The volume changes by rin-rout each minute when the flow rates are constant.

Example: Set up the equation for a filling tank

A tank starts with 1,500 liters of liquid and 20 kilograms of dissolved salt. Fresh water flows in at 15 liters per minute and the mixture drains at 10 liters per minute. Find the salt amount after any time in the model and after 10 minutes.

A tank with different inlet and outlet flow ratesFresh water enters at fifteen liters per minute. The mixture drains at ten liters per minute. The liquid volume increases by five liters per minute.Fresh water in15 L/minMixture out10 L/minWell mixedVolume rises by 5 L/min
Only the outflow carries salt. The difference in the liquid flow rates tells us how the tank volume changes.

The tank gains 15-10=5 liters per minute, so V(t)=1500+5t. The fresh water brings in no salt. Multiply the concentration leaving the tank by the outflow rate.

dydt=0-10(y1500+5t)dydt=-2y300+t

Separate, integrate, and use the initial amount

For the solution with positive initial salt, separate the variables. The expression 300+t is positive for t≥0.

1ydy=-2300+tdtln|y|=-2ln(300+t)+Ky(t)=C(300+t)2

Exponentiating gives the inverse square. Now plug y(0)=20 into the solution and solve for C.

20=C3002C=1800000y(t)=1800000(300+t)2
y(10)=18000003102≈18.73 kg

After 10 minutes, the tank contains about 18.73 kilograms of salt. If you need the concentration at any time, divide the salt amount by the volume 1500+5t. The formula models the process while the liquid stays well mixed and the stated flows continue without overflow.