Screenwriter Nicholas Meyer, director Isabel Coixet and an outstanding cast do Philip Roth’s novel “The Dying Animal” proud with this literate, coolly engrossing adaptation. In their capable hands “Elegy” is a thoughtful study of an aging man dedicated to enjoying the pleasures of the flesh without commitment even as he grows increasingly anxious about his mortality.

The protagonist is David Kepesh (Ben Kingsley), a professor of literature at a New York university and author, as we learn in the opening sequence showing him being interviewed on the Charlie Rose show, of a book on hedonism. Divorced and estranged from his doctor son Kenny (Peter Sarsgaard), he has regular trysts with accommodating businesswoman Carolyn (Patricia Clarkson) but also regularly sleeps with attractive students who’ve come to admire him—after they’ve completed the class. His closest friend and confidante, renowned if somewhat over-the-hill poet George (Dennis Hopper) looks upon his escapades with more bemusement than surprise.

So when David becomes involved with gorgeous Cuban-American Consuela (Penelope Cruz), who’s just finished his course and whom he casually chats up in his habitual post-exam party, he’s initially interested in little more than a one-night stand. But he falls for her completely, and, to George’s astonishment, begins acting lovesick and jealous. She reciprocates the affection, but even so he can’t make the sort of commitment she needs. Meanwhile Kenny turns up unexpectedly to ask his father’s advice about an affair he’s having while still smoldering with anger because he believes David was responsible for destroying their family.

This is a complicated story, but the complexities are emotional: like real people, the characters don’t act in expected ways, and they take the plot in directions that are unpredictable but convincing, to conclusions that aren’t cut-and-dried but are credible. Meyer, who stumbled with his adaptation of Roth’s “The Human Stain,” is much more successful here, managing to capture the book’s mature themes while transforming its literary qualities into cinematic terms. And Coixet, who showed a sensitive hand with “My Life Without Me,” does so equally here, conveying the changing emotions without pushing too hard.

And the cast is excellent. Kingsley earns sympathy for Kepesh without sacrificing the character’s officiousness and sense of entitlement, and Cruz is marvelously expressive throughout, but especially in a poignant twist in the last act. Hopper seems to have enjoyed playing somebody who’s not an oddball or a villain and gets a powerful final scene to boot, while Deborah Harry is strong in what amounts to a cameo as his supportive wife. Clarkson, meanwhile, is all cool efficiency, and Sarsgaard, as usual, brings more to his role than most actors would have found in it. The technical aspects of the picture are all unostentatiously solid, and the music score makes some good use of classical compositions, though it would have been wise to avoid the overly familiar Satie piano pieces that seem to pop up with far too much frequency on film soundtracks.

“Elegy” is an intimate film and, as the title indicates, rather a mournful one. But the intimacy is a strength, because it allows the characters to achieve richness; and the mournful quality is part of the story’s truthfulness. This is a mature, small-scaled drama that’s both insightful and affecting.