Most modern politicians are familiar with Niccolò Machiavelli’s The Prince, still the go-to guide for political intrigue more than 500 years after it was written. But Machiavelli’s other great work, The Discourses, is where he spells out the particular perils of governing in the name of the people. Factionalism and in-fighting, he says, are the price we pay for the pursuit of national glory: someone will always think they can do it better than the person in charge. He also devotes a lengthy section to dissecting how political conspiracies work. Long story short: they are easy to start, but very hard to finish.

Another classic account of how to deal with political division is given in The Federalist Papers, by the American founders Alexander Hamilton, James Madison and John Jay. Like Machiavelli – whom they had all read – they knew that factionalism was an inevitable feature of any form of popular politics. The question was how to stop it spilling over into total political breakdown. One of their pithier recommendations was that “ambition must be made to counteract ambition”, so that no one gets the final say. They tried to build a constitution for the US on this basis, with the results we see today. The UK doesn’t have that kind of constitution, but the general principle still applies: one way to succeed is to play them off against each other.

Anyone who thinks the Conservative party stands for tradition and continuity over improvisation should read these books

There has never been a better description of the distinctive character of British parliamentary intrigue than the one in Anthony Trollope’s Palliser novels, particularly the two masterpieces Phineas Finn and Phineas Redux. They tell the story of an Irish MP trying to decide whether he can work with the English political elite, and what price he will have to pay if he does: a question that has never gone away. The backdrop is a lightly fictionalised account of Disraeli’s attempt to bring the Conservative party around to supporting the Reform Act of 1867. Trollope’s Disraeli is portrayed as a duplicitous hypocrite who somehow pulls the rabbit out of the hat. He gets his way despite having no principles of his own and almost no one on his side. Anyone who thinks the Conservative party stands for tradition and continuity over improvisation and an eye for the main chance should read these books.

A more recent version of the same lesson is in the first volume of Charles Moore’s authorised biography of Margaret Thatcher, Not for Turning. As British politics lurches from crisis to crisis, a bit of Thatcher’s steadfastness is often said to be what we need: she could have knocked the present lot into shape! This book shows that during her early years in power, when she was vulnerable to attack from all sides, she often had to make it up as she went along. When the heat was on, the lady was for turning.

Faction and division usually get a bad name, but Nancy Rosenblum’s On the Side of the Angels: In Defence of Parties and Partisanship shows that we need them: democratic politics would be meaningless if we all thought with one mind. Rosenblum points out that there will always be people who claim to stand for the Party of Reason, which is only interested in doing The Right Thing. Don’t trust those people: they are often the most duplicitous of all. Finally, when politics seems impossible, it is sometimes good to take the long view. Astronomer Martin Rees’s On the Future offers a cosmological perspective on the present state of the world. Brexit seems a bit less all-or-nothing when set against the prospect of post-human space travel. Rees says: “The most complex things we know about in the universe are our own brains.” Ponder that as the political drama unfolds.

• David Runciman’s How Democracy Ends is published by Profile. To order a copy for £10.49 (RRP £14.99) go to guardianbookshop.com or call 0330 333 6846. Free UK p&p over £10, online orders only. Phone orders min p&p of £1.99.