For an optimistic country, 2013 was a heck of a downbeat year, most of all for the nation’s chief executive. But Obama had competition from the poisonously divided Congress to investment-shy business executives to a public so demoralized by wars in Iraq and Afghanistan that it balked at the use of force to punish chemical weapons attacks by Syria.

To many Americans, this was a year when the nation’s declining global power perhaps seemed a reverse image of the confident, indomitable nation that, in the popular imagination, rolled to victory in World War II. “The Greatest Generation” felt like a relic not just of another century but of another nation.

But let’s be frank at year-end: This sort of relentless pessimism is destructive and, what’s more important, it’s inaccurate. We in the media pride ourselves on purveying bad news, so it’s easy for our readers to overlook the abiding reality that America is generally at peace and, relative to most of the world, wildly prosperous. In our national funk, we paint the present in darker colors than warranted, and the past in brighter hues.

One way to position the country more accurately is to look back at the time of triumph in World War II, when our modern myths were created, and unpack what really happened. That’s possible thanks to an extraordinary work of history completed last year by my colleague Rick Atkinson. His “Liberation Trilogy” revises many of the things you thought you knew about the war in Europe — and teaches the greatest lesson of all for the present, which is the need for patience and perseverance against obstacles.

As Atkinson tells the story, drawing on letters, diaries and other vivid personal accounts, World War II was a chain of disastrous mistakes redeemed by the fact America and its allies just kept going, literally climbing over the bodies of the dead. Through the war, amphibious landings were almost always botched, parachute landings rarely hit targets and Allied bombers mistakenly pummeled their own troops. American generals, from Supreme Commander Dwight D. Eisenhower on down, often made terrible errors that cost thousands of lives unnecessarily.

Yet the nation persisted through sheer momentum and force of will. In those days, the public was shielded from the disheartening news of disaster by military censorship and the discretion of journalists who passionately wanted to tell the truth but also hoped to see their country prevail. The greatest of those war correspondents, Ernie Pyle, wrote about the “long thin line of personal anguish” of war, after searching the effects of the dead at the high-water line on Omaha Beach the day after D-Day.

Atkinson describes the repeated errors of the North African campaign in his brilliant first volume, “An Army at Dawn,” which won the Pulitzer Prize in 2003. It recounts the chain of error symbolized by the catastrophic reversals at Kasserine Pass. “The brave and the virtuous appear throughout the North African campaign, to be sure, but so do the cowardly, the venal and the foolish. ... It was a time of cunning and miscalculation, of sacrifice and self-indulgence, of ambiguity, love, malice and mass murder.”

The ragged road to victory continued into Sicily and Italy, described in Atkinson’s second volume, “The Day of Battle.” The Allies’ ultimate success buried the nightmarish fiascos of that campaign, from the error-plagued landings at Salerno and Anzio to the needless waste of young lives at the Rapido River and Monte Cassino.

Even on the eve of the war’s greatest triumph, the D-Day landings in Normandy, Brig. Gen. Norman D. Cota, who would be the senior officer on Omaha Beach, warned his soldiers: “You’re going to find confusion. The landing craft aren’t going in on schedule and people are going to be landed in the wrong place. Some won’t be landed at all. ... We must improvise, carry on, not lose our heads.” Every disaster he foretold came true, yet the onslaught succeeded, as Atkinson narrates in his final volume, “The Guns at Last Light.”

Presidents, like generals, make mistakes. Some of them have ruinous consequences. But the real lesson of Atkinson’s story is that the only unforgivable mistake is to despair and give up. There was too much of that attitude in America in 2013, among leaders and citizens alike. Here’s to a new year.

*We welcome your comments on the stories and issues of the day and seek to provide a forum for the community to voice opinions. All comments are subject to moderator approval before being made visible on the website but are not edited. The use of profanity, obscene and vulgar language, hate speech, and racial slurs is strictly prohibited. Advertisements, promotions, and spam will also be rejected. Please read our terms of service for full guides