Setting up mixing problem involving Dirac delta

dirac deltalaplace transformordinary differential equations

A salt tank initially contains $50$ gallons of pure water. A brine solution containing $\frac15$ lb/gal of salt flows into the tank at a rate of $5$ gal/min. Brine flows out of the tank at the same rate. At time $t=15$ minutes, the mechanism regulating salt flow into the tank breaks and $20$ pounds of salt is dumped instantaneously into the tank. Although water continues to flow into the tank at the original $5$ gal/min, there is no salt in the incoming liquid.

I'm not sure how to incorporate the information in boldface into the ODE. "Instantaneous" tells me I need to use $\delta(t)$ in some way. Without it, I would have

$$\frac{\mathrm dA}{\mathrm dt}=1-\frac A{10}$$

where $A(t)$ is the amount of salt (in lb) in the tank at time $t$. How might I go about setting this up properly? I have solved ODEs involving $\delta(t)$ before, but have not yet had to come up with one myself to describe a situation like this.

One (possibly erroneous) thing that occurred to me was that perhaps $\delta(t)$ isn't needed, since it seems

$$\frac{\mathrm dA}{\mathrm dt}=\begin{cases}1-\dfrac A{10}&\text{for }0\le t<15\\[1ex]-\dfrac{A+20}{10}=-\left(2+\dfrac A{10}\right)&\text{for }t\ge15\end{cases}$$

or in terms of the unit step function $u(t)$,

$$\frac{\mathrm dA}{\mathrm dt}=\left(1-\frac A{10}\right)(u(t)-u(t-15))-\left(2+\frac A{10}\right)u(t-15)$$

$$\frac{\mathrm dA}{\mathrm dt}=\left(1-\frac A{10}\right)u(t)-3u(t-15)$$

Solving this via Laplace transforms gives the solution

$$A(t)=\begin{cases}10-10e^{-t/10}&\text{for }0\le t\le15\\[1ex]-20+10e^{-t/10}(3e^{3/2}-1)&\text{for }t>15\end{cases}$$

Does this solution seem correct?

Best Answer

The amount of salt in the tank, $A(t)$, satisfies a differential equation $$A'(t) = F_{\text{in}}(t) - F_{\text{out}}(t),$$ where $F_{\text{in}}(t), F_{\text{out}}(t)$ are the in and out flows respectively.

Here we can write $$\begin{align} F_{\text{in}}(t) &= \chi_{[0,15]}(t) + 20 \, \delta(t-15), \\ F_{\text{out}}(t) &= \frac{1}{10} A(t), \end{align}$$ where $\chi_I(t) = 1$ if $t \in I,$ and $=0$ otherwise.

This gives $$A'(t) = \chi_{[0,15]}(t) + 20 \, \delta(t-15) - \frac{1}{10} A(t).$$