For every revered Steve Jobs, there’s a reviled Bernie Madoff; for every folksy Warren Buffett, there’s a tone-deaf Mitt Romney. The pursuit of happiness is patriotic, but the pursuit of riches can come off as greedy. This ambivalence toward the wealthy is embedded in American democracy, and no one knows how to yank it out.

Even Alexis de Tocqueville agreed — a good thing, too, because discussing democracy in America without quoting Democracy in America is forbidden. “Men are there seen on a greater equality in point of fortune . . . than in any other country in the world, or in any age of which history has preserved the remembrance,” Tocqueville wrote of his travels in the United States. But then, the dagger: “I do not mean that there is any lack of wealthy individuals in the United States. I know of no country, indeed, where the love of money has taken stronger hold.”

Robert F. Dalzell, a historian at Williams College, believes he has an answer. America has a long-standing deal with the rich, he explains, one that allows the country to “forge an accommodation between wealth and democracy.” It’s simple: Yes, rich people, you can exploit workers and natural resources and lord your wealth over everyone if you like, and we’ll resent you for it. But if, along the way, you give a chunk of your fortune to charity, all will be forgiven, old sport. History won’t judge you as a capitalist; it will hail you as a philanthropist.

This uneasy bargain is the premise of Dalzell’s The Good Rich and What They Cost Us, which chronicles the deal from before the revolution through the recent financial crisis. Of course, just because the deal has lasted this long doesn’t mean that it will endure. Or that it is a particularly good one. Or that the rich aren’t constantly trying to rewrite the terms.

Early on, the wealthy waited until their deaths to strike the deal. Dalzell writes of Robert Keayne, a prominent 17th-century Boston merchant who sought to cleanse his price-gouging reputation by devoting his posthumous riches to college scholarships, improvements in his city’s water supply and defense, and construction of a town hall where important men like him could discuss weighty things. His will became a unilateral contract with town leaders; if anyone tried to sue his estate for past misdeeds, Keayne stipulated, all his giving would “utterly cease and become void.” Boston took the deal.

John D. Rockefeller saw no reason to wait. His Standard Oil empire — whose ruthless business tactics Ida Tarbell exposed and whose interlocking parts the Supreme Court split up — became the basis for the greatest philanthropic enterprise the world had ever seen. From major financial commitments to Spellman College and the University of Chicago, to support for medical research that developed the yellow-fever vaccine, to the financing of the Cloisters museum in Upper Manhattan and the restoration of Colonial Williamsburg, to list just a few initiatives, Rockefeller and his descendants set the model for modern, large-scale philanthropy. And they did so in a way that preserved the family’s influence and wealth over multiple generations.

“There was something Medici-like about the whole effort,” Dalzell writes, “for within the soul of that great Renaissance family there lay an urge to combine what many might have thought uncombinable — vast wealth and dedicated public service.”

But he also sees a more prosaic motivation: Billionaires want to polish their reputations for posterity. Wealth does not dull their sensitivity to what we think of them; it heightens it. Dalzell thinks it is no coincidence, for example, that the Giving Pledge — a public commitment by the world’s richest individuals, led by Buffett and Bill Gates, to donate most of their fortunes — coincided with the Great Recession’s backlash against the wealthy.

So, the rich just want to be loved. Is that so wrong? If more than 100 of the planet’s wealthiest families and individuals are promising to give away unfathomable amounts of money, why quibble?

Well, there’s at least one reason: The deal gets worse as the price paid for the rich’s charity — the inequality between the affluent and the rest — keeps rising. From 1979 to 2007, the real, after-tax income of the top 1 percent of the U.S. population grew by 275 percent, compared with 18 percent for the bottom fifth, according to the Congressional Budget Office. Social mobility has become more stunted in the United States than in Europe. And Americans see themselves falling further behind: A Washington Post-ABC News poll last year found that 57 percent of registered voters believed that the gap between the rich and rest was larger than it had been historically; only 5 percent thought it was smaller.

The deal will get even worse if efforts to push laws and policies that benefit wealthier Americans succeed. In Rich People’s Movements, Isaac William Martin, a sociologist at the University of California at San Diego, says today’s Tea Party is just the latest manifestation of another American tradition: the mobilization of wealthy and middle-class citizens in an effort to cut their taxes and contributions to the state.

Before the Tea Party, Martin tells us, there were tax clubs — groups of bankers throughout the South that agitated for tax cuts and helped bring about the Revenue Act of 1926, which “cut the tax rates on the richest Americans more deeply than any other tax law in history.” Before we had Grover Norquist and Americans for Tax Reform, we had J.A. Arnold and the American Taxpayers’ League, and Vivien Kellems and the Liberty Belles, a 1950s women’s movement that campaigned to repeal the income tax. And before Arthur Laffer and supply-side economics, there was Andrew Mellon, the banker, philanthropist and Treasury secretary whose 1924 book, Taxation: The People’s Business, argued that cutting income tax rates would create more revenue through greater economic growth.

Rich people’s movements respond to perceived threats, such as the New Deal, President Franklin Roosevelt’s effort to cap incomes during World War II (because “all excess income should go to win the war,” FDR explained) or, now, the policies of the Obama administration. But these movements sell their efforts not as benefiting the rich alone — that would be too transparent, too tacky. Instead, they claim to protect freedom, promote growth, safeguard the Constitution or fend off an ever-more-intrusive government. Martin calls this “strategic policy crafting,” and it brings more allies to the fight.

In fact, it is not just the wealthy, but often the middle class or the slightly-richer-than-average who have campaigned for lower taxes on affluent Americans. “People need not be dupes in order to protest on behalf of others who are richer than they are,” Martin argues. “The activists and supporters of rich people’s movements were defending their own real interests, as they saw them. A tax increase on the richest 1 percent may be perceived by many upper-middle-income property owners as the first step in a broader assault on property rights.” In other words, there’s nothing the matter with Kansas.

Shortly before the Republican National Convention gathered last year to nominate a man who could have become one of the richest presidents in U.S. history, the Pew Research Center conducted a survey on American attitudes toward the wealthy. The chronic ambivalence was there: Forty-three percent of respondents said rich people are more likely than the average American to be intelligent, and 42 percent believed that the rich worked harder than everyone else. The good rich! But 55 percent said wealthy people were more likely to be greedy, and 34 percent thought they were less likely to be honest. The bad rich. Can “giving pledges” and foundation grants sustain America’s deal with the wealthy in a time of increasing inequality and falling social mobility? In his conclusion, Dalzell worries that the belief in the generosity of the good rich leads us to “tolerate, even celebrate, the violation of some of our most cherished ideals” of fairness and egalitarianism.

Perhaps the dilemma of extreme wealth and disparities in a democracy is that noblesse oblige becomes necessary. These two books show that the wealthy give much with one hand but seek to contribute far less with the other. That makes the giving they choose to do all the more critical but all the less accountable.