David Axelrod, Mr. Obama’s former senior adviser, said in 2011 that the president had “always been on my butt about this, and as a result, my butt is a little bit smaller.”

But outside many cart-assisted games of golf, Mr. Trump has declined to latch on to an exercise program. Fitness experts say persuading Mr. Trump to change his lifestyle will be a matter of figuring out what might motivate him to add small amounts of movement to his day, be it a stroll in the Rose Garden or a walk on the golf course.

“People are not inclined to do what they’re told,” Jessica Matthews, a senior health adviser at the American Council on Exercise, said in an interview. “When they come up with their own solutions, you’d be surprised how readily excited and how able they are to make that change and do it long term.”

This might be particularly true for Mr. Trump, a man known to balk when told what to do. Ted Vickey, a former director of the White House Athletic Center, a fitness complex for employees of the executive branch, said in an interview that Mr. Trump’s love of golf — and, perhaps, maybe a wearable fitness tracker like a Fitbit — could be the key to improving his exercise routine.

“I’d say, ‘Mr. President, we could knock four strokes off your golf game if you exercised for the next three months,’” Mr. Vickey said. “And the Secret Service probably wouldn’t like it, but I’d tell him to walk the golf course rather than ride a golf cart.”

Whatever route he chooses, Mr. Trump has the ability to install whatever equipment he wants in the White House. (Past presidents used a converted bedroom on the top floor to work out in privacy.) Mr. Vickey, who said he was involved in helping get a treadmill installed on Air Force One for George W. Bush, said that Mr. Bush also at one point requested an elliptical machine to be installed near a private outdoor pool and cabana in the White House. The equipment was there within 24 hours.

Denise Evans, who worked at the White House Athletic Center during the Reagan, Clinton and George Bush administrations, said that she would recommend that the president limit his Diet Coke habit to one a day, and start small with exercise.