Modelling with differential equations

linear algebramatrix exponentialordinary differential equations

I am taking a linear algebra applications course and my teacher asked us to solve a problem using differential equations although I've never studied them. Once I get the right matrix I believe I can solve the problem. Here's the problem and how I'm tackling it. Let me know if I set up the equations in the right way.

Problem:

The population migration flow between three neighbourhoods (A,B,C) of a city is observed.

The annual flow is estimated as

  • half of the population of neighbourhood A moves to neighbourhood B
  • 20% of the population in neighbourhood A moves to neighbourhood C
  • 30% of the population in neighbourhood B moves to neighbourhood C
  • From neighbourhood C, 40% go to A and 20% go to B

Build a difference equation for the annual population distribution of the three neighbourhoods, which remains constant ( = 300,000 inhabitants!). And find out what values ​​it tends towards when we start with 100,000 people in each neighbourhood.

My solution:

$\frac{dA}{dt} = \frac{3}{10}A + \frac{5}{10}B + \frac{2}{10}C$

$\frac{dB}{dt} = \frac{7}{10}B + \frac{3}{10}C$

$\frac{dC}{dt} = \frac{4}{10}A + \frac{2}{10}B + \frac{4}{10}C$

From here, what I would do is to calculate:

$u(t) = \exp(tM)u(t_0)$, where M is the matrix of coefficients from the above equations and $t_0$ is the initial population vector $[100,100,100]$.

Am I doing it right? When I tried to calculate $\exp(tM)$ I got something really bizarre, so I'm not sure if I made a mistake while building the equations or what.

Best Answer

By transcribing the movements: $$\begin{aligned}A_1-A_0&=\color{blue}{0.4C_0}\color{red}{-0.5A_0-0.2A_0}=0.4C_0-0.7A_0 \\ B_1-B_0&=\color{red}{0.5A_0}\color{green}{-0.3B_0}\color{blue}{+0.2C_0} \\ C_1-C_0&=\color{red}{0.2A_0}\color{green}{+0.3B_0}\color{blue}{-0.4C_0}\color{blue}{-0.2C_0}=0.2A_0+0.3B_0-0.6C_0 \end{aligned}$$ Thus for $t \in \mathbb{N}_0$ $$\begin{bmatrix} \Delta A_{t+1} \\ \Delta B_{t+1} \\ \Delta C_{t+1} \\ \end{bmatrix}= \begin{bmatrix} -0.7 & 0 & 0.4 \\ 0.5 & -0.3 & 0.2 \\ 0.2 & 0.3 & -0.6\\ \end{bmatrix} \begin{bmatrix} A_{t} \\ B_{t} \\ C_{t} \\ \end{bmatrix}$$ Which becomes the dynamical system (add one of each) $$\begin{bmatrix} A_{t+1} \\ B_{t+1} \\ C_{t+1} \\ \end{bmatrix}= \begin{bmatrix} 0.3 & 0 & 0.4 \\ 0.5 & 0.7 & 0.2 \\ 0.2 & 0.3 & 0.4\\ \end{bmatrix} \begin{bmatrix} A_{t} \\ B_{t} \\ C_{t} \\ \end{bmatrix}$$ We want to see what happens as $t \to \infty$ for $A_0=B_0=C_0=100000$. If you can program, a simple for loop does the trick. The populations seem to reach an equilibrium.

enter image description here

Related Question