Merging the Tiny Drop With the Mighty Ocean

Patanjali's work is a reformulation and compilation of what is in the Upanishads — that the purpose of life is to realise the Self. To know the Self, thought waves have to be controlled.

The Bhagavad Gita says that to control the mind made of manas, buddhi and ahamkara, you need to practise non-attachment. The eight limbs of Patanjali yoga are yama, niyam, asana, pranayama, pratyahar, dharna, dhyana and eventually samadhi.