Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168740
Image: ubuntu2004

(Nonlinear) Dynamics

Adam Getchell

Motivation

Why do we care about nonlinear systems? Well, first of all, because we can draw pretty pictures with fractals which captures public interest:

You can Google for many, many more examples, and there are tons of software packages dedicated just to creating beautiful images with fractals.

More importantly, many, many natural phenomena of interest occur that are essentially non-linear. In the linear world, you can break the system down into composite parts, solve each part separately, and then recombine the solutions to get the final answer.

(Un)Fortunately, the universe is quite a bit more complicated. Although we have made great progress in science using simplified models with linear properties, to understand more we need a new kind of ... we need extend our current toolset a bit, and incorporate all the advances of the past into a cohesive approach.

Dynamics, then, is the study of systems that change and evolve in time.

There are two types of dynamical systems: differential equations in continuous time and iterated maps (aka difference equations) in discrete time. When we solve them, often we know solutions for a particular set of initial conditions. We can then construct an abstract phase space describing the possible solution trajectories of the system. The goal of dynamics is to do the reverse: from the system, draw the trajectories from the phase space. This kind of geometric reasoning will often give good information about the solutions without actually solving the system!

A trick: most physical systems of interest have a time component. But by parametrizing time (set xn+1=tx_{n+1} = t such that dxn+1dt=1\frac{dx_{n+1}}{dt} = 1) we can turn an n-dimensional time-dependent system into an (n+1)-dimensional time independent system. (But don't tell the GR-string theory-quantum gravity crowd ;-)

Dynamics - A Capsule History (Table 1.1.1 from Strogatz, Steven H. Nonlinear Dynamics and Chaos: With Applications to Physics, Biology)
1666 Newton Invention of calculus, explanation of planetary motion
1700s Flowering of calculus and classical mechanics
1800s Analytical studies of planetary motion
1890s Poincare Geometric approach, nightmares of chaos
1920-1950 Nonlinear oscillators in physics and engineering, invention of radio, radar, laser
1920-1960 Birkhoff
Kolmogorov
Arnol'd
Moser
Complex behavior in Hamiltonian mechanics
1963 Lorenz Strange attractor in simple model of convection
1970s Ruelle & Takens
May
Fiegenbaum

Winfree
Mandelbrot

Turbulence and chaos
Chaos in logistic map
Universality and renormalization, connection between chaos and phase transitions
Experimental studies of chaos
Nonlinear oscillators in biology
Fractals
1980s Widespread interest in chaos, fractals, oscillators, and their applications

Introduction

A major technique in the analysis of nonlinear systems is the use of pictures. The basic idea is to recast a differential equation as a vector field. This often gives insight into systems for which no closed-form solution exists.

Consider the following equation: dxdt=sin(x) \large \frac{dx}{dt} = \sin(x) First, note that this equation is exactly solvable. Many systems of interest do not have closed form solutions. Anyway, by separating variables we get: dt=dxsin(x) \large dt = \frac{dx}{\sin(x)} Sage can solve this very quickly:

integral(csc(x),x)
-log(csc(x) + cot(x))

Now, this is an indefinite integral, which means the actual solution is: t=logcsc(x)+cot(x)+C \large t = -\log|\csc(x) +\cot(x)| + C We have to find the constant C by the usual means, let x=x0@t=0x = x_0 @ t = 0. Then C=logcsc(x0)+cot(x0)C = log|csc(x_0) + cot(x_0)|, and the full solution is: t=logcsc(x0)+cot(x0)(csc(x)+cot(x) \large t = \log|\frac{\csc(x_0) + \cot(x_0)}{(\csc(x) + \cot(x)}| But what does this mean exactly?

Quick, if x0=π/4x_0=\pi/4, what happens as tt\rightarrow\infty? What happens as tt\rightarrow\infty for arbitrary x0x_0?

Let's think about this another way.

Instead, let's plot dxdt\frac{dx}{dt} versus x, and think of the function as a vector field with fluid flowing steadily along the x-axis with velocity that varies according to the rule dxdt=sin(x)\frac{dx}{dt} = \sin(x).

''' Plot vector field picture of f Later, this should calculate arrows from zeroes of f automatically ''' plotrange = 3 x = var('x') f = sin(x) # Add plot g = plot(f, -plotrange * pi, plotrange * pi) # Add arrows startx = [] endx = [] arrow_len = 1 def create_arrow_endpoints(start, end, arrow_length, n, parity): if parity: start.append(n*pi - arrow_length) start.append(n*pi + arrow_length) end.append(n*pi) end.append(n*pi) else: start.append(n * pi) start.append(n * pi) end.append(n*pi - arrow_length) end.append(n*pi + arrow_length) for i in range(-plotrange, plotrange+1): odd = (True if i % 2 != 0 else False) create_arrow_endpoints(startx, endx, arrow_len, i, odd) y = [0 for y in range(len(startx))] arrowstart = zip(startx, y) arrowend = zip(endx, y) def arrow_gen(start, stop): ''' Creates an arrow starting at start and ending at stop with color and line width ''' return arrow(start, stop, rgbcolor=(1,0,0), width=0.05) for i in range(len(arrowstart)): g += arrow_gen(arrowstart.pop(), arrowend.pop()) g.show()

When dxdt\frac{dx}{dt} is positive, flow is to the right (+x direction). When dxdt\frac{dx}{dt} is negative, flow is to the left (-x direction). Where dxdt\frac{dx}{dt} is zero, there is no flow, and these are called fixed points. Notice that the fixed points can be classified in terms of their stability:

  • Stable fixed points (attractors)
  • Unstable fixed points (repellors)
  • Saddle points

This classification carries over to higher-dimensional systems, with additions. For now, note that stability is a local property only; if you perturb the system far enough, you will get different behavior.

If we plot the actual solution to the equation (now x is the x-axis, t is the y-axis), we get:

@interact def f(c = slider(-10, 10, .25, label = 'x0')): print c show(plot(log(abs((((csc(c)+cot(c))/(csc(x)+cot(x))))))))

Inspecting this, just like in the previous diagram we can see that for π4\frac{\pi}{4} the system tends to accelerate at first towards the right, but then slow down as it approaches a limiting value. Of course, often times we don't have the luxury of an exact equation to plot!

In the previous case, we found the fixed points of the system, which helped us identify the behavior of the equation for various domains of interest. Next, we'll consider adding a parameter r to the system. We'll start off with a simple equation, y=x2+ry = x^2 + r:

@interact def f(r = slider(-3,3,.25, label = 'r')): show(plot(r + x**2, -3, 3))

Notice that the location and classification of our fixed points depends upon the value of r.

Now let's look at a deceptively simple equation, the Logistic equation: y=rx(1x) \large y = r*x*(1-x)

@interact def f(r = slider(0, 5,.1, label='r')): show(plot(r * x * (1.0 - x), 3, -3))

Something strange is going on here; we are getting different values. One tool we can use to look at its stability is a CobWeb diagram.

Now lets go onto 2D systems. Let's consider the system with the parameter a: dxdt=y+ax(x2+y2) \large \frac{dx}{dt} = -y + ax(x^2+y^2) dydt=x+ay(x2+y2) \large \frac{dy}{dt} = x + ay(x^2+y^2)

a=-1 plot_vector_field((lambda x,y:-y+a*x*(x^2+y^2),lambda x,y:x+a*y*(x^2+y^2)), (x,-3,3),(y,-3,3))

Bifurcation and Period doubling

%cython '''Plot a bifurcation diagram for the Logistic Map x_n+1 = r*x_n*(1 - x_n) ''' from numpy import * from pylab import * import math # Define LogisticMap def LogisticMap(double r, double x): #return r * x * (1.0 - x) return r * x - x*x*x # Setup parameter range rlow = 1 rhigh = 4.0 # Setup the plot # Stuff parameter range into a string via the string formating commands. TitleString = 'Logistic map, f(x) = r*x*(1 - x), ' TitleString += 'bifurcation diagram for r in [%g,%g]' % (rlow,rhigh) title(TitleString) # Label axes xlabel('Control parameter r') ylabel('{X(n)}') # Set the initial condition used across the different parameters ic = .01 # Establish the arrays to hold the set of iterates at each parameter value # The iterates we'll throw away nTransients = 200 # This sets how much the attractor is filled in nIterates = 250 # This sets how dense the bifurcation diagram will be nSteps = 500 # Sweep the control parameter over the desired range rInc = (rhigh-rlow)/float(nSteps) for r in arange(rlow,rhigh,rInc): # Set the initial condition to the reference value state = ic # Throw away the transient iterations for i in xrange(nTransients): state = LogisticMap(r,state) # Now store the next batch of iterates rsweep = [ ] # The parameter value x = [ ] # The iterates for i in xrange(nIterates): state = LogisticMap(r,state) rsweep.append(r) x.append( state ) plot(rsweep, x, 'k,') # Plot the list of (r,x) pairs as pixels # Use this to save figure as a bitmap png file savefig('LogisticBifn', dpi=100) # Turn on matplotlib's interactive mode. #ion() # Display plot in window show()

Bifurcation for Cosine map

Universality

It's remarkable how similiar these two bifurcation plots look, even for systems with quite different character. The resemblance is more than skin deep. Due to a 1973 theorem by Metropolis et. al., the periodic attractors always occur in the same sequence! This sequence is called the U-sequence:

1,2,2x2,6,5,3,2x3,5,6,4,6,5,6... \large 1, 2, 2x2, 6, 5, 3, 2x3, 5, 6, 4, 6, 5, 6 ...

Thus, for systems in the low range of chaotic behavior, the form of f(x)f(x) is irrelevant!

Furthermore, they all period-double at same rate! This rate is given by the Feigenbaum constant, δ=4.699\delta = 4.699.

Amazingly, regardless of the details of the physical system, they exhibit bifurcations (period-doubling) in the same order, at the same rate!

Chaos

Chaos is defined as aperiodic long-term behavior in a deterministic system that exhibits sensitive dependence on initial conditions (positive Liapunov exponent).

Chaos is not equivalent to instability. For example, dxdt=x\frac{dx}{dt}=x is deterministic and shows separation of nearby trajectories. It's not chaotic because the trajectories are repelled to inifinity and never return. So \infty acts like an attracting fixed point, whereas true chaotic behavior is aperiodic (which excludes fixed points as well as periodic behavior).

The canonical example is the Lorenz equations: dxdt=σ(yx)\frac{dx}{dt} = \sigma(y-x) dydt=rxyxz\frac{dy}{dt} = rx - y -xz dzdt=xybz\frac{dz}{dt} = xy - bz

In sum, there's a lot more we don't know about dynamical systems and chaos. Hopefully many of you will help find answers!

Table 1.3.1 from Strogatz, Steven H. Nonlinear Dynamics and Chaos: With Applications to Physics, Biology)
Number of variables \rightarrow
n=1 n=2 n>=3 n>>1 Continuum
Linear Growth, decay, or equilibrium Oscillations Collective phenomena Wave and patterns
Exponential growth
RC circuit
Radioactive decay
Linear oscillators
Mass and spring
RLC circuit
2-body problem (Kepler, Newton)
Civil engineering, structures
Electrical engineering
Coupled harmonic oscillators
Solid-state physics
Molecular dynamics
Equilibrium statistical mechanics
Elasticity
Wave equations
Electromagnetism (Maxwell)
Quantum mechanics (Schrodinger, Heisenberg, Direc)
Heat and diffusion
Acoustics
Viscous fluids
Nonlinear Fixed points
Bifurcations
Overdamped systems, relaxational dynamics
Logistic equation for single species
Pendulum
Anharmonic oscillators
Limit cycles
Biological oscillators (neurons, heart cells)
Predator-prey cycles
Nonlinear electronics (van der Pol, Josephson)
Chaos
Strange attractors (Lorenz)
3-body problem (Poincare)
Chemical kinetics
Iterated maps (Feigenbaum)
Fractals (Mandelbrot)
Forced nonlinear oscillators (Levinson, Smale)
Practical uses of chaos
Quantum chaos?
Coupled nonlinear oscillators
Lasers, nonlinear optics
Nonequilibrium statistical mechanics
Nonlinear solid-state physics (semiconductors)
Josephson arrays
Heart cell synchronization
Neural networks
Immune system
Ecosystems
Economics
Spatio-temporal complexity
Nonlinear waves (shocks, solitons)
Plasmas
Earthquakes
General Relativity (Einstein)
Quantum field theory
Reaction-diffusion, biological and chemical waves
Fibrillation
Epilepsy
Turbulent fluids (Navier-Stokes)
Life

Thanks to Professor James Crutchfield and his PHY 250 Nonlinear Dynamics class

References:

Strogatz, Steven H. Nonlinear Dynamics and Chaos: With Applications to Physics, Biology. Studies in Nonlinearity. Westview Press, 2001.