Alone with his wife, Rosalynn, at this mountaintop presidential retreat, Jimmy Carter sat down on the afternoon of July 4 to put his pencil to a draft of an energy speech scheduled for national television the next night.

The speech was a clearly written summation of the latest administration plan for dealing with the energy shortage, a strategy whose major elements have been forecast for weeks.

But between noon and 3 p.m. that Independence Day, away from his staff, Cabinet and administration, Carter decided to cancel the speech for one simple reason. He believed that neither the country nor the Congress would heed or respond to another energy speech - the fifth of his term - from him.

That decision set in motion 10 days of extraordinary private meetings between the president and more than 100 individuals, ranging over every subject from the details of synthetic fuel production to the decline in availability of movies suitable for family viewing.

Today, on the same mountaintop, now joined by Vice President Mondale and his senior political and policy advisers, Carter is preparing to deliver the speech he canceled two weeks ago.

He knows now that the abrupt and unexplained cancellation added to doubts about his leadership. He wishes in retrospect that he had drafted a clear statement that day of his reasons for postponing the talk.

He also concedes that the drama of his protracted, private meetings here probably has created exaggerated expectations. The speech he will give at 10 p.m. Sunday will offer no immediate relief for drivers in the gasoline station lines and will, instead, suggest that energy will be scarce and expensive for years to come.

He is prepared to live with the consequences of the predictable disappointment when the people find out that he has discovered no magic answers.

The decision to invite a group of reporters to Camp David today, for a briefing was, in large part, an effort to dissipate the doubts created by the cancellation of the earlier speech to prepare the public for the kind of speech Carter will give Sunday.

He recognizes, perhaps more clearly than anyone, that the address is a turning point for him and his administration.

He believes that if he can draw the same response from the television audience that he has drawn in his meetings with leaders of Congress, governors and mayors, officials from business, labor, religion and education, and two groups of citizens, there is a chance this speech could be a turning point for the country as well.

From all those people - the senior senators who have publicly challenged his past proposals as well as the citizens frustrated by gas lines and rising prices - Carter has heard the message that they are waiting for the president to tell them what needs to be done.

If he can speak with a clear voice - at which he concedes he has failed more often than he has succeeded since he entered the White House 30 months ago - he believes he can make of the energy issue a test case for restoring confidence and healing the internal divisions he thinks have crippled this nation and its leadership for 15 years.

If he fails, as he concedes he may, it will not only doom his won candidacy but leave for his successor an even greater burden of public cynicism and distrust.

The speech Carter gives Sunday night will from all indications offer few surprises in substantive energy policy. Advance speculation appears well-founded: he will seek broader authority to institute gasoline rationing if he thinks it necessary, authority he does not have today. He also would like the power to set quotas on oil imports if necessary. And he would like a new government energy board to cut red tape and speed energy production.

Those steps, plus an appeal for congressional passage of his so-called "windfall tax" on oil, were included in the July 4 speech draft and have undergone little change in the subsequent 10 days.

What is new about the Sunday speech is Carter's effort to use the energy issue, which he dragged him to new lows in the polls, as a lever with which to restore public confidence in his leadership.

It is a change in approach which he has told visitors will be reflected, not just in the rhetoric of this address, but in a restructing of his Cabinet and White House staff and in a redefinition of his role as president.

The specifics of the changes to be made in a staff and Cabinet which until now Carter has defended against all criticism, remain unknown.Those changes probably will not be addressed in Sunday's speech but will become visible in the weeks ahead. Indications are that they will be substantial.

The change in his leadership approach should be more obvious, if Carter's Camp David plans suceed. Six months before his active campaign for renomination normally would begin, Carter has concluded that his critics were right in saying that he has been too bogged down in the internal management of government and has failed to mobilize public support for national policies, a job people expect of a president.

His answer is to get close to the people, starting with speeches Monday in Kansas City and Detroit, and later with many more public appearances.

If he is to lead a nation whose confidence in its future and faith in its institutions were severely damaged by the shocks of assassinations, Vietnam, Watergate and other high-level scandals, Carter now believes that his first task is to restore bonds of trust and communication between the White House and the nation.

He thinks he has lost the contact with the country and its concerns that he had during the 1976 campaign and that only by listening to people in their communities can he persuade them to listen to him.

He promised in his campaign that he would do that, but he failed to carry through, he now believes, because he allowed himself to be swallowed up in the detailed work of shaping 15 or 20 programs to deal with as many policy areas.

The result is that the public and Congress literally have been turning him out. Eighty million people listened to his first energy speech - the one he delivered wearing a cardigan sweater. Only 30 million bothered to listen to the last one, and afterward Carter could see no indication that those who had listened had been moved.

All this was on his mind when he and Rosalynn came here for what then was planned as a brief July 4 holiday. Even so, Carter had not thought of canceling the next night's speech as late as luncheon that day.

There were, however, factors forcing him to consider an attempt, at whatever risk, to address the larger problems undermining, not just America's society, but those of the other advanced nations of the world.

In private talks with Soviet President Leonid I. Brezhnev in Vienna, he found sobering the aging Russian leader's recital of the ethnic and nationality strains in his own country.

Later, in Tokyo, he heard Joe Clark, the new Canadian premier, describe in terms paralleling Carter's own the dilemma of framing energy policy in a nation where producer and consumer forces are geographically separate and politically equal. He heard Britain's Margaret Thatcher talking about the social strains of her country's growing immigrant population, and Valery Giscard d'Estaing talk about "the Moroccan problem" in France.

He was developing a sense of a worldwide unraveling of the bonds that hold complex industrial societies together, as well as an acute sense of the threat to those advanced nations from the oil-producing cartel.

As he sat on the mountain here July 4, Carter knew that King Khalid of Saudi Arabia would respond favorably to his private plea, through Ambassador John West, that the Saudis increase oil production temporarily.

But he has no assurance of how long the increased production will last. And he knows that the Organization of Petroleum Exporting Countries (OPEC), if left to its own devices, will reduce oil production in the years ahead.

While he is grateful to the Saudis for the temporary relief their increased production provides, Carter knows, even if the public does not, that this is an artificial bulge in the supply and the long-term production trend will be downward. In that sense, at least, he is convinced that the energy situation in 1980 will be worse than 1979, and that the situation in 1981 will be worse than in 1980.

He also had direct evidence of how the growing dependence of advanced nations on imported oil made them hostage to the political will of the Arab countries.

Clark had told Carter of a direct threat from OPEC to withdraw investments in Canada if the Clark government carried out its election pledge to shift its embassy in Israel from Tel Aviv to Jerusalem.

Carter himself had been told that if a machinists union lawsuit accusing OPEC of violations of U.S. antitrust laws were, against all odds, successful, the oil cartel's huge assets in the United States might be withdrawn.

His ears were blistered in Tokyo by allied leaders expressing deep resentment at what they saw as the failure of the U.S. government to address this nation's energy practices.

In the face of all this, it seemed almost futile to him to make another routine energy speech and launch yet another program that would flounder without public support and be regarded as a target for everyone in Congress whose interests were not served by its provisions.

On the other hand, Carter had what he believes to be an encouraging success in the area of energy policy.

When he proposed the phased decontrol of oil prices, accompanied by a "windfall profit" tax, such powerful senators as Henry M. Jackson (D-Wash.) and Edward M. Kennedy (D-Mass.) immediately came out against his plan. Sen. Russell B. Long (D-La.) told him in a private conversation that he hoped Carter would abandon the plan, because such a tax bill could not be passed by Long's Finance Committee and he hated to see the president embarrassed by another failure.

But on that issue, Carter believes, he was persuasive to the American people, and when the people are persuaded the Congress will respond. Despite rumblings, Congress did not overturn the decontrol decision. The windfall profits tax has passed the House and, in Carter's view, has favorable prosspect for Senate approval.

There was a chance, he decided, that the success could be repeated with a broader, more comprehensive energy program. If that challenge could be met, it might, over the next seven to 10 years, help cure some of doubts gnawing at Americans' traditional self-confidence in much the same way that the goal John F. Kennedy set of sending a man to the moon in the Sixties and returning him safely helped offset the blow to national pride suffered when the Soviets launched their Sputnik program.

Carter realizes that the odds facing him are far greater than those Kennedy had to overcome. Public confidence in his leadership, though greater than the trust in Congress, is so low that it seriously compromises his leadership. It is easy for both the public and the Congress to ignore what he says.

The extraordinary events of the last 10 days, unparalleled in the history of the modern presidency, probably have created an exaggerated sense of anticipation. If there is a national malaise, as Carter believes, he is realistic enough to know it will not be cured by a single presidential speech. He does not see himself as a Moses coming down from the mountain.

But the unusual - or what some would call bizarre - sequence of events has accomplished certain things that might not otherwise have been achieved.

He has the nation's attention for this speech more fully than he has had the nation's attention since the early days of his presidency. One of the citizens he visited in Pittsburgh Thursday night told Carter he questioned the wisdom of canceling the July 5 speech without explanation. Carter asked if the man would have watched the July 5 speech. Embarrassed, he told the president he would sure be watching Sunday.

Carter also thinks that the exercise of bringing the 100 visitors to Camp David, government officials and private-sector leaders alike, has been useful and encouraging. In the relaxed atmosphere of this camp, he has invited and heard more blunt, direct advice than he ever has gotten in the Oval Office. At the same time, he believes he has found greater agreement on the essentials of the energy program than the public rhetoric of the past two years would have suggested was likely.

As a result, Carter thinks he can address the country with greater confidence of success than would have been the case had he gone ahead with his original speech.

His appearance and manner suggest no transformation has taken place at the mountaintop. He has kept to his routine of jogging several miles each day, despite the busy schedule of meetings. His color is good.

But no miracles have taken place during his isolation from public view. He remains a president unobtrusive enough to slip into a room without his presence creating a stir, soft-voiced enough so listeners often must strain to hear his words.

He acknowledges there is no certainty that he can deliver a speech that will shake people up and force them to examine what is right and wrong about the nation.

It still galls him that the best energy speech he thinks he has given - the April 20, 1977, address - was scorned and ridiculed. His statement then that the energy crisis was "the moral equivalent of war" was parodied as a MEOW, from the acronym of the phrase. But subsequent events, he thinks, have proved his assessment of the seriousness of the problem was, if anything, understated.

He knows he faces a severe challenge in trying to project to a national audience the sense of confidence he feels about the country's ability to master this situation. But he hopes to plant a seed of trust that may grow in coming months.

For that reason, Sunday's speech will be, like most of the successful speeches he gave in his 1976 campaign, more of a thematic address than a recitation of specific proposals.

The specifics will come Monday morning when he speaks to the National Association of Counties convention in Kansas City. Later that day, at a visit to the Communications Workers union convention in Detroit, he will answer questions about his plans.

Sunday night's speech probably will contain an acknowledgement of public confusion about, and brief explanation of, the activities of the last 10 days. Carter hopes, by illustration, to suggest the value of the kind of candid discussions he has been through - discussions in which he spent 90 percent of his time listening, not talking.

He will try to describe as clearly as he can his own concept of the crippling effects of the nation's loss of self-confidence and trust in its own leaders and institutions.

He will try to suggest that the energy plan he will outline can not only answer the nation's needs but also help Americans reidentify themselves with the successful achievement of an important national goal.

Finally, he will try to suggest that the national goal can be achieved. There will be sacrifices involved. The national standard of living may be lower than it would have been were there no constraints on energy use.

But the sacrifices the middle-class majority will be asked to make are smaller than the constant deprivations of those citizens who live in a permanently depressed sector of the economy - whose interests must be given special protection in an equitable energy plan, Carter believes.

The basic prospect is bright. The recession should be over by the first or second quarter of 1980, and for now there is no need to alter the economic course or abandon the goal of a balanced budget for a quick tax cut.

America's energy supplies dwarf OPEC's and need only to be unlocked. Coal and shale can be tapped in the years just ahead, Tar sands and other exotic sources can be tapped later.

The nuclear industry also can be revived, but only if the presidential commission now studying the Three Mile Island incident recommends procedures that guarantee the safety of atomic power development.

The windfall profits tax will provide the capital for government's part in this energy development process. Industry is ready to finance its share, seeking only a guarantee of markets for the alternative energy sources it will provide.

The role of the president, Carter now has come to believe, is to hind the efforts of government, industry and consumers together - stressing their compatibility, not their conflicts. Although he often has indulged himself in the past in anti-oil company rhetoric, Carter now thinks it more important to defend institutions that perhaps are distrusted even more widely than are political leaders.

To say that this is a large order is merely to confirm a conclusion the president has reached in his own mind. His uncertainty about how he might even approach such a task was another reason he canceled the July 5 talk.

Now he believes he is ready. He is not predicting success in his venture, but he thinks there is a possibility of pulling it off. In any event, he thinks he is prepared now to do the best he can with the assignment. Then it will be for others to judge. CAPTION: Picture 1, no caption, By Gerald Martineau - The Washington Post; Picture 2, no caption, By Frank Johnston - The Washington Post