15.08.2015 Views

Introduction to the Modeling and Analysis of Complex Systems

introduction-to-the-modeling-and-analysis-of-complex-systems-sayama-pdf

introduction-to-the-modeling-and-analysis-of-complex-systems-sayama-pdf

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

84 CHAPTER 5. DISCRETE-TIME MODELS II: ANALYSISAs we studied already, this equation can be turned in<strong>to</strong> <strong>the</strong> following two-dimensionalfirst-order model:x t = x t−1 + y t−1 (5.46)y t = x t−1 (5.47)This can be rewritten by letting (x t , y t ) ⇒ x t <strong>and</strong> using a vec<strong>to</strong>r-matrix notation, as( ) 1 1x t = x t−1 . (5.48)1 0So, we just need <strong>to</strong> calculate <strong>the</strong> eigenvalues <strong>and</strong> eigenvec<strong>to</strong>rs <strong>of</strong> <strong>the</strong> above coefficientmatrix <strong>to</strong> underst<strong>and</strong> <strong>the</strong> asymp<strong>to</strong>tic behavior <strong>of</strong> this system. Eigenvalues <strong>of</strong> a matrix Acan be obtained by solving <strong>the</strong> following equation for λ:det(A − λI) = 0 (5.49)Here, det(X) is <strong>the</strong> determinant <strong>of</strong> matrix X. For this Fibonacci sequence example, thisequation is( )1 − λ 1det= −(1 − λ)λ − 1 = λ 2 − λ − 1 = 0, (5.50)1 −λwhich givesλ = 1 ± √ 52(5.51)as its solutions. Note that one <strong>of</strong> <strong>the</strong>m ((1 + √ 5)/2 = 1.618 . . .) is <strong>the</strong> golden ratio! It isinteresting that <strong>the</strong> golden ratio appears from such a simple dynamical system.Of course, you can also use Python <strong>to</strong> calculate <strong>the</strong> eigenvalues <strong>and</strong> eigenvec<strong>to</strong>rs (or,<strong>to</strong> be more precise, <strong>the</strong>ir approximated values). Do <strong>the</strong> following:Code 5.6:from pylab import *eig([[1, 1], [1, 0]])The eig function is <strong>the</strong>re <strong>to</strong> calculate eigenvalues <strong>and</strong> eigenvec<strong>to</strong>rs <strong>of</strong> a square matrix.You immediately get <strong>the</strong> following results:Code 5.7:(array([ 1.61803399, -0.61803399]), array([[ 0.85065081, -0.52573111],[ 0.52573111, 0.85065081]]))

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!