Tiler Peck and Daniel Applebaum in a performance of “The Times Are Racing.” (Paul Kolnik)

New York City Ballet offered three big pieces of music on its second program at the Kennedy Center Opera House, but only two big ballets. A third work, Christopher Wheeldon’s “American Rhapsody,” was spirited but inconsequential. Yet as the evening’s opener on Thursday, it introduced a good question to consider over the program’s duration: How best to deploy dance against musical accompaniment of great power?

In Wheeldon’s work, the music in question is George Gershwin’s landmark jazz opus “Rhapsody in Blue.” “American Rhapsody” was what Gershwin meant to title it, before his brother Ira suggested the change. The choreography struck me as the music did Leonard Bernstein; he once described it as “a string of separate paragraphs stuck together with a thin paste of flour and water.” I don’t share this view of Gershwin’s composition (indeed, Bernstein followed his initial take with praise). But the dancing, glitzy as it was, was a mixed bag without a plan.

Its chief impression was busyness. Wheeldon created it in 2016, his first work for New York City Ballet following the success of his “An American in Paris” on Broadway, and he leans heavily on legs. There’s lots of kicking. There are other obvious effects rather than interesting ones, as when a dancer collapsed joint by joint in time with the instrumental licks. Solos by Lauren Lovette and Unity Phelan were full of melting loveliness. Yet it all passed like dashed-off impressions. At the end, the cast amassed to form a human skyline. Like the abundance of blue in the costumes and decor, we get it. But it’s an oddly static closing, and a dead end. So what? The more inspired urban buzz and vitality, and the genuine feeling, were left to the New York City Ballet Orchestra, led by Andrew Litton, with Elaine Chelton triumphing on piano.

Balanchine’s “The Four Temperaments,” which followed, was a useful contrast. To this big score — Paul Hindemith’s fluent, brilliantly constructed work, commissioned for the ballet — Balanchine brought restraint, with minimal but penetrating dance images. He’s deconstructing ballet and putting it back together right before our eyes, and the celebratory conclusion, which on Thursday was presided over by the majestic Teresa Reichlen, feels earned. You’ve just witnessed a barn raising.

Perhaps it’s an unfair comparison with Wheeldon, Balanchine being Balanchine, after all, and “The Four Temperaments” (1946) being one of his classics. But this program offered a second example of dance existing successfully alongside emphatic music: Justin Peck’s “The Times Are Racing.” It premiered earlier this year in New York, and with its nervous agitation and desperate pulling-togetherness it feels like a response to the election.

Justin Peck’s explosive choreography is evident in “The Times Are Racing.” (Paul Kolnik)

In their jeans, cutoffs and sneakers, the dancers look like us, but perfect: young, socko athletes, gorgeously urban-chic. (Humberto Leon of Opening Ceremony designed the clothes.) They’re also wonderfully supportive. They form tight circles, swirl protectively, allow the rebels their freedom, sweep them back into the fold. The music is by Baltimore-based electronic composer Dan Deacon from his album “ America ,” and it’s driving and loud. It’s not going to be to everyone’s taste, but I found it intriguing, with layers of tension and stormy weather and distant, plaintive voices. It suited Peck’s explosive choreography, springing from a well of authentic feeling and from new, wondrous experiments with the dancers he knows best. Tiler Peck slipped like raw silk through a duet with Daniel Applebaum. Filling in for an injured dancer, Justin Peck dove into a dynamite tap duet with Taylor Stanley, spinning on the toes, bounding with a sense of overwhelm they can’t contain. In this work, Peck’s fierce young guts — he’s 29 — have poured out all over the floor. Everything was left on the stage. It’s a good way to make a point.

The New York City Ballet repeats this program Saturday at 1:30 p.m. in the Opera House. The company performs an alternate program of works by Justin Peck, Balanchine and Alexei Ratmansky, Saturday at 7:30 p.m. and Sunday at 1:30 p.m. 202-467-4600. kennedy-center.org.