Theory of Dynamical Systems