Initially, a tank contains $50$ litres of water and the tank water contains no salt. Salt is added to the water at time $t=0,$ at a constant rate of $5$ grams per minute. The salt does not change the volume of the water in the tank. The water in the tank is stirred constantly, so that the concentration of salt throughout the tank is uniform. Furthermore, the saltwater solution leaks out the tank a constant rate of $100$ml per minute. What is the concentration of salt in the tank after $4$ hours?
My attempt:
Let $t$ be time in minutes, let $V(t)$ be the volume of water at time $t$, and let $m(t)$ be the mass of salt dissolved in the water in the tank at time $t$.
Then, changing units of volume from litres into metres cubed, $V(t) = (0.05 - 0.0001t) m^3.$
Now, in order to find the rate of mass of salt leaving the tank with respect to time, we first should find the concentration of salt in the tank water.
Concentration of salt in tank water = $\left(\frac{m(t)}{V(t)}\right)\ = \left(\frac{m(t)}{0.05 - 0.0001t}\right)\ g/m^3.\ $ Hence we need only need to find $\ m(240)\ $ and then the answer to the question is just $\left(\frac{m(240)}{0.05 - 0.0001\times 240}\right)\ g/m^3. $
Now I believe that the rate at which the mass of the salt leaks out the tank with respect to time is (concentration of salt in tank water in $g/m^3$) $\times$ (the rate at which water leaks out the tank in $m^3$/second), although I am not certain of this.
On the basis that this is all correct so far, the mass of salt in the water in the tank should satisfy the differential equation:
$$\frac{dm}{dt} = 5 - 0.0001 \times \left(\frac{m(t)}{0.05 - 0.0001t}\right),$$
or to tidy up the final term,
$$\frac{dm}{dt} = 5 - \frac{m(t)}{500 - t}.$$
I am not sure how to solve such an equation. Wolfram Alpha says that the general solution is:
$$m(t) = c(t-500) + 5(t-500)\log(t-500).$$
However, this doesn't allow for the initial condition $m(0) = 0$ to be satisfied, so something has gone wrong here. Perhaps $\log(t-500)$ should be $\log\lvert t-500 \rvert$ ? Or Is it the differential equation itself wrong? I suspect so, in which case, can someone give me a hint as to how to figure out what the differential equation should be ?
I am looking for pointers in the right direction, rather than a complete solution to the problem.