By contrast, the president struck an almost elegiac tone in discussing the sex scandal that forced the resignation of David H. Petraeus as director of the Central Intelligence Agency. Mr. Petraeus, he said, told him that he did not meet his own standards for holding the job.

But, Mr. Obama added, “We are safer because of the work Dave Petraeus has done,” voicing hope that the scandal would end up as a “single side note on what has otherwise been an extraordinary career.”

Mr. Obama was cautious in responding to questions about whether he should have been told earlier about the investigation into the relationship between Mr. Petraeus and his biographer, Paula Broadwell, with the president saying that he would leave it to the F.B.I. to explain its “protocols.” But while he offered no criticism of the investigation, he appeared to leave himself room to do so in the future, should new information emerge.

“I am withholding judgment with respect to how the entire process surrounding General Petraeus came up,” he said.

In laying out his position on the budget, Mr. Obama emphasized that debate over taxes had been central to the election he just won and reprised many of the themes he had struck on the campaign trail. The president urged Republicans to go along with his proposal to extend the Bush-era tax cuts on all personal income up to $250,000 a year, noting that people who made more than that amount would also benefit from such an extension.

“But when it comes to the top 2 percent, what I’m not going to do is extend further a tax cut for folks who don’t need it, which would cost close to a trillion dollars,” Mr. Obama said.

While he insisted that the tax cuts for income above $250,000 must expire, Mr. Obama did not stipulate that the top rate would revert to 39.6 percent, as it was in the Clinton administration. Mr. Bush signed a bill a decade ago reducing it to 35 percent, where it has remained.