Modelling with differential equations

110 Views Asked by At

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.

2

There are 2 best solutions below

0
On 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

2
On

You must express your annual flow as a state transition matrix first

Notice that sum of rows are 1 so no people are getting lost during the transition as expected. \begin{pmatrix} {3/10} & 0 & 4/10 \\ 5/10 & 7/10 & 2/10 \\ 2/10 & 3/10 & 4/10 \end{pmatrix} Then you need to find eigenvectors and eigenvalues of this transition matrix.

$$λ_1 = 1$$ $$λ_2= \frac{-i*\sqrt{3}+2}{10}$$ $$λ_3 = \frac{i*\sqrt3+2}{10} $$

In order for our system to stabilize we need all of our eigenvalues between -1<λ<=1 so our exponents aren't able to get us towards infinity.

Since we have complex numbers among our eigenvalues it might be hart to determine how they will behave when their exponents are going to infinity. We can test their behaviour with basic limit test as their exponents are going to infinity.

I wont include the limit calculations but it turns out that our 2nd and 3rd eigenvalues are going to "0" when their exponent approaches infinity. So we are good to go.

As the analogy states, we can say that at the infinity state of our system will only be determined with 1st eigenvalue since others will go to "0". Remember the nth state equation of a system is;

$$U(n) = C_1*λ_1^n*S_1 + C_2*λ_2^n*S_2 + ... $$

In this equation, C is initial state λ's are our eigenvalues and S's are our eigenvectors which is associated with corresponding eigenvalue in the same section of the equation.

So we need to decompose our initial state into multipliers of eigenvectors. Remember that a matrix can be represented by using its eigenvectors since eigenvectors are base vectors of our matrix. So our equation is like below

$$\begin{pmatrix} 100000 \\ 100000 \\ 100000 \end{pmatrix}= C_1*\begin{pmatrix} 4/7 \\ 34/21 \\ 1 \end{pmatrix} +C_2*\begin{pmatrix} i\sqrt{3}-1 \\ -i\sqrt{3} \\ 1 \end{pmatrix} +C_3*\begin{pmatrix} -i\sqrt{3}-1 \\ i\sqrt{3} \\ 1 \end{pmatrix}$$

I already calculated eigenvectors and implemented them above but I think you can figure that out by yourself. Now issue starts here, when we try to find C values, our matrix becomes inconsistent. Which means while we need a independent square matrix, we simply don't. It ends up as a rank 2 matrix which makes this impossible for us to continue.

I think as your class is an introduction class, this example is already too complex as it contains non-real eigens. I think there is an issue with the question but maybe I'm missing something.