A tank contains 1000L of brine with a concentration of .5kb of salt per liter. In order to dilute the solution, brine with a concentration of 0.1kg of salt per liter runs into the tank at a rate of 20L/min and the resulting solution, which is stirred continuously, runs out at the same rate. How many kilograms of salt will remain after t minutes?

A = kilograms of salt

A' = (concentration in rate * rate of flow in) - (concentration out rate * rate of flow out)

A' = (0.1 * 20) - (A/1000 * 20)

dA/dt = 2 - 0.02A

dA = (2 - 0.02A ) dt

\int dA/(2 - 0.02A ) = \int dt

ln \left|2 - 0.02A\right| + C_2 = t + C_1

Note: C = C_1 - C_2

2 - 0.02A = e^{t+C}

0.02A = 2 -Ke^t for K \in R

A(t) = 50(2-Ke^t)

A(0) = 0.5 = 50(2-Ke^0)

A(0) = 0.01 = 2-K

A(0) = 0.01-2 = -K

K = 1.99 = 199/100

A(t) = 50(2-\frac{199}{100}e^t)

From skimming this, did I make any mistakes?