Members of both parties last night welcomed President Reagan's invitation to join in a bipartisan effort to rescue the ailing American economy, but many Democrats expressed skepticism that his program would provide the basis for compromise.

The rhetoric of his State of the Union Address clearly reflected Reagan's acknowledgement that the long recession, the mid-term election results and the decline in his standing in the polls have changed him from king to commoner on Capitol Hill.

But wide substantive differences remain between his approach and that of the Democrats to the twin challenges of reducing the deficits and reviving the economy.

The Democrats accented that difference by leading a standing ovation for Reagan's statement that "we who are in government must take the lead in restoring the economy." The gesture seemed designed to underline, for watching millions in the television audience, the shift in rhetoric from his familiar anti-government strictures.

House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.), praised by Reagan last night for setting an example of conciliation on the Social Security issue, called that Reagan sentence "a historic political reversal."

But O'Neill, after welcoming Reagan's bipartisanship and calling it "the first, necessary step in putting America back to work," said pointedly that Democrats will "present a program for action that goes substantially beyond those proposals mentioned by the president."

Senate Republicans, who bear the heaviest burden of passing or adapting Reagan's program, took note of Democratic reservations but expressed relief at what most described as the conciliatory tone of Reagan's remarks.

Sen. Slade Gorton (R-Wash.) said the speech put Reagan "squarely back in a position to work out the economic course of the country." Senate Budget Committee Chairman Pete V. Domenici (R-N.M.) called it "a very good blueprint" for compromise. But the ranking Democrat on that key committee, Lawton Chiles (Fla.), criticized Reagan for insisting on a tax cut this year while endorsing tax increases for later years, when Chiles said, they would be "simply too late" to cure the deficit problem.

Off Capitol Hill, many politicians of both parties gauged the speech for its effect on Reagan's sagging polls and on his prospects for reelection in 1984. The reactions were mixed, and not entirely on party lines.

Democratic pollster Peter D. Hart said, "People who tuned in skeptical are probably still skeptical. He said he had a lot of compassion for the unemployed, but he didn't offer much of a road map for ending unemployment."

Conservative fund-raiser and publisher Richard A. Viguerie entered only a partial dissent. "Joe and Jane Voter are going to feel good about the speech tonight, but as the days turn to weeks, I'm afraid the slide will continue. He's still hoping the thing will turn around without any bold action."

Presidential pollster Richard Wirthlin said the speech showed the right mixture--"consistency but not inflexibility." But John P. Sears, Reagan's first campaign manager in 1980, said the speech gave such mixed signals that "people will be asking, which is the real man, the compromiser or the fellow who allows no real cuts in defense?"

And former vice president Walter F. Mondale, a leading Democratic aspirant for Reagan's job, watched a tape of the speech in San Antonio and called it "basically a reaffirmation of 'stay the course,' " adding, "When you get through the rhetoric, there's really no change at all."

The partisan doubts are likely to increase as the more detailed version of Reagan's program, disclosed to reporters by senior administration officials before the speech, is read and discussed on Capitol Hill.

The program envisages deficits declining from more than $200 billion in the current year to a still-staggering $100 billion in fiscal 1988, while defense spending continues to rise at a rate almost three times the pace of inflation.

Domestic spending, under the Reagan plan, will decline in real-dollar terms through the device of a fiscal freeze.

That is a far different program, in its basics, than that sketched in broad outline in the Democratic State of the Union film that followed Reagan's speech.

The Democrats talked about pouring more dollars into job-producing public works, education and research and on cutting back defense spending plans. They put more emphasis on lowering interest rates, less on cutting taxes.

Two clear differences emerged in the foreign policy area. Reagan said, "America must be an unrelenting advocate of free trade," while Democrats, certifying a gradually emerging and historic switch in their position, advocated a "tougher trade policy" toward competing nations.

On arms control, the Democrats advocated immediate negotiation of a verifiable U.S.-Soviet nuclear weapons freeze, while Reagan said the burden is on the Soviet Union to "show by deeds as well as words" that it is serious about seeking an agreement and trustworthy enough to keep it. All of this suggests that Reagan faces real problems in enlisting assistance from opposition Democrats who believe they can replace him next year and are concentrating on establishing credibility of their own alternatives. The Democratic film assumed the failure of Reaganomics and spent all of its time arguing that Democrats really do have answers, even if voters seem not to know it.

The rhetorical lengths to which Reagan went in seeking bipartisanship impressed even some of his critics. Sen. Daniel Patrick Moynihan (D-N.Y.) said, "That is what we need, and it is the course we ought to pursue."

It was no secret that Republican congressional leaders had pushed Reagan hard to take this line and were pleased that he had acted on their advice.

Senate Majority Leader Howard H. Baker Jr. (R-Tenn.) said before the speech that most members of Congress "understand we've got an ox in the ditch" and wanted the president to acknowledge it.

House Minority Leader Robert H. Michel (R-Ill.) said after the address that lobbying by the Hill leaders had obviously "helped reformulate some of his Reagan's feelings. If you had asked me whether Ronald Reagan would have given this speech two years ago, the answer would have been no."

Two years ago, Reagan did not have to be so accommodating. He was at the peak of his popularity and rightly called "the King of Capitol Hill." But that was before the mid-term election gave his favorite target, O'Neill, 26 more Democrats and working control of the House.

And it was before the polls showed the recession has reduced Reagan to the shaky level of minority approval his one-term predecessor, Jimmy Carter, had at his mid-term.

Politically, last night's speech was the first step in Reagan's effort to avoid Carter's fate, but the early comments were ambivalent enough on both sides to suggest that the jury will be out for a while.