BY all the canons of Realpolitik, there is no reason why relations between the United States and China should be so miserable.
The two countries have never had boundary problems. They are linked by a long history of trade, starting in 1785, through the Clipper Ship era and ''oil for the lamps of China'' to today's hefty US trade deficit and capital-investment surge. The US has long had a sentimental attachment to China, expressed by the many dedicated missionaries and the charitable and educational institutions that did so much before the Communists took over in 1949.
Today's China is not the invalid that attracted American care. It is rising again as a great power after nearly two centuries of impotence and confusion. But China is unprepared for a smooth transition. It is throwing its weight around, stamping on toes, spitting in faces - behaving with the overassertiveness that betokens weakness rather than strength.
Not that China faces external threats; its insecurity comes from within. It must feed, house, and clothe one-fifth of the human race within a framework of law and order that gives life a decent meaning. From all appearances, the government does not know how to do this or, if it does, is paralyzed by a crazy system that waits for Deng Xiaoping to leave the scene. Such a spectacle of suspended political animation evokes the Soviet Union's ''time of stagnation'' under Leonid Brezhnev, which was followed by stopgap successors and collapse.
China's troubles seem unmanageable. The new wealth of the special economic zones has drawn millions of untrained, uneducated people from the farms. What happens if the frantic pace of development is not maintained? The Communist Party has a paramount priority - to stay in power. Marxism is defunct as a means of persuasion, but ''enri-chessez vous'' (enrich yourselves) does not reach enough people. Corruption is rampant. The system is contradictory. The large state sector of the economy gives the regime a measure of control and stability. But it is wasteful and stands in the way of the radical economic reform that would almost certainly lead to political opening and sweep away the status quo.
Where ideology is dead and personal incentive blocked, an authoritarian regime resorts to force and rigid nationalism. Since the Army came to the rescue in Tienanmen Square in 1989, its budget has soared. China is the only major power expanding its armed forces. It continues to test nuclear weapons and long- and short-range missiles, most recently close enough to Taiwan to be an obvious threat.
An unofficial visit of Taiwan's president, Lee Teng-hui, to his alma mater, Cornell University, enraged Beijing. It accused the US of abrogating the One China policy and of helping Taiwan gain recognition as an independent democratic state. Beijing recalled its ambassador from Washington, waived off a new American envoy, and canceled high-level meetings, including one on missile technology control. It talked about military invasion of Taiwan and held naval and air exercises on the east coast. China also has projected its naval power more than 1,000 miles into the South China Sea, claiming possession of the Spratly archipelago with its oil and gas.
Part of appearing to be a great power is standing up to a really great power. The US is an ideal foil.
Experience suggests that abusing the US entails little risk; nothing ever happened to the Bosnian Serbs who shot down Capt. Scott O' Grady, for example. And China has ignored stern American injunctions to respect human rights; threatened trade sanctions vanished into thin air. Beijing seemed to take special pleasure in arresting a Chinese-American human rights activist, Harry Wu, pushing its thumb into Washington's eye.
The trouble is that this kind of in-your-face satisfaction is evident on the US side as well. House Speaker Newt Gingrich wants full diplomatic recognition of Taiwan. The Senate Foreign Relations Committee supports United Nations membership for Taiwan - a quixotic impossibility, given Beijing's veto. It also wants an ambassador assigned to Tibet. It would like Radio Free Asia to needle the Chinese regime, where the Voice of America would weigh in more heavily with solid information.
The People's Republic has an indefensible human rights record, and the US should not conceal its indignation. Hopefully, Hillary Rodham Clinton will attend the UN's Fourth World Conference on Women in Beijing in September and lay the American position on the line. She would be leading a loud chorus of like-minded people. How different that would be from the normal, uncertain American solo.
The Chinese see that Washington lacks the official support of its allies, who also support human rights but feel they are better served in less confrontational ways. Great power rests on respect and credibility rather than on having the biggest meat axe. For the US and for China, overstatement is a sign of weakness.