11| The Butterfly Effect

Introduction

I am sure you would have heard of the ‘butterfly effect’. This term is related to a phenomenon called (deterministic) chaos, where some systems exhibit strong variations in behaviour despite only minute changes in the outputs. In other words, chaotic systems are super sensitive to their input parameters.

The first chaotic system discovered is the Lorentz Attractor, which is related to a simple weather model created by Edward Lorentz. The system is governed by three coupled differential equations:

\[ \begin{align} \dfrac{dx}{dt}&=\sigma(y-x)\\ \dfrac{dy}{dt}&=x(\rho-z)-y\\ \dfrac{dz}{dt}&=xy-\beta z\\ \end{align} \] Lorentz had used the values \(\sigma=10\), \(\beta=8/3\) and \(\rho=28\).

Tasks

  1. Solve the differential equations of this system for the initial conditions \((x,y,z) = (0,1,0)\) from \(t=0\) to \(t=50\) using the Euler method and the SciPy’s odeint().

  2. Use your solutions \((x,y,z)\) values with the following code to get the the Lorentz’s Butterfly shown above.

    ax = plt.axes(projection='3d')
    ax.plot3D(x, y, z)
    plt.show()
  3. This system is considered to be chaotic (i.e., highly sensitive to the initial conditions). Use your code to demonstrate this effect.

Back to top