The Big Picture Python environment? Discuss Examples of unpredictability Email homework to me: chaos@cse.ucdavis.edu Chaos, Scientific American (1986) Odds, Stanislaw Lem, The New Yorker (1974) 1
Nonlinear Physics: Modeling Chaos and Complexity Jim Crutchfield chaos@cse.ucdavis.edu; http://cse.ucdavis.edu/ chaos Spring 2010 2008 WWW: http://cse.ucdavis.edu/ chaos/courses/nlp/ Questionnaire 1. Name: 2. Graduate or Undergraduate (circle one) 2 7 3. Email address: 4. Major/Field: 5. What programming language(s) have you used? (circle all appropriate) C or C++ or Java or Fortran or Python or Perl or Other 7 9 4 1 5 2 6. What level of programming experience do you have? (circle one) Little or Moderate or Extensive 1 5 3 8 1 9 0 7. Are you familiar with Unix? Yes or No (circle one) 8. Do you have a laptop? Yes or No (circle one) 9. Which OS(es) does it run? (circle all appropriate) Windows or OS X or Linux 3 5 3 10. Do you have a desktop machine? Yes or No (circle one) 11. Which OS(es) does it run? (circle all appropriate) Windows or OS X or Linux 1 1 2 Auditors 2 JavaScript 1 Lisp 1 Ruby 1 Math a 1 PHY 3 MAT 5 CSE 1 2
The Pendulum 3
Qualitative Dynamics (Reading: NDAC, Chapters 1 and 2) What is it? Analyze nonlinear systems without solving the equations. Why is it needed? In general, nonlinear systems cannot be solved in closed form. Three tools: Statistics Computation: e.g., simulation Mathematics: Dynamical Systems Theory Why each is good. Why each fails in some way. 4
Dynamical System: {X, T} State Space: X State: x X x X Dynamic: T : X X x, x X x x X X 5
Dynamical System... {X, T} Initial Condition: x 0 X Behavior: x 0,x 1,x 2,x 2,...... x 0 x 1 x 2 x 3 X 6
Dynamical System... For example, discrete time... Map: x t+1 = F ( x t ) t =0, 1, 2,... State: x t R n State Space x = (x 1,x 2,...,x n ) Dimension: n Initial condition: x 0 Dynamic: F : R n R n F = (f 1,f 2,...,f n ) Solution : x 0, x 1, x 2, x 3, x 4,... 7
Dynamical System... For example, continuous time... Ordinary differential equation (ODE): x = F ( x ) = d dt State: x (t) R n x = (x 1,x 2,...,x n ) Dimension: n Initial condition: x (0) Dynamic: F : R n R n F = (f 1,f 2,...,f n ) 8
Flow field for an ODE (aka Phase Portrait) Geometric view of an ODE: dx dt = F (x) dx dt x t = x x t x = x + t F (x) Each state x has a vector attached F (x) that says to what next state to go: x = x + t F (x). 9
Flow field for an ODE (aka Phase Portrait) Geometric view of an ODE... X = R 2 x = (x 1, x 2 ) F = (f 1 (x), f 2 (x)) x = x + t F ( x ) x 2 = tf 2 (x) x x 1 = tf 1 (x) 10
Geometric view of an ODE... Vector field (aka Phase Portrait): A set of rules: Each state has a vector attached That says to what next state to go X = R 2 11
Solving the ODE: Integrate the differential equation! x = F ( x ) x(t )=x(0) + x(t )=x(0) + T 0 T 0 dt x(t) dt F (x(t)) Time-T Flow: φ T The solution of the ODE, starting from a given IC x (T )=φ T ( x (0)) φ T : X X 12
Trajectory or Orbit: the solution, starting from some IC simply follow the arrows x (0) x (T ) 13
Time-T Flow: x (T )=φ T ( x (0)) x (0) x (T ) φ T Point: ODE is only instantaneous, Time-T Flow gives state for any time t 14
Time-T Flow: x (T )=φ T ( x (0)) x (0) x (T ) φ T Point: ODE is only instantaneous, behavior is the integrated, long-term result. 15
Example: Simple Harmonic Oscillator: ẍ = x v As two coupled, first-order DEs: ẋ = v v = x with initial condition: (x 0,v 0 ) Vector field: x Time-T flow (aka The Solution): φ T (x 0,v 0 )=(A cos(t + ω 0 ),Asin(T + ω 0 )) A = x 2 0 + v2 0 ω 0 = tan 1 v 0 x 0 16
Invariant set: Λ X Set mapped into itself by the flow: Λ = φ T (Λ) 17
Invariant set: Λ X Set mapped into itself by the flow: Λ = φ T (Λ) Example: Invariant point Fixed Point 18
Invariant set: Λ X Set mapped into itself by the flow: Λ = φ T (Λ) For example: Invariant circles Λ: Any circle Entire plane Pure Rotation (Simple Harmonic Oscillator) 19
Attractor: Λ X Where the flow goes at long times (1) An invariant set (2) A stable set: Perturbations off the set return to it For example: Equilibrium Λ Stable Fixed Point 20
Attractor: Λ X For example: Stable oscillation Λ Limit Cycle Note: Cycles in SHO, not stable in this sense; not attractors. 21
Preceding: A semi-local view... invariant sets and attractors in some region of the state space Next: A slightly Bigger Picture... the full roadmap for the behavior of a dynamical system 22
Basin of Attraction: B(Λ) The set of states that leads to an attractor Λ B(Λ) = {x X : lim t φ t (x) Λ} B(Λ 0 ) Λ 0 Λ 1 B(Λ 1 ) 23
Separatrix (aka Basin Boundary): B = X i B(Λ i ) The set of states that do not go to an attractor The set of states in no basin The set of states dividing multiple basins B 24
The Attractor-Basin Portrait: Λ 0, Λ 1, B(Λ 0 ), B(Λ 1 ), B(Λ 0 ) The collection of attractors, basins, and separatrices B(Λ 0 ) B Λ 0 Λ 1 B(Λ 1 ) 25
Back to the local, again Submanifolds: Split the state space into subspaces that track stability Stable manifolds of an invariant set: Points that go to the set W s (Λ) W s (Λ) = {x X : lim t φ t (x) Λ} Λ 26
Submanifolds... Unstable manifold: Points that go to invariant set in reverse time W u (Λ) Λ W u (Λ) = {x X : lim t φ t (x) Λ} 27
Example: 1D flows State Space: R State: x R Dynamic: F : R R ẋ = F (x) Flow: x(t )=φ T (x(0)) = x(0) + ẋ T 0 dt F (x(t)) -1.0 1.0 x 28
Example: 1D flows... Invariant sets: Λ={x,x,x } ẋ Fixed points: ẋ =0 Attractors: x,x = ±1 Repellor: x =0 Attractor x x Repellor Attractor x x 29
Example: 1D flows... Basins: B(x )=[, 0) B(x )=(0, ] Separatrix: B = {x } x x x B(x ) B(x ) Attractor-Basin Portrait: x,x,x, B(x ), B(x ), B(x ) 30
Example: 1D flows... Stable manifolds: W s (x ) = [, x ) W s (x )=(x, ] Unstable manifold: W u (x ) = (x, x ) W u (x ) x x W s (x ) x W s (x ) 31
Example: 1D flows... Hey! Most of these dynamical systems are solvable! For example, when the dynamic is polynomial you can do the integral for the flow for all times. What s the point of all this abstraction? 32
Reading for next dynamics lecture: NDAC, Sec. 6.0-6.4, 7.0-7.3, & 9.0-9.4 Reading for next programming lecture: Python, Part II (Chapters 4 and 7-9) and Part III (Chapters 11-13). 33