The salt enters at a rate of (5 g/L)*(3 L/min) = 15 g/min.
The salt exits at a rate of (x/10 g/L)*(3 L/min) = 3x/10 g/min.
Thus, the total rate of salt flow, represented by
in grams, is defined by the differential equation,

which is linear. Shift the
term to the right side, then multiply both sides by
:


Next, integrate both sides and solve for
:


Initially, the tank contains 5 g of salt at time
, so we have


The duration required for the tank to contain 20 g of salt is
, such that
