Jagadguru Adi Shankaracharya was a renowned philosopher, sage, an authority on Advaita Vedanta. As he was a "brahmachari"(celibate), he lacked knowledge with regard to sexual matters.
A philomath, he wanted to have first hand experience of copulation. Through his "Yogic Powers", he entered the dead body of King Amruka and indulged in sexual activities for about one month.
His deep understanding about sex came in handy when Bharati, wife of famous scholar Madana Mishra, challenged him to debate with her on "Kamashastra"(love making).
Adi Shankaracharya not only won the debate hands down but also gained invaluable insights into the subject.
He proclaimed, "Never ever dissipate your sexual energy. Your salvation lies in preserving and transforming your sexual energy. Through meditation, transform the lowly sexual energy into superior spiritual energy. Only those having abundant spiritual energy can mingle themselves with the Paramatma(Supersoul or God) and put an end to their incessant agonies".

Well, I personally like the following lines by Adi Shankaracharya:
"Punarapi Jananam, Punarapi Maranam".(Again and again one takes birth in this miserable world, again and again one dies painfully).
"Bhaj Govindam, Bhaj Govindam,
Govindam Bhaj Moodh Mate" (O deluded minded fool, if you want to free yourself from this wheel of life and death, lovingly chant the name of God. There is no other way to unshackle yourself from the chains of "maya" or illusions).
No wonder, he was honoured with the title of "Jagadguru" (teacher of the universe).

~ Sanjay Gargish ~

Salvation Lies In Transforming Sexual Energy.