We are approaching the anniversary of America's Independence Day. As we all know, 15 years ago an alien invasion, deploying giant saucer-shaped warships hovering over earth, was repulsed by the ingenuity, true grit and heroism of US forces, leading a worldwide coalition of the willing. President Thomas J Whitmore declared that 4 July would henceforward be celebrated as Independence Day not just for the US but for the entire world. His speech was described by one reviewer as "the most jaw-droppingly pompous soliloquy ever delivered in a mainstream Hollywood movie" – which, given the competition, is saying a lot.

Illustration by Matt Kenyon

It's just a movie, of course, but the 1996 blockbuster is also a document of its time. It returns us to a moment when America seemed to rule supreme, all-powerful, irresistible, in life as in the movies. The new Rome, Prometheus unbound, boasting the mightiest military the world has ever seen: here was the hyperpower at the heart of a unipolar world.

What a difference 15 years make. The mightiest military the world has ever seen has since fought two major wars, in Iraq and Afghanistan. Neither of them can be said to have ended in resounding victories. Iraq, which dominated US debate for so many years, is largely forgotten in the media here. It's history – in the American usage of the phrase.

Afghanistan is not over yet. The suicide attack on the Kabul Intercontinental this week showed how far that country still is from basic security, let alone liberal democracy. But, despite mutterings from his military commanders, Barack Obama has declared that American troops will be pulling out according to his preordained timetable. The US, he says, needs to concentrate on nation-building at home. Most Americans seem to agree. The latest Pew poll has 56% of them saying US troops should be brought home from Afghanistan as soon as possible. A recent blog compares Obama with another leader who pulled out of Afghanistan after a decade of military action so as to concentrate on economic and social reconstruction at home. It describes the US president as "Barack Gorbachev".

Well, hang on. To compare the US in 2011 with the Soviet Union in 1988 is to highlight the huge differences between them. Maybe a comparison with Britain in 1911 would be nearer the mark. Yet clearly the US is wrestling with its own version of the kind of economic, social and political problems that tend to accumulate whenever a country has been a great power for some time.

I sometimes think that the only trouble with the historian Paul Kennedy's famous book The Rise and Fall of the Great Powers is that it was published a quarter-century too early, and picked the wrong rising power. Appearing in 1987, shortly before the Soviet Union collapsed and Japan went into a decade of stagnation, it could be dismissed by bullish Americans as scaremongering. But imagine it being first published this year, and identifying China as the rising power.

The US carries some of the burdens of strategic overstretch that Kennedy described. The cost to the US of the wars in Iraq and Afghanistan, and other post-9/11 operations, has been calculated at nearly four times that of the cost to the US of the second world war, in today's dollars. Because of the tremendous growth of the American economy this translates into a much smaller proportion of GDP: an estimated 1.2% in 2008, as against 35.8% in 1945. But the decade of worldwide armed struggle – initially forced on the US by Osama bin Laden but then followed by a war of choice in Iraq – has devoured a much larger percentage of Americans' time, attention and energies. Even when Washington tries to leave a conflict to others, as with Libya, it keeps getting dragged in as, so to speak, the military lender of last resort.

Beside strategic overstretch, the US suffers from welfare overstretch. In this respect the differences between Europe and the US are smaller than most people on both sides of the Atlantic imagine. Our self-images differ more than the realities. According to Peter Orszag – a former director of the White House Office of Management and Budget – Medicare, Medicaid and social security will account for almost half of American government spending by 2015. The other half is mostly interest payments on the country's soaring debt and discretionary spending, with about half of the latter going on defence. In some individual states, such as California, the fiscal picture is even more grim.

So public spending has to be cut, yet the country's own infrastructure shows all the marks of long neglect. Every time I come back to the US, I am struck by the signs of visible decay.

Beyond the potholes there are much deeper issues, such as the shortfalls in primary and secondary education. Far from leading the world in the rankings of OECD's programme for international student assessment, the US hovers around the middle. Only its universities are still second to none.

To address these deep structural problems America needs decisive political action across party lines. On this, most agree. This is what Obama promised in the brief, unforgettable dawn of 2008-09. This is what he has so far failed to deliver, in part through shortcomings of his own but mainly because it will require something close to an American Gorbachev on steroids to break through this country's polarised politics and gridlocked political system.

In a press conference today the president vented his frustration at the latest example: partisan cliffhanging about lifting the country's debt ceiling. The obstacles lie both in Washington, where the heart of the problem is the supermajority hurdle in the Senate, and in many individual states. A magnificent constitutional framework of checks and balances, designed to prevent the return of British tyranny, has atrophied into a system that makes reform almost more difficult than revolution.

And this, too, is familiar from history. Over time, superpowers acquire dysfunctionalities which they can carry because of their sheer plenitude of wealth and power, rather as a super-strong athlete can carry deficiencies in technique. When your strength wanes you suddenly need the technique; but it may be too late to get it back. Beside technique, there is the all-important confidence. But the old American can-do optimism is shaken. Even those who most loudly proclaim American exceptionalism strike a note of cultural pessimism. "It's breaking my heart," emotes Glenn Beck, "to see this nation basically going down the tubes."

Of course others are still worse off. The new Rome has not yet become the new Greece. But between the EU and the US it may now be a case of competitive decadence. America definitely still has the edge, but it was a Republican not a Democrat senator I heard say last year "this country is going to become Greece, except we don't have the European Union to bail us out". That Americans have obviously now woken up to the hole they're in is a sign of hope. Less encouraging is the fact that they cannot agree how to get out of it.