Rāja yoga

In Sanskrit texts, Rāja yoga was both the goal of yoga and a method to attain it. The term also became a modern name for the practice of yoga in the 19th-century when  Swami Vivekananda gave his interpretation of the Yoga Sutras of Patanjali in his book Raja Yoga. Since then, Rāja yoga has variously been called aṣṭāṅga yoga, royal yoga, royal union, sahaja marg, and classical yoga.

Etymology and usage
Rāja (Sanskrit: राज) means "chief, best of its kind" or "king". Rāja yoga thus refers to "chief, best of yoga".

The historical use of the term Rāja yoga is found in other contexts, quite different from its modern usage. In ancient and medieval Sanskrit texts, it meant the highest state of yoga practice (one reaching samadhi). The Hatha Yoga Pradipika, for example, states that Hatha yoga is one of the ways to achieve Rāja yoga.

Rāja yoga is discussed in the Yogatattva Upanishad. It is then mentioned in a 16th-century commentary on a specific step in the Yoga Sūtras of Patañjali. The medieval era Tantric work Dattātreyayogaśāstra explains in 334 shlokas the principles of four yogas: Mantra yoga, Hatha yoga, Laya yoga and Raja yoga. Alain Daniélou states that Rāja yoga was, in the historic literature of Hinduism, one of five known methods of yoga, with the other four being Hatha yoga, Mantra yoga, Laya yoga and Shiva yoga. Daniélou translates it as "Royal way to reintegration of Self with Universal Self (Brahman)".

The term became a modern retronym in the 19th-century when Swami Vivekananda equated raja yoga with the Yoga Sūtras of Patañjali. This meaning is different from that in the Hatha Yoga Pradīpikā, a text of the Natha sampradaya.

The method of meditation followed under Sahaj Marg, also called Heartfulness follows Raja Yoga system of practice. This system is in practice formally since 1945 under the name Shri Ram Chandra Mission (SRCM).

The Brahma Kumaris, a new religious movement, teaches a form of meditation it calls "Raja yoga" that has nothing to do with either the precepts of Hatha Yoga or Patañjali's Yoga Sūtras.

Modern interpretations and literature that discuss Raja yoga often credit Patañjali's Yogasūtras as their textual source, but many neither adopt the teachings nor the philosophical foundations of the Yoga school of Hinduism. This mixing of concepts has led to confusion in understanding historical and modern Indian literature on Yoga.

In Shaivism
The Shaiva Yoga text, Amanaska, dated from the 12th century CE or earlier, is a dialogue between Vamadeva and the deity Shiva. In the second chapter, the text mentions Raja yoga. It states that it is so named because it enables the yogin to reach the illustrious king within oneself, the supreme self. Raja yoga is declared as the goal where one experiences nothing but the bliss of the undisturbed, the natural state of calm, serenity, peace, communion within and contentment.

The Raja yoga goal and state are synonymous with various terms, such as Amanaska, Unmani and Sahaj. The Hatha Yoga Pradipika (literally, A Little Light on Hatha Yoga) asserts this as follows,

"राजयोगः समाधिश्च उन्मनी च मनोन्मनी"

As a type of yoga
Some medieval Indian texts on Yoga list Rajayoga as one of many types of yoga. For example, the 17th-century Sarvanga yoga pradipikå, a Braj-bhashya commentary by Sundardas, teaches three tetrads of Yogas. The first group is Bhakti yoga, Mantra yoga, Laya yoga, and Carcha yoga; the second is Hatha yoga, Raja yoga, Laksha yoga, and Ashtanga yoga; the third is Samkhya yoga, Jñana yoga, Brahma yoga, and Advaita yoga. Of the twelve, Sundardas states that Rajayoga is the best yoga.

As the yoga system of Patanjali
One meaning of Raja yoga is as a modern retronym introduced by Swami Vivekananda, when he equated raja yoga with the Yoga Sutras of Patanjali. After its circulation in the first half of the 1st millennium CE, many Indian scholars reviewed it, then published their Bhāṣya (notes and commentary) on it. Together, they form a canon called the Pātañjalayogaśāstra ("The Treatise on Yoga of Patañjali").

According to Axel Michaels, the Yoga Sutras are built upon fragments of texts and traditions from ancient India. According to Feuerstein, the Yoga Sutras are a condensation of two different traditions, namely "eight limb yoga" (ashtanga yoga) and action yoga (kriya yoga). The kriya yoga part is contained in chapter 1, chapter 2 verse 1-27, chapter 3 except verse 54, and chapter 4. The "eight limb yoga" is described in chapter 2 verse 28-55, and chapter 3 verse 3 and 54.

There are numerous parallels in the ancient Samkhya, Yoga and Abhidharma schools of thought, particularly from the 2nd century BCE to the 1st century AD, notes Larson. Patanjali's Yoga Sutras may be a synthesis of these three traditions. From the Samkhya school of Hinduism, Yoga Sutras adopt the "reflective discernment" (adhyavasaya) of prakrti and purusa (dualism), its metaphysical rationalism, and its three epistemic methods to gaining reliable knowledge. From Abhidharma Buddhism's idea of nirodhasamadhi, suggests Larson, Yoga Sutras adopt the pursuit of an altered state of awareness. However, unlike Buddhism, which believes that there is neither self nor soul, Yoga is physicalist and realist, like Samkhya, in believing that each individual has a self and soul. The third concept that Yoga Sutras synthesizes into its philosophy is the ancient ascetic traditions of isolation, meditation and introspection, as well as the yoga ideas from the 1st millennium BCE Indian texts such as Katha Upanishad, Shvetashvatara Upanishad and Maitri Upanishad.

Islamic period
In early 11th century, the Persian scholar Al Biruni visited India, lived among Hindus for 16 years, and with their help translated several significant Sanskrit works into Arabic and Persian. One was Patanjali's Yogasutras. Along with generally accurate translations, Al Biruni's text has significant differences from Yogasutra manuscripts discovered in India during the 19th century. Al Biruni's record has helped modern scholars establish that Patanjali's Yogasutras manuscript existed in India in many versions, each with multiple commentaries by Hindu scholars. Some of these versions and commentaries are either lost or undiscovered. Al Biruni's translation preserved many of the core themes of Yoga philosophy of Hinduism; however, certain sutras and analytical commentaries were restated, making them more consistent with Islamic monotheistic theology. Al Biruni's version of Yoga Sutras reached Persia and Arabian peninsula by about 1050 AD.

In Indian historical timeline, marking with the arrival of Islam in India in twelfth century, further development and literature on Yoga philosophy of Hinduism went into decline. By the sixteenth century, Patanjali's Yoga philosophy was nearly extinct. Yoga was preserved by sadhus (ascetics, sannyasis) of India. Some of the Hindu yoga elements were adopted by Sufi sect of Muslims in India. The Sufi Muslims at times adopted and protected the Yoga tradition of Hindus during the Islamic rule of India, and at other times helped the persecution and violence against those Hindus. The Mughal Emperor Akbar, known for his syncretic tolerance, was attracted to and patronized Yoga philosophy of Hinduism.

Comparison with Buddhism
The yoga scholar Stephen Cope identifies the following similarities between Rāja yoga and Buddhism. He notes that the two philosophies are not the same, but are strikingly similar, having shared a long period of interchange up to about 500 CE.