Monkeys play in a clearing and hang from vines among palm trees and rocks
Bhaskara II’s problem. Author’s illustration · Mansur Gilmullin’s archive

A lively troop of monkeys,
Well fed, began to play.
One eighth of all their number, squared,
Made merry in a glade.
Another twelve swung from the vines,
Leaping and hanging there.
How many monkeys were there
In the troop? Tell me, if you can.

The solution is yours to find. Our answer is below.

Bhaskara II and his work

Bhaskara II (1114–1185) was a leading Indian mathematician and astronomer of the twelfth century. He headed the astronomical observatory at Ujjain.

Bhaskara II wrote the four-part treatise Siddhanta Shiromani (“Crown of the Doctrine”, 1150), devoted to astronomy and mathematics. Its arithmetic section, Lilavati (“The Beautiful”), remained a standard textbook for centuries. It was repeatedly reprinted and translated into many languages. The Leelavati Prize, awarded at the International Congress of Mathematicians for outstanding contributions to public understanding of mathematics, bears its name.

Some Indian treatises were written in verse. This is thought to have made mathematical rules easier to memorise.

Bhaskara obtained negative solutions to equations, although he doubted their significance. He also distinguished the positive and negative solutions of equations of the form x^2=a for a>0.

Most Indian treatises were written in Sanskrit, the language of religious texts. A major achievement of Indian mathematics was the development of an extensive algebraic notation. Most symbols were the first syllables of the corresponding Sanskrit terms.

For example, an unknown quantity was called yavat-tavat, “as much as”, and was represented by the letter for the syllable ya.

A smiling cartoon monkey holds a peeled banana, with a banana skin beside it
A monkey with a banana. Author’s illustration · Mansur Gilmullin’s archive

Solution

Answer: 16 or 48. The problem has two solutions.

The quadratic equation for the problem is:

\left(\frac{x}{8}\right)^2+12=x.

Bhaskara solves it as follows:

x^2-64x=-768
x^2-64x+32^2=-768+32^2
(x-32)^2=256
x-32=16\quad\text{or}\quad x-32=-16
x_1=16;\quad x_2=48