Roger Federer celebrates Aug. 23 in Mason, Ohio, after defeating Novak Djokovic, 7-6 (7-1), 6-3, to win the Western & Southern Open. Federer enters the U.S. Open, which starts Monday, seeking his first major title since Wimbledon in 2012. (Rob Carr/Getty Images)

Rare is the superstar who exits on top, etched in eternity as a winner. John Elway was the MVP of Denver’s 1999 Super Bowl victory in his final game. Derek Jeter wrapped up his final game at Yankee Stadium with a walk-off single. Pete Sampras beat longtime rival Andre Agassi in the 2002 U.S. Open final and never played again.

Roger Federer? A career-capping blaze of glory means little. Risk tarnishing his place in history? Inconsequential.

For Federer, love trumps legacy.

“I was always going to squeeze the lemon, so to say, to the last drop,” Federer said in an interview earlier this month. “And then when I’m retired, I’m actually going to be exhausted and happy that I did it the way I did it.”

Of course, Federer wants to win. After beating then-No. 2 Andy Murray and No. 1 Novak Djokovic back to back at last week’s Cincinnati Masters, the 34-year-old father of four is brimming with self-belief as he heads to the U.S. Open, which begins Monday in New York.

He’s moving well; he’s rested; he’s serving bullets. He’s even added a new twist to his vast repertoire (more on that later).

“Now I’ve got the confidence, I’ve got the matches, and I’m actually still feeling really fresh even after this week because the matches have been rather short,” the five-time U.S. Open champion said last Sunday after dispatching Serbia’s Djokovic in the Cincinnati final, 7-6 (7-1), 6-3.

At an age when tennis skills tend to drop off precipitously, Switzerland’s Federer continues to operate near a dividing line between contender and champion.

He moved past Murray after the Cincinnati title to become No. 2 in the world rankings and carries the No. 2 seed to New York. He routinely makes the final weekend of majors. He still defeats top rivals.

In contrast to Tiger Woods — once Federer’s history-chasing partner in success but now struggling to make the cut at majors — Federer remains within sniffing distance of the game’s top prizes.

“I feel like I’m playing better than at 24,” he said.

But his pattern of near misses grows. The 17-time Grand Slam champion hasn’t won a major in three years; his most recent was at the 2012 Wimbledon. His hasn’t prevailed in New York since 2008, when he won the last of his five straight titles.

In four of his past seven majors, he advanced to the semifinals or better. Each time he emerged empty-handed. At last year’s U.S. Open, eventual champion Marin Cilic of Croatia blew him off the court in the semifinals.

For much of Wimbledon, Federer looked dazzling, including a straight-set defeat of 2013 champ Murray in the semifinals. In the final against Djokovic, 28, Federer couldn’t find the same high gear and lost in four sets.

The near misses have triggered a familiar story line: Federer is a valiant contender, but his back is too fragile, he’s too slow or too preoccupied with family life to win the biggest hardware anymore.

Admittedly, beating former U.S. Open champions Djokovic (2011) and Murray (2012) consecutively in New York is a different proposition than in Cincinnati. The courts are slower, the balls heavier, the conditions windier, the matches longer (best of five sets) — all of which neutralize Federer’s attacking style.

“Conditions in New York suit me a little bit better, so I look forward to it,” Djokovic, a nine-time major winner, said last Sunday.

What suits Federer, and keeps him relevant, is an unyielding joy for the game and a newfound ability to tinker and take risks.

At Cincinnati, Federer, the father of twin girls and boys, described his career as a series of waves, each with its own unique and satisfying break.

It was his first tournament following a five-week break after Wimbledon, which included a quick visit to Malawi to witness his charitable foundation’s work personally.

Federer waxed about annoying his mother with endless practice sessions against a cupboard in the family’s living room as he dreamed of becoming a professional. There were his exciting early years on tour — meeting and competing against legends he’d only seen on TV. There was his first major championship at Wimbledon in 2003, and reaching No. 1, and breaking Sampras’s mark for all-time Grand Slam titles in 2009.

“And now we’re on a different wave,” he said. “But it’s another good one, and now I’m playing center court literally every single match, crowds when I practice, crowds when I play matches, unbelievable support everywhere I go. And should I just give up on that? No. Actually, you realize it’s actually so simple to keep going.”

And risk sullying his legacy?

“That to me is so silly,” he continued. “I want to just play full out and see what’s left. That’s why also in ’13 when I was not well [with back problems], I could have just decided I’m not going to put myself out there. I mean, come on. Like who cares if you lose another 10 matches? I don’t think it matters. Some people might read into that. And that’s okay.”

His confidante and longtime coaching adviser Severin Luthi is amazed by Federer’s everyday motivation despite playing more than 1,250 professional matches.

“He’s like a 15-year-old guy coming on the court,” Luthi, the Swiss Davis Cup captain, said.

He’s not afraid to experiment, either, particularly when many successful athletes resist even the slightest change.

He hired former No. 1 Stefan Edberg at the start of the 2014 season for extra coaching expertise. He switched to a larger racket, also in 2014, which has given his serve and backhand added pop. He is standing closer on his returns to take time away from opponents.

Against Djokovic last week, Federer added a new twist: He kamikaze-rushed second serves, almost half-volleying them on his way to the net, an ambush tactic that gave the Serb fits.

“I think I was very creative on the return games,” Federer said, adding that he was willing to do things “I didn’t always know I could do or didn’t dare to do” because he thought they were “too crazy.”

“He’s making real adjustments and taking advantage of all the skills he has,” ESPN commentator Patrick McEnroe said.

The real story is his serving. Federer wasn’t broken in 49 service games during his five matches in Cincinnati. So far in 2015, he has put up some career-best numbers, including service games won (93 percent) and first-serve points won (80 percent) — better even than his glory years a decade ago.

That is the foundation that has helped Federer rack up impressive numbers again this season.

He’s snagged five titles on three different surfaces while going 9-4 against the top 10 and 45-7 overall. He has reached the quarterfinals or better in nine of 12 events.

There have been a few unexpected losses, notably his third-round defeat at the Australian Open to Italy’s Andreas Seppi.

But he has rarely faltered in New York. In 15 consecutive trips, his winning clip of 87.8 percent (72-10) is only slightly below his 88.7 percent mark at Wimbledon (79-10).

If some wonder whether he still has what it takes to win Grand Slams, his peers believe he is right in the mix.

“I know how hard those events are to win, but he’s still giving himself opportunities and there’s no reason why he can’t,” said Scotland’s Murray, a two-time Grand Slam champion.