In [3]:
import numpy as np
import sympy as sp
import pandas as pd
import math

import final as p1

import matplotlib.pyplot as plt

%matplotlib inline


Chinmai Raman


Given three real-valued functions of time x(t), y(t), z(t), consider the following coupled first-order ODEs:

$x˙ = −y − z, y˙ = x + ay, z˙ = b + z(x − c)$

where a = b = 0.2 and c is a parameter that we will tune. Note that this system has a single nonlinear term xz.

I will be exploring the consequences of this nonlinearity.

Problem 1 (c = 2)

In [4]:
ros = p1.Rossler(2)

In [5]:

In [6]:

In [7]:

In [8]:

In [9]:

In [10]:

In [11]:

Problem 2 (c = 2, 3, 4, 4.15, 4.2, 5.7)

c = 2 is plotted above

c = 3

In [12]:
ros3 = p1.Rossler(3)

In [13]:

In [14]:

In [15]:

Already we can see a bifurcation occuring in the y vs x and z vs y vs x graphs that were not there in the case of c =2. The nonlinearity in the z variable has begun to become active in that the trajectory is leaving the x-y plane.

The x vs t graph shows us that the x-values are now alternating between four values, as opposed to two previously. This is identical to the behavior we saw from the logistic update map on the midterm.

c = 4

In [16]:
ros4 = p1.Rossler(4)

In [17]:

In [18]:

In [19]:

Another bifurcation has now occured and is apparent in the y vs x graph. The limits of the x-values are now eight-fold; the number of values that x converges to has doubled again. The influence of the non-linearity in z is now very obvious.

c = 4.15

In [20]:
ros415 = p1.Rossler(4.15)

In [21]:

In [22]:

In [23]:

The period doubling is occuring at an increasing rate. This is demonstrated by the thicker lines in the xy and xyz graphs. This period doubling phase will soon end as the system approaches complete chaos and the our predictive power decreases greatly.

c = 4.2

In [24]:
ros42 = p1.Rossler(4.2)

In [25]:

In [26]:

In [27]:

The lines are getting thicker as the bifurcations increase at an increasing rate. It is now not immediately apparent how many asymptotic values x approaches from the x vs t graph.

c = 5.7

In [28]:
ros57 = p1.Rossler(5.7)

In [29]:

In [30]:

In [31]:

The period doubling cascade has given rise to a chaotic attractor with a single lobe. This is an example of spiral-type chaos and exhibits the characteristic sensitivity to initial conditions. The oscillations in the x vs t graph are now completely chaotic and irregular in amplitude. The logistic update map also displays the same behavior of a period doubling cascade giving rise to a chaotic system. As we increase c, this system, like the logistic update map from the midterm as ve vary initial conditions, also demonstrates the stretching and folding quality that we discussed in class. The xyz graph is also reminiscent of a mobius strip in that the underside becomes the upperside via the portion of the graph not in the x-y plane.

Problem 3

In [32]:

In [33]:

In [34]:

The diagram of the local maxima of x vs c shows the bifurcation in maxima as c increases. The first bifurcation in x-values occurs around 2.7. The next occurs around 3.7, followed by one around 4.2. The system attains chaos around 5.7, at which point our predictive power of the asymptotic x-values is gone. This behavior is similar to that from the logistic update map from the midterm. The local maxima of y vs c plot is similar to the x vs c, except that the graph is squished downward. The bifurcations occur at the same values, however. The z maxima vs c graph is particularly interesting, because the majority of maxima occur at values below five, but there is a small chain of maxima that continue to increase in value as c increases. These maxima constitute the lobe that exits the x-y plane as show in the xyz graph from problem 1.

Unfortunately, python was taking too long for me to use the required mesh spacing of 0.001, so I simply used as many points as I could for the bifurcation diagram without ipython having to take an hour to visualize a single plot instead. I assume that this would have worked much faster in Julia. Hopefully, the diagrams are still relatively clear.

In [ ]: