David P. Robbins, a noted mathematician who tried in his dying months to solve a problem that had bothered him since he was a boy -- What is the area of a polygon if you know only the lengths of the sides? -- died Sept. 4. He was 61 and died of pancreatic cancer at his home in Princeton, N.J.

After Robbins was diagnosed last April, as he told the Wall Street Journal, he had several options: stick to his normal routine at the Center for Communications Research in Princeton, N.J., which is part of the Institute for Defense Analyses; search for a cure for his disease; go home to die; or work on the problem of polygons -- closed plane figures -- that had always fascinated him.

He chose the last one, trying to find more answers to a problem for which he had already found partial solutions -- he had come up with formulas for pentagons (five sides) and for hexagons (six), which he published in 1994.

His goal since April had been to find the formula for the seven-sided figure -- the heptagon -- and he and researcher Julie Roskies got part of the way there. Robbins told the Wall Street Journal in July that he trusted Roskies to finish the work.

Robbins had ultimately wanted to find a general formula for a polygon of any number of sides, a problem that the 19th century mathematician August Ferdinand Moebius had tried to solve without success.

Dr. David Lieberman, former director of the Center for Communications Research, told The Times last week that Robbins knew the general shape of the formula for polygons.

Still speaking of Robbins in the present tense, Lieberman said: "He knows it's supposed to have a certain appearance, but he doesn't know what all the constants are in that formula. That's what they were working on."

Robbins' wife, Deborah, said that solving the polygon problem was something that her husband, a former teacher, had thought about since his own school days.

His father, a real estate broker, would quiz him on math problems, and at age 12 or 13 he figured out for himself the formula for determining the area of triangles, which, he subsequently learned, had already been solved by the Greeks. The solution to the four-sided polygon had also been found, by Brahmagupta, an Indian mathematician, around the middle of the 7th century.

But a general theory was elusive. Through the years, Deborah Robbins told The Times of her husband, "It was something he kept going back to." She said he wasn't as interested in more esoteric math problems as he was in "problems where you could state the problem and even non-mathematicians could understand it."

His work on polygons was aside from the work he did for the center, which involved making and breaking codes and much of which was classified. He was well known in math circles for his work on "alternating sign matrices," which has applications in quantum mechanics, computational algebra and abstract mathematical symmetry.

Robbins, who was born in Brooklyn, N.Y., earned his bachelor's degree from Harvard and his doctorate from the Massachusetts Institute of Technology.

In addition to his wife, his survivors include a son, Matthew; and two sisters, Marjorie Robbins Friedlander of Pacific Palisades and Ann Aknin of Dana Point.