Example (B&D). At $t=0$ a tank contains $Q_0$ lb of salt dissolved in 100 gal of water. Salted water with concentration $\tfrac{1}{4}$ lb/gal enters at rate $r$ gal/min; the well-stirred mixture drains at the same rate. Find:
Since we are dealing with DEs, the key observation is to express every rate of change relevant to the tank flow:
$$\frac{dQ}{dt} = \text{(rate of salt in)} - \text{(rate of salt out)}.$$We determine:
Hence the IVP is:
$$\frac{dQ}{dt} = \frac{r}{4} - \frac{rQ}{100} = \frac{25r - rQ}{100}, \qquad Q(0) = Q_0.$$(i) Separation of variables.
$$\int \frac{dQ}{Q - 25} = \int \frac{-r}{100}\,dt.$$Hence
$$\ln|Q - 25| = -\frac{rt}{100} + c.$$So $Q - 25 = Ce^{-rt/100}$ where $C = e^{\pm c}$. Therefore
$$Q(t) = 25 + Ce^{-rt/100}.$$The initial condition $Q(0) = Q_0$ gives $C = Q_0 - 25$:
(ii) As $t \to \infty$, $\;Q(t) \to 25 = Q_L$.
(iii) With $Q_0 = 50 = 2Q_L$ and $r = 3$. We need $Q(T)$ within 2% of $Q_L = 25$, i.e. $Q(T) = 25.5$:
$$25.5 = 25 + (50 - 25)e^{-3T/100} = 25 + 25\,e^{-T/50}.$$So $e^{-T/50} = 0.5/25 = 0.02$, giving
$$T = \frac{\ln 50}{0.03} \approx 130.4 \text{ min.}$$(iv) For $T \leq 45$ min:
$$25.5 = 25 + 25\,e^{-45r/100} \implies r = \frac{100}{45}\ln 50 \approx 8.69 \text{ gal/min.}$$If the salt concentration flowing into the tank varies as $\gamma(t) = 2 + \sin 2t$ g/L and drains at the same rate, the DE becomes
$$\frac{dq}{dt} + \frac{1}{2}q = 10 + 5\sin 2t,$$which has the solution
$$q(t) = 20 - \frac{10}{17}\cos 2t + \frac{40}{17}\sin 2t + ce^{-t/2}.$$Notice the solution also oscillates as the source that flows in. See Boyce & DiPrima for details.
A tank holds 200 L of pure water. Brine with 3 g/L of salt flows in at 5 L/min. The well-stirred mixture drains at 5 L/min. Let $Q(t)$ be the grams of salt at time $t$.
What is the rate of salt entering the tank (in g/min)?
What is the rate of salt leaving the tank?
Which DE describes $Q(t)$?
Solving the DE with $Q(0)=0$, what is $Q(t)$?
Newton published his finding in a short article in the Philosophical Transactions of the Royal Society anonymously in 1701 (in Latin). It states that the temperature of an object changes at a rate proportional to the difference between the object's temperature and its surroundings.
The rate of heat loss of a body is directly proportional to the temperature difference with its surroundings. Let $T = T(t)$ denote the temperature of the body, $T_s$ the surrounding temperature. Then $$\frac{dT}{dt} \propto (T - T_s),$$ which as a DE reads $$\frac{dT}{dt} = k(T - T_s).$$
The "law" is valid provided the temperature difference is small — Newton was well aware of this limitation.
With initial temperature $T_0$ and surrounding temperature $T_s$: $$T(t) = T_s + (T_0 - T_s)\,e^{kt}.$$
Let $y(t) = T(t) - T_s$. Then $y' = T'$. By Newton's law of cooling the DE becomes
$$\frac{dy}{dt} = ky,$$so that $y(t) = Ce^{kt}$ from the exponential growth/decay result. Express $y$ back in terms of $T$:
$$T(t) = T_s + Ce^{kt}.$$But $T(0) = T_0$, so $C = T_0 - T_s$. Thus
$$T(t) = T_s + (T_0 - T_s)e^{kt}.$$Suppose the ambient temperature is $70°$F and the rate constant is $0.05$/min. Write a DE for the temperature $y$ of the object at any time. Note that the DE is the same whether the object is above or below ambient temperature.
(Ans. $y' = -0.05(y - 70)$ where $y$ is in °F and $t$ in minutes.)
A cup of coffee at $90°$C is placed in a $20°$C room. After 5 minutes, the coffee is at $70°$C.
Using $T(t) = T_s + (T_0 - T_s)e^{kt}$, what are $T_s$ and $T_0$?
Using $T(5) = 70$, what equation do you get for $k$?
Solving for $k$:
Since $k < 0$, the coffee temperature as $t \to \infty$:
Discrete compounding $m$ times over time $t$ at rate $r$: $\;S_0\!\left(1 + \dfrac{r}{m}\right)^{mt}$. Taking $m \to \infty$:
$$S(t) = \lim_{m\to\infty} S_0\left(1 + \frac{r}{m}\right)^{mt} = S_0\,e^{rt}.$$Example. Continuous compounding means the IVP $\;dS/dt = rS,\; S(0) = S_0$, with unique solution $S(t) = S_0 e^{rt}$.
With constant deposit/withdrawal rate $k$ and $S(0) = S_0$: $$\frac{dS}{dt} = rS + k \implies S(t) = S_0\,e^{rt} + \frac{k}{r}(e^{rt} - 1).$$ ($k > 0$: deposit; $k < 0$: withdrawal.)
An autonomous DE has the form $\dfrac{dy}{dt} = f(y)$, where $f$ depends on $y$ only — no $t$ appears explicitly. The simplest case $y' = ry$ describes exponential growth, but this is not realistic. In population growth, although initial behaviour is exponential, growth is restricted by physical conditions (food, space, etc.).
A more realistic model assumes $f(y) = y\,h(y)$ where $h(y) \approx r$ when $y$ is small. The simplest such example is $h(y) = r - ay$, giving:
where $K = r/a$ is the carrying capacity (intrinsic growth rate constant).
This equation is nonlinear but separable. Sign analysis:
$$\frac{dy}{dt} \begin{cases} > 0 & \text{if } 0 < y < K, \\ = 0 & \text{if } y = 0 \text{ or } y = K, \\ < 0 & \text{if } y > K. \end{cases}$$The solutions $y(t) = 0$ and $y(t) = K$ are equilibrium solutions.
Example (Logistic equation). By separation of variables and partial fractions:
$$rt + c = \int r\,dt = \int \frac{dy}{(1 - y/K)\,y} = \int \frac{1}{y}\,dy + \int \frac{1/K}{1 - y/K}\,dy = \ln|y| - \ln|1 - y/K|.$$Case I: $0 < y_0 < K$.
$$rt + c = \ln\frac{y}{1 - y/K}, \qquad\text{so}\qquad \frac{y}{1 - y/K} = Ce^{rt}, \quad C = e^c.$$The initial condition $y(0) = y_0$ gives $C = \dfrac{y_0}{1 - y_0/K}$. Solving for $y$:
Case II: $y_0 = 0$ or $K$. These are the equilibrium solutions.
Case III: $y_0 > K$. The same formula from Case I remains valid. The only difference is that now $y(t) \to K$ from above as $t \to \infty$ (since $K - y_0 < 0$, the exponential term is negative and decaying).
Using the chain rule:
$$\frac{d^2y}{dt^2} = \frac{d}{dt}f(y) = f'(y)\frac{dy}{dt} = f(y)\,f'(y).$$Computing explicitly:
$$\frac{d^2y}{dt^2} = r^2 y\!\left(1 - \frac{y}{K}\right)\!\left(1 - \frac{2y}{K}\right).$$Hence:
$$\frac{d^2y}{dt^2} \begin{cases} > 0 & \text{if } 0 < y < K/2 \text{ (concave up)}, \\ = 0 & \text{if } y = K/2 \text{ (inflection point)}, \\ < 0 & \text{if } K/2 < y < K \text{ (concave down)}. \end{cases}$$The solution $y = K$ is stable and $y = 0$ is unstable. The inflection point occurs at $y = K/2$.
Consider the equation with the opposite sign:
$$\frac{dy}{dt} = -r\left(1 - \frac{y}{T}\right)y.$$The sign analysis is reversed:
$$\frac{dy}{dt} \begin{cases} < 0 & \text{if } 0 < y < T, \\ = 0 & \text{if } y = 0 \text{ or } y = T, \\ > 0 & \text{if } y > T. \end{cases}$$A similar procedure gives for $y_0 < T$:
$$y(t) = \frac{y_0 T}{y_0 + (T - y_0)e^{rt}} \to 0 \quad\text{as } t\to\infty.$$If $y_0 > T$, then there exists a finite time $t^*$ at which the solution blows up:
$$y_0 + (T - y_0)e^{rt^*} = 0 \implies t^* = \frac{1}{r}\ln\frac{y_0}{y_0 - T} > 0.$$In fact $y(t^*) = +\infty$. The concavity analysis gives the same structure as the original logistic:
$$\frac{d^2y}{dt^2} = r^2 y\!\left(1 - \frac{y}{T}\right)\!\left(1 - \frac{2y}{T}\right).$$Consider $\dfrac{dy}{dt} = 0.5\!\left(1 - \dfrac{y}{100}\right)y$ with $y(0) = 20$.
What are the equilibrium solutions?
Since $0 < y_0 = 20 < K = 100$, is $dy/dt$ positive or negative?
What is $y(t)$ as $t \to \infty$?
At what value of $y$ does the solution have an inflection point (change concavity)?
We have seen solution curves with different initial values that do not intersect. The following theorem justifies this.
Let $f$ and $\partial f/\partial y$ be continuous in a rectangle $\alpha < t < \beta$, $\gamma < y < \delta$ containing $(t_0, y_0)$. Then in some interval $t_0 - h < t < t_0 + h$ there is a unique solution $y = \phi(t)$ for $$\frac{dy}{dt} = f(t,y), \qquad y(t_0) = y_0.$$
Consider the IVP
$$\frac{dy}{dx} = \frac{3x^2 + 4x + 2}{2(y-1)}, \qquad y(0) = -1.$$We identify
$$f(x,y) = \frac{3x^2 + 4x + 2}{2(y-1)}, \qquad \frac{\partial f}{\partial y} = -\frac{3x^2 + 4x + 2}{2(y-1)^2}.$$The $\partial f/\partial y$ is continuous everywhere except $y = 1$. Since our initial condition is $y_0 = -1 \neq 1$, there is an interval about $y = -1$ (away from $y=1$) in which the IVP has a unique solution:
$$y = 1 - \sqrt{x^3 + 2x^2 + 2x}.$$Consider the IVP
$$\frac{dy}{dx} = y^{1/3}, \qquad y(0) = 0.$$Here $f(x,y) = y^{1/3}$ and $\dfrac{\partial f}{\partial y} = \dfrac{1}{3}y^{-2/3}$. Although $f$ is continuous everywhere, $\partial f/\partial y$ is not continuous at $y = 0$ — which is exactly where the initial condition lies. So no conclusion can be drawn about uniqueness.
The DE is separable:
$$\frac{3}{2}y^{2/3} = x + c.$$The condition $y(0) = 0$ gives $c = 0$. So
$$\phi_1(x) = \left(\frac{2}{3}x\right)^{3/2}, \qquad x \geq 0$$is a solution. But so is
$$\phi_2(x) = -\left(\frac{2}{3}x\right)^{3/2}, \qquad x \geq 0$$and even $\psi(x) \equiv 0$. One can construct infinitely many solutions:
$$\chi(x) = \begin{cases} 0, & 0 \leq x < x_0, \\ \pm\!\left(\frac{2}{3}(x - x_0)\right)^{3/2}, & x \geq x_0. \end{cases}$$One can verify that $\chi$ is continuous and differentiable even at $x_0$.
Consider the IVP $\;\dfrac{dy}{dt} = \dfrac{t}{y-2},\; y(0) = 1.$
What is $f(t,y)$?
What is $\partial f/\partial y$?
Where is $\partial f/\partial y$ discontinuous?
Since $y_0 = 1 \neq 2$, does the theorem guarantee a unique solution?
— End of Modelling Notes —