In his new film, screenwriter Donald Margulies explores the psychological struggles that artists must face in telling the tale of a 20th-century literary icon.

Margulies, a professor of English and theater studies, wrote the screenplay for “The End of the Tour,” which premiered at the 2015 Sundance Film Festival and had its release in the United States on July 31. The film, which will be screened on Sept. 3 at the Whitney Humanities Center, follows David Lipsky, a Rolling Stone reporter played by Jesse Eisenberg, as he spends five days traveling on a book tour with the renowned writer David Foster Wallace, played by Jason Segal. The film’s storyline is set shortly after the release of Wallace’s most famous work, “Infinite Jest.” After Wallace’s death by suicide in 2008, Lipsky wrote a book entitled “Although Of Course You End Up Becoming Yourself: A Road Trip with David Foster Wallace.” Margulies’s manager, David Kanter, sent him the book as a potential idea for a screenplay.

“When I saw the end of the movie … I saw how much it looked like my intention at the end of page,” Margulies said. “It’s rare for a screenwriter to realize on screen that which the writer saw in his or her imagination.”

Margulies noted that the themes he saw in Lipksy’s book were consistent with themes that have interested him throughout his career. He added that in his own way, he related to Wallace’s struggle to reconcile creative integrity with success.

In preparation for writing the film’s screenplay, Margulies said he conducted several hours of interviews with Lipsky in order to gain further information about his interactions with Wallace that were not recorded in the book. Margulies added that he approached his former student James Ponsoldt ’01 to serve as film director. Margulies explained that he constructed a compelling narrative out of the conversations between Lipsky and Wallace for the film, as the original conversations were undramatic. This strategy required extensive editing, he said, and the elevation of Lipsky’s character to a more prominent position in the film, as the plot is witnessed through his eyes.

Margulies said he does not believe that the film’s intended audience is restricted to those who are familiar with Wallace’s life, but he ideally wants audiences to watch the movie and then “order Wallace’s book on Amazon.”

The upcoming screening of the film will be co-sponsored by the Yale Film Society, the Films at the Whitney program and the Departments of English and Theater Studies.

Charlotte Juergens ’16, co-president of the Yale Film Society, said she believes that many students in Yale’s writing community would be attracted to the event due to its focus on Wallace.

Iason Togias ’16, also co-president of the Yale Film Society, who has already seen the film, characterized it as “a really interesting, funny and ultimately touching portrait of one of the most brilliant writers of our generation.”

Togias said he thinks that because both the screenwriter and director of the film are affiliated with the University, students would be particularly interested in seeing the film.

“The Pale King,” Wallace’s unfinished novel, was a nominee for the 2012 Pulitzer Prize for Fiction.