Bhagavad Gita, Chapter 5, Verse 20

न प्रहृष्येत्प्रियं प्राप्य नोद्विजेत्प्राप्य चाप्रियम् । स्थिरबुद्धिरसम्मूढो ब्रह्मविद् ब्रह्मणि स्थितः

na prahṛṣyetpriyaṃ prāpya nodvijetprāpya cāpriyam | sthirabuddhirasammūḍho brahmavid brahmaṇi sthitaḥ

Translation

He who knows Brahman can neither rejoice on obtaining the pleasant, nor grieve on obtaining the unpleasant — steady-minded, undeluded, resting in Brahman.

— Alladi Mahadeva Sastri

Word meanings

na
not
prahṛṣyet
let (him) rejoice
priyam
the pleasant
prāpya
having obtained
na
not
udvijet
let (him) be agitated
prāpya
having obtained
ca
and
apriyam
the unpleasant
sthirabuddhiḥ
firm, reason, whose, he
asaṃmūḍhaḥ
unbewildered
brahmavit
Brahman-knower
brahmaṇi
in Brahman
sthitaḥ
established

Śaṅkarācārya's commentary

Pleasant and unpleasant objects can cause pleasure and pain to them only who regard the body as the Self, not to him who sees the pure Self, since the latter never comes by pleasant and unpleasant objects. He is undoubtingly conscious that the Self is one, homogeneous, and spotless in all creatures. He is free from delusion. He rests in Brahman described above; that is, he does no action, he has renounced all action.