Dynamical systems and chaos theory