# Talk:Population dynamics/Analysis

**Note**: Please

**always sign your name**when editing talk page by putting

**four tildes**(

`~~~~`

) at the end of your comment.## refined model analysis

Based off one of my courses, I made a quick analysis of the refined model in terms of convergence and equilibrium. The theorems used are [citation needed] though since they're directly taken from said course's notes (and I only have references for the whole course). Plus I'm not sure the vocabulary is correct in English (translated from french). Please correct it if necessary.

Here goes:

Let's rename the variables for easier notation. x1 will be M(t) and x2 will be W(t). We can generalize the system as follows:

Where a_ij is the contribution of population j to population i (so a12 is the effect witches have on magical girls, etc)

We can write this system using matrix notation:

Where A and C are matrices containing the coefficients. To be exact, let A be

And let C be

The matrix C is constant and hence does not influence the results on stability/equilibrium.

We can prove that (first citation needed), it A's determinant is different than zero, then the only equilibrium for both M(t) and W(t) is when M(0) = 0 and W(0) = 0. (see observations on the page). The determinant of the matrix A is

Let us now discuss the stability, and other equilibria when det A yelds zero (i.e. B=K or D=-B).

### Equilibrium

For the further analyses, we ignore Kyubey's contribution (i.e. the matrix C). Basically, adding it would transform an equilibrium into a linear function, and so on.

If det A = 0 (i.e. if (B=K or D=-B), then the only equilibrium is at M(0)=0 and W(0)=0 (no witch, no MG => they can't exist by themselves). Otherwise, [second citation needed], all the equilibria are the states so that

This equation could only be satisfied if D=-B. This is inconsistent with the model (neither the amoung of girls dying nor the amount of girls becoming witches could be negative), so we'll discard this result. Hence, the only equilibrium would be M(0)=0, W(0)=0 when K=B

### Stability

The system is always unstable (i.e. inserting a small amount of witches from the "ideal situation" [ **W(t) = 0** ] will result in the Earth being taken over), unless K>B; in that particular case, the system is asymptotically stable (i.e. introducing a small number of witches will result in no witches after a certain amount of time). I can provide a partial mathematical demonstration of that, but it's quite long and it uses eigenvalues and complex numbers (and, as usual, it lacks citations for the theorems used). Do you want me to post it, or do we go by rational logic ("if B>K, the number of witches appearing is higher than the number of witches dying, so introducing a small amount of witches will result in exponentionnal growth. Otherwise, every girl kills more witches than what appears, so introducing witches from a state of equilibrium will result in the extinction of said witches over time")

A third option would of course be for someone to find a closed form of the system, so that the stability can be easily found by taking t going to infinity. --Homerun-chan 23:08, 19 March 2011 (UTC)

- The terrible nightmares of matrixes start flooding back. Just a thought, since we have a prop-function in how we define the differential equations, shouldn't the matrix
**A**have corresponding changes in representation? That is, if M>W, , if W>M, . Prima 15:56, 21 March 2011 (UTC)- Actually, this analysis was based off the basic model. You're right in that in the refined model, the matrix A would change with the relation between M and W. However, I think you swapped the two matrices:
- If M > W, min(M, W) = W, then the system becomes , hence the matrix A should be
- If M < W, then min(M, W) = W and the system becomes , hence the matrix should be

- The stability analysis for that one is gonna be pretty long, since det A is zero in the first case but not in the second ...
- --Homerun-chan 16:20, 21 March 2011 (UTC)
- This stability in the first
**A**matrix is associated with the observation by our japanese collegies in regards to F+B-K. Only when F+B-K is negative do we stay with the first 'A' matrix for the whole period, and the stable state corresponds with W=0 and M depends only on Matrix B. Prima 18:18, 21 March 2011 (UTC)

- This stability in the first

- Actually, this analysis was based off the basic model. You're right in that in the refined model, the matrix A would change with the relation between M and W. However, I think you swapped the two matrices:

On a totally unrelated note, >mfw more than 350 tweets about this page in the past hour, and 20-50 more every minute...

- Matrix calculus is not my strong point, so I will need some time to figure out your analysis. In other words, you're right about the tweets: http://mb.tweetbuzz.jp/entry/36044431 . Prima 13:13, 19 March 2011 (UTC)
- I'll try and find the references, that'll make things easier. I'm pretty sure there are a lot of inconsistencies in my analysis too; I don't think ignoring Kyubey's contribution would be so easy... --Homerun-chan 13:16, 19 March 2011 (UTC)
- Ah, the original tweet came from the a Sony developer, Keijiro Takahashi, whom lead the development of Ape Escape 3. Prima 14:09, 19 March 2011 (UTC)
- I see. Too bad we can't put that on our resume ;_; --Homerun-chan 14:28, 19 March 2011 (UTC)

- Yay, we have more tweets that the non-stop nyan cat. Somehow that's an achievement, given that we obviously lack rainbows and BGMs --Homerun-chan 22:16, 17 April 2011 (UTC)

- I see in the refined model, you changed the initial state of W(0) to 1. I think we just found our Walpurgis Night.