At the start, the tank contains
(0.25 lb/gal) * (100 gal) = 25 lb
of sugar. Let
be the amount of sugar in the tank at time
. Then
.
Sugar is added to the tank at a rate of <em>P</em> lb/min, and removed at a rate of
![\left(1\frac{\rm gal}{\rm min}\right)\left(\dfrac{S(t)}{100}\dfrac{\rm lb}{\rm gal}\right)=\dfrac{S(t)}{100}\dfrac{\rm lb}{\rm min}](https://tex.z-dn.net/?f=%5Cleft%281%5Cfrac%7B%5Crm%20gal%7D%7B%5Crm%20min%7D%5Cright%29%5Cleft%28%5Cdfrac%7BS%28t%29%7D%7B100%7D%5Cdfrac%7B%5Crm%20lb%7D%7B%5Crm%20gal%7D%5Cright%29%3D%5Cdfrac%7BS%28t%29%7D%7B100%7D%5Cdfrac%7B%5Crm%20lb%7D%7B%5Crm%20min%7D)
and so the amount of sugar in the tank changes at a net rate according to the separable differential equation,
![\dfrac{\mathrm dS}{\mathrm dt}=P-\dfrac S{100}](https://tex.z-dn.net/?f=%5Cdfrac%7B%5Cmathrm%20dS%7D%7B%5Cmathrm%20dt%7D%3DP-%5Cdfrac%20S%7B100%7D)
Separate variables, integrate, and solve for <em>S</em>.
![\dfrac{\mathrm dS}{P-\frac S{100}}=\mathrm dt](https://tex.z-dn.net/?f=%5Cdfrac%7B%5Cmathrm%20dS%7D%7BP-%5Cfrac%20S%7B100%7D%7D%3D%5Cmathrm%20dt)
![\displaystyle\int\dfrac{\mathrm dS}{P-\frac S{100}}=\int\mathrm dt](https://tex.z-dn.net/?f=%5Cdisplaystyle%5Cint%5Cdfrac%7B%5Cmathrm%20dS%7D%7BP-%5Cfrac%20S%7B100%7D%7D%3D%5Cint%5Cmathrm%20dt)
![-100\ln\left|P-\dfrac S{100}\right|=t+C](https://tex.z-dn.net/?f=-100%5Cln%5Cleft%7CP-%5Cdfrac%20S%7B100%7D%5Cright%7C%3Dt%2BC)
![\ln\left|P-\dfrac S{100}\right|=-100t-100C=C-100t](https://tex.z-dn.net/?f=%5Cln%5Cleft%7CP-%5Cdfrac%20S%7B100%7D%5Cright%7C%3D-100t-100C%3DC-100t)
![P-\dfrac S{100}=e^{C-100t}=e^Ce^{-100t}=Ce^{-100t}](https://tex.z-dn.net/?f=P-%5Cdfrac%20S%7B100%7D%3De%5E%7BC-100t%7D%3De%5ECe%5E%7B-100t%7D%3DCe%5E%7B-100t%7D)
![\dfrac S{100}=P-Ce^{-100t}](https://tex.z-dn.net/?f=%5Cdfrac%20S%7B100%7D%3DP-Ce%5E%7B-100t%7D)
![S(t)=100P-100Ce^{-100t}=100P-Ce^{-100t}](https://tex.z-dn.net/?f=S%28t%29%3D100P-100Ce%5E%7B-100t%7D%3D100P-Ce%5E%7B-100t%7D)
Use the initial value to solve for <em>C</em> :
![S(0)=25\implies 25=100P-C\implies C=100P-25](https://tex.z-dn.net/?f=S%280%29%3D25%5Cimplies%2025%3D100P-C%5Cimplies%20C%3D100P-25)
![\implies S(t)=100P-(100P-25)e^{-100t}](https://tex.z-dn.net/?f=%5Cimplies%20S%28t%29%3D100P-%28100P-25%29e%5E%7B-100t%7D)
The solution is being drained at a constant rate of 1 gal/min; there will be 5 gal of solution remaining after time
![1000\,\mathrm{gal}+\left(-1\dfrac{\rm gal}{\rm min}\right)t=5\,\mathrm{gal}\implies t=995\,\mathrm{min}](https://tex.z-dn.net/?f=1000%5C%2C%5Cmathrm%7Bgal%7D%2B%5Cleft%28-1%5Cdfrac%7B%5Crm%20gal%7D%7B%5Crm%20min%7D%5Cright%29t%3D5%5C%2C%5Cmathrm%7Bgal%7D%5Cimplies%20t%3D995%5C%2C%5Cmathrm%7Bmin%7D)
has passed. At this time, we want the tank to contain
(0.5 lb/gal) * (5 gal) = 2.5 lb
of sugar, so we pick <em>P</em> such that
![S(995)=100P-(100P-25)e^{-99,500}=2.5\implies\boxed{P\approx0.025}](https://tex.z-dn.net/?f=S%28995%29%3D100P-%28100P-25%29e%5E%7B-99%2C500%7D%3D2.5%5Cimplies%5Cboxed%7BP%5Capprox0.025%7D)