Full tank has $500$ liter of water containing $0.2\%$ of salt. One pipe pumps clear water in ($100$ liters per minute) and the other gets the mixture from the tank ($100$ liters per minute too). Assume salt dissolves in water instantly. Find the function that describes the concentration of salt in a tank at any given time $t$.
I solved this easily: $$ x(t + \Delta t)500L = 500Lx(t) + \Delta t \frac{100L}{min}(0 - x(t))\\ \frac{x(t + \Delta t)500L - 500L x(t)}{\Delta t} = -x(t) \frac{100L}{min}\\ x' = -\frac{1}{5}x \implies x(t) = e^{-0.2t} $$
Now, lets spin the example a little:
Our tank has 400 liter of water containing $0.5$% of salt. One pipe pumps the clear water in (10 liters per minute) and second one pumps the solution out (20 liters per minute).
How to find the solution then? The answer should be $x(t) = \frac{(t-40)^2}{800}$.
EDIT: I'd appreciate the downvoter to tell me why they think the question is not well suited to the stackexchange site.