PESSIMISM about the United States rarely pays off in the long run. Time and again, when Americans have felt particularly glum, their economy has been on the brink of a revival. Think of Jimmy Carter's cardigan-clad gloom in the inflation-ridden late 1970s, or the fear of competition from Japan that marked the “jobless recovery” of the early 1990s. Both times the United States bounced back, boosted on the first occasion by Paul Volcker's conquest of inflation and on the second by a productivity spurt that sent growth rates soaring in the mid-1990s even as Japan stalled.

That record is worth bearing in mind today. Americans are unhappy, and becoming more so, about their country's prospects and politicians' efforts to improve them. In a new New York Times/CBS News poll, seven out of ten respondents said America is on the wrong track. Almost 60% of Americans disapprove of Barack Obama's handling of the economy, and three out of four think Congress is doing a lousy job.

This malaise partly reflects the sluggishness of the recovery. Though unemployment has been falling and share prices are close to a three-year high, house prices are still in the dumps and the price of petrol has soared to levels not seen since the summer of 2008. But it's not all about oil or indeed the short term. A careful reading of the polls suggests that Americans' worries stretch well beyond the next couple of years: about stagnating living standards and a dark future in an economy slow to create jobs, saddled with big government deficits and under threat from China. Tellingly, a majority now regard China, not America, as the world's leading economy.

Are these worries justified? On the plus side, it is hard to think of any large country with as many inherent long-term advantages as America: what would China give to have a Silicon Valley? Or Germany an Ivy League? But it is also plain that the United States does indeed have long-term economic weaknesses—and ones that will take time to fix. The real worry for Americans should be that their politicians, not least their president, are doing so little to tackle these underlying problems. Three failings stand out.

The competitiveness canard

The first failing, of which Mr Obama in particular is guilty, is misstating the problem. He likes to frame America's challenges in terms of “competitiveness”, particularly versus China. America's prosperity, he argues, depends on “out-innovating, out-educating and out-building” China. This is mostly nonsense. America's prosperity depends not on other countries' productivity growth, but on its own (actually pretty fast) pace. Ideas spill over from one economy to another: when China innovates Americans benefit.

Of course, plenty more could be done to spur innovation. The system of corporate taxation is a mess and deters domestic investment. Mr Obama is right that America's infrastructure is creaking (see article). But the solution there has as much to do with reforming Neanderthal funding systems as it does with the greater public spending he advocates. Too much of the “competitiveness” talk is a canard—one that justifies misguided policies, such as subsidies for green technology, and diverts attention from the country's real to-do list.

High on that list is sorting out America's public finances. The budget deficit is huge and public debt, at over 90% of GDP when measured in an internationally comparable manner (see article), is high and rising fast. Apart from Japan, America is the only big rich economy that does not have a plan for getting its public finances under control. The good news is that politicians are at last paying attention: deficit reduction is just about all anybody talks about in Washington, DC, these days. The bad news—and the second reason for gloom about what the politicians are up to—is that neither party is prepared to make the basic compromises that are essential to a deal. Republicans refuse to accept that taxes will have to rise, Democrats that spending on “entitlements” such as health care and pensions must fall. No real progress is likely until after the 2012 presidential election. And the antagonism of today's deficit debate may even harm the economy, as Republicans push for excessive cuts in next year's budget.

When growth doesn't bring jobs

Meanwhile, the biggest dangers lie in an area that politicians barely mention: the labour market. The recent decline in the jobless rate has been misleading, the result of a surprisingly small growth in the workforce (as discouraged workers drop out) as much as fast job creation. A stubborn 46% of America's jobless, some 6m people, have been out of work for more than six months. The weakness of the recovery is mostly to blame, but there are signs that America may be developing a distinctly European disease: structural unemployment.

Youth unemployment is especially high, and joblessness among the young leaves lasting scars. Strong productivity growth has been achieved partly through the elimination of many mid-skilled jobs. And what makes this all the more worrying is that, below the radar screen, America had employment problems long before the recession, particularly for lesser-skilled men. These were caused not only by sweeping changes from technology and globalisation, which affect all countries, but also by America's habit of locking up large numbers of young black men, which drastically diminishes their future employment prospects. America has a smaller fraction of prime-age men in work and in the labour force than any other G7 economy. Some 25% of men aged 25-54 with no college degree, 35% of high-school dropouts and almost 70% of black high-school dropouts are not working (see article).

Beyond the toll to individuals, the lack of work among less-skilled men could have huge fiscal and social consequences. The cost of disability payments is some $120 billion (almost 1% of GDP) and rising fast. Male worklessness has been linked with lower marriage rates and weakening family bonds.

All this means that grappling with entrenched joblessness deserves to be far higher on America's policy agenda. Unfortunately, the few (leftish) politicians who acknowledge the problem tend to have misguided solutions, such as trade barriers or industrial policy to prop up yesterday's jobs or to spot tomorrow's. That won't work: government has a terrible record at picking winners. Instead, America needs to get its macro-medicine right, in particular by committing itself to medium-term fiscal and monetary stability without excessive short-term tightening. But it also needs job-market reforms, from streamlining and upgrading training to increasing employers' incentives to hire the low-skilled. And there, strange as it may seem, America could learn from Europe: the Netherlands, for instance, is a good model for how to overhaul disability insurance. Stemming the decline in low-skilled men's work will also demand more education reform to boost skills, as well as a saner approach to drugs and imprisonment.

Technology and globalisation are remaking labour markets across the rich world, to the relative detriment of the lower-skilled. That's why a rosier outlook for America's economy does not necessarily mean a rosy future for all Americans. Mr Obama and his opponents can help to shape the process. Sadly, they are doing so for the worse rather than the better.