Saturday, December 12, 2015

Logistic Equation


The Logistic equation is an amazing and interesting equation that comes up in discrete dynamical systems. A discrete dynamical system is a system whose behavior changes over time and is not continuous. For example the logistic equation could be used to model the population of a certain species of animal that only reproduces at a certain time of the year, therefore the population size is not a continuous function. This is the logistics equation
pn+1 = Rpn(1-pn)
The  pn+1 represents the next population term while pn represents the previous one the population terms are percents so they will always be between 0 and 1. The R term is the growth rate and the (1-pn) is the annihilation perimeter so our equation takes into account overcrowding. A big part in discrete dynamical systems is finding fix points because those are the points that are going to either repel or attract. To find these fix points we need to set our function f(x) = x ,because a fix point is when we plug that number into the function we get that same number as our output, then solve. If we do that with our logistic equation we get

                                                    
We can see that we now have a quadratic equal to zero so if we find the roots we will get
                                                      
So we can see with the logistic equation that 0 is always going to be one of our fix points and that the other one is dependent on what our growth factor is. Below I have generated three different seeds and as we can see they may start out at different spots but after a few iterations they all approach the same fix point.


R valueSeed 1Seed 2Seed 3
20.1
0.111
0.112
20.18
0.197358
0.198912
20.2952
0.3168156397
0.3186920325
20.41611392
0.4328869803
0.4342548419
20.4859262512
0.4909916852
0.4913551484
20.4996038592
0.4998377005
0.4998505331
20.49999968610.4999999473
0.4999999553
20.50.5
0.5
20.50.5
0.5



As we can see the the charts and graphs when our R value is 2 the fix points are at 0 and .5 and since .5 is an attracting point (the seeds are being pulled to that value) it draws in all the different seeds, while zero is a repelling point(pushes values away from it). The values for our seeds do not matter as long as we pick values between 0 and 1 notice that as long as I have a nonzero seed the orbit will go to .5.

k valueSeed 1
Seed 2
Seed 3
20
0.9
0.4
20
0.18
0.48
20
0.2952
0.4992
20
0.41611392
0.49999872
20
0.4859262512
0.5
20
0.4996038592
0.5
20
0.4999996861
0.5
20
0.5
0.5
20
0.5
0.5



The interesting part about the logistic equation is that it has the period doubling property, which means that a slight change in the parameter will change the behavior in the system causing it to have double the period. So in the case logistic equation the period doubling happens between growth factors of 3 and 4. Once we change our growth factor to four so much period doubling has happened that the logistic equation takes on chaotic behavior. Before when we picked seeds they all eventually reached the same fixed point now if we pick different seeds even if they are super close to each other after a few iterations their orbits will be completely different.

R valueSeed 1
Seed 2
Seed 3
40.1
0.1110.112
40.36
0.394716
0.397824
40.9216
0.9556611174
0.9582402601
40.28901376
0.1694917844
0.1600634561
40.8219392261
0.5630572778
0.5377725845
40.5854205387
0.9840951189
0.9942929274
40.9708133262
0.06260766357
0.02269800754
40.1133392473
0.2347517761
0.08873123197
40.4019738493
0.718573519
0.3234320018
40.96156349510.80890246720.875294968
40.1478365599
0.618317063
0.436614748
40.5039236459
0.9440042904
0.9839292393

As we can see in the chart even though the seed for all three of these orbits were extremely close after just a few iterations they their orbits are completely different unlike the ones we saw above that all converged to the same fix point.

The orbits of any nonzero seed under a growth factor of four will hardly ever look like anything a like this is because as we said earlier the logistic equation has a period doubling property. In the chart below we can see the growth factor versus the non zero fixed point value. As you can see as you increase your r value from 2.4 to 3 you go from one non zero fixed point to two and as you increase it more you go to four and this keeps happen as you get to an r value of 4. 


As you can tell it is impossible to tell how many possible fixed points there are at a growth factor of 4 in there is no way to predict what an orbit might look like, this is what we call chaos. A very important idea that I have learned from the logistic equation is that making small changes can drastically affect our outcome. I find it crazy how when we have an r of three we know exactly what the behavior of every orbit is but when we change that factor to 4 we have no idea what the behavior of any orbit is besides the trivial one. I think the logistic equation provides some very important mathematical insight in the idea of chaotic behavior. I've heard the term chaotic behavior and had some idea of what it meant in mathematics but after working with the logistics equation I believe I understand it much better after coming a crossed it with my own work and seeing how truly unpredictable it can appear to be. I am very curious to see if the logistic equation will play a part in the efforts to try and understand chaotic behavior better and maybe even come up with a way to better predict what will happen in this chaos.