Modelling Differential Equations

In this lesson, we will look at setting up DEs for various applications.

Mixtures

Suppose a tank contains a mixture with some initial concentration. There can be flows coming in and out of the rank at different rates and concentrations. Overall, the change in concentation is:

\(\cfrac{dA}{dt} = \text{rate}_{\text{in}} - \text{rate}_{\text{out}}\)

Chocolate containing \(0.04 \; \left[\frac{\text{kg}}{\text{L}}\right]\) of almonds enters a tank at a rate of \(3 \left[\frac{\text{L}}{\text{hr}}\right]\). The mixture is well mixed and drains at a rate of \(5 \; \left[\frac{\text{L}}{\text{hr}}\right]\). The tank originally has \(100 \; [\text{L}]\) containing \(1 \; [\text{kg}]\) of almonds. Write a DE and describe how to solve for \(A(t)\) the amount of almonds at time \(t\).

We set up the equation as rate in less rate out. We will also assume the mixture is homogeneous.

\(\cfrac{dA}{dt} = \text{rate}_{in} - \text{rate}_{out} \)

We can determine the rate coming in as such:

\(\text{rate}_{in} = 0.04 \; \left[\cfrac{\text{kg}}{\text{L}}\right] \times 3 \; \left[\cfrac{\text{L}}{\text{hr}}\right]\)

\(\text{rate}_{in} = 0.12 \left[\cfrac{\text{kg}}{\text{hr}}\right]\)

The rate out depends on the total amount (\(\text{kg}\)) divided by the volume (\(\text{L}\)). Since the rate in is \(3\) and the rate out is \(5\), the volume will decrease \(2 \frac{L}{hr} \):

\(\text{rate}_{out} = \cfrac{A}{100-2t} \left[\cfrac{\text{kg}}{\text{L}}\right] \cdot 5 \left[\cfrac{\text{L}}{\text{hr}}\right]\)

\(\text{rate}_{out} = \cfrac{5A}{100-2t} \left[\cfrac{\text{kg}}{\text{hr}}\right]\)

The DE for this model is:

\(\cfrac{dA}{dt} = 0.12 - \cfrac{5A}{100-2t}\)

This is a linear DE that is not separable. You can solve it by putting it in standard form and finding an integration factor:

\(\cfrac{dA}{dt} + \cfrac{5A}{100-2t} = 0.12 \)

\(\cfrac{dA}{dt} + \cfrac{5}{100-2t}A = 0.12\)

\(P(t) = \cfrac{5}{100-2t} \)

\(\mu(t) = e^ {\int \cfrac{5}{100-2t} dt }\)

The initial value condition here is:

\(A(0) = 1\)


Radioactive Decay

A radioactive element decays at a constant rate proportional to the nunmber of remaining nuclides:

\(\cfrac{dN}{dt} = -kN\)

This is a linear DE that is separable. It can be solved by direct integration:

\(N = N_0 e^{-kt}\)

Where \(N_0\) is the initial amount in grams of number of nuclides.


Electric Circuits

A series circuit with a resistor and inductor has the following DE:

\( L \cfrac{di}{dt} + Ri = E \)

This is a linear DE that is also separable:

\( \cfrac{di}{E - Ri} = \cfrac{dt}{L}\)

\( \ln {(E - Ri)} = c_1 - \cfrac{Rt}{L}\)

\( E - Ri = c_2e^{\cfrac{-Rt}{L}}\)

\( Ri = E - c_2e^{\cfrac{-Rt}{L}}\)

\( i(t) = \cfrac{E}{R} + C e^{\cfrac{-Rt}{L}}\)


Try these questions: