``````

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

``````

# Final

## Chinmai Raman

### 5/21/2016

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)
ros.run()

``````
``````

In [5]:

ros.plotx()

``````
``````

``````
``````

In [6]:

ros.ploty()

``````
``````

``````
``````

In [7]:

ros.plotz()

``````
``````

``````
``````

In [8]:

ros.plotxy()

``````
``````

``````
``````

In [9]:

ros.plotyz()

``````
``````

``````
``````

In [10]:

ros.plotxz()

``````
``````

``````
``````

In [11]:

ros.plotxyz()

``````
``````

``````

### 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)
ros3.run()

``````
``````

In [13]:

ros3.plotx()

``````
``````

``````
``````

In [14]:

ros3.plotxy()

``````
``````

``````
``````

In [15]:

ros3.plotxyz()

``````
``````

``````

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)
ros4.run()

``````
``````

In [17]:

ros4.plotx()

``````
``````

``````
``````

In [18]:

ros4.plotxy()

``````
``````

``````
``````

In [19]:

ros4.plotxyz()

``````
``````

``````

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)
ros415.run()

``````
``````

In [21]:

ros415.plotx()

``````
``````

``````
``````

In [22]:

ros415.plotxy()

``````
``````

``````
``````

In [23]:

ros415.plotxyz()

``````
``````

``````

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)
ros42.run()

``````
``````

In [25]:

ros42.plotx()

``````
``````

``````
``````

In [26]:

ros42.plotxy()

``````
``````

``````
``````

In [27]:

ros42.plotxyz()

``````
``````

``````

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)
ros57.run()

``````
``````

In [29]:

ros57.plotx()

``````
``````

``````
``````

In [30]:

ros57.plotxy()

``````
``````

``````
``````

In [31]:

ros57.plotxyz()

``````
``````

``````

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]:

p1.plotmaxima('x')

``````
``````

``````
``````

In [33]:

p1.plotmaxima('y')

``````
``````

``````
``````

In [34]:

p1.plotmaxima('z')

``````
``````

``````

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 [ ]:

``````