The last thing beleaguered transit riders in the Big Apple needed was to lose the use of 637 new Grumman Flxible buses because of an engineering failure from a company that helped put a man on the moon.

But it happened. Transit authorities here and in Los Angeles, Chicago and Roanoke, Va., have grounded their $150,000 Grumman Flxible Model 870 buses because the steel frames that support them sometimes crack or split. When that happens, a bus tilts to one side and part of it drops to the ground, jarring (but so far not injuring) passengers. There have been 11 such incidents nationwide.

How did Grumman, the manufacturer of the lunar lander, the builder of the F14 jet fighter, the home of the Hellcat, Bearcat and Wildcat carrier fighters of World II, a company with generations of expertise in metal stress and structural integrity, build a bus that breaks?

"It's fascinating to me," said John Bierwirth, chairman of the board and chief executive officer of Grumman Corp. "The best answer is that in testing an airplane's structure, the exact tests that are necessary for conditions of use are set . . . all users need the same thing . . . . There is no standard set [of tests] for buses."

Cracks have developed not only in the main frame of the Model 870, but also in the steel supports that hold the engine, the structure that supports the front suspension and most recently in a major attachment point for the frame.

Thus Grumman Flxible, the only real competition for General Motors in the U.S. bus business, has joined the growing list of transit vehicle manufacturers that have made things that don't work, at least at first. The list includes Pullman (New York subway cars), Robr Industries (Bay Area Rapid Transit and Washington Metro subway cars), Boeing Vertol (Boston trolley cars) and American Motors General (Washington Metro buses).

Only Grumman Flxible is still in the transit business, but the problems with its buses in New York and elsewhere have harmed its reputation, will cost it an estimated total of $7 million to fix and may deprive it of orders already thought to be in the bag. A federal investigation is under way.

The loss also means that New York City riders have to wait extra minutes between buses. An extra minute between buses in rush-hour Manhattan means that 30 more people are waiting at the stop.

That old New York reliable, the subway, has been victimized by a textbook case of deferred maintenance, vandals and cars that don't work because of cracks in the metal section that supports the wheels and axles. There were 18 murders and more than 12,000 other crimes on the subways last year.

"You complained in Washington when the subway was short 50 cars," New York's Metropolitan Transit Authority President John Simpson said. "This morning was a good morning in New York. We started 50 trains short, 50 trains, and were short 80 trains by the end of the rush hour." That means 30 trains broke down.

In New York, where almost one-third of the nation's public transit riders live, patronage slipped 8 percent the first 11 months of 1980. Nationwide, ridership is up about 8 percent the past two years. If New York's decreases were removed from national transit ridership statistics the past two years, national transit ridership would be up 13 percent, according to the American Public Transit Association.

Grumman officials have promised to fix the buses and extend the warranty from three to six years, but while that is going on transit authorities will have to do without the new buses.

A total of 1,185 buses -- almost half the production run since Grumman Flxible began delivering the dark-windowed Model 870 in 1978 -- have been taken out of service nationwide. Most of the 27 transit authorities with Model 870s are continuing to use them while inspecting the frames regularly and waiting for the day their buses are fixed.

Andrew Schiavone, the man in charge of New York City's 4,500 buses, the largest fleet in the nation, tried that approach first and decided it was a loser. Cracks in the frames under the buses were discovered during routine inspection early in November. New York's entire Flxible fleet was inspected and more cracks were discovered but not deemed dangerous.

Then came three in-service failures. The worst was in Flushing on Thursday, Dec. 11, the morning after the huge A-frame that supports the back half of the bus had been inspected. With 78 people on board, the frame snapped in one spot, the engine compartment behind it dropped to the ground, the bus tilted sharply to the right and the body fell to the tires. The bus came to a halt.

Schiavone says the fuel tank, just in front of the A-frame, ruptured; Schiavone's boss, Simpson, says, "I wouldn't use the word ruptured, but it bottomed out . . . . A couple of days later there was a drip from the lower corner of the tank." Grumman officials insist the fuel tank is sound. They showed a reporter what they said was the bus was pointed to an apparently intact fuel tank.

Schiavone appeared at the Metropolitan Transit Authority board meeting the day after the incident. "The board asked me if safety was involved," he said. "I said yes, because of the suddenness of what happened.

"There was no warning," he said. "It had been inspected the night before, and there was a half-inch crack. We figured it was okay. Then it just broke open, and the bus was only going 3 to 5 miles per hour. I had a vision of this happening on Madison Avenue during rush hour with the bus going about 20 mph. The driver loses control and the bus plows through about 20 people."

Schiavone's recommendation was to park the buses until they could be fixed. The board went along. Suddenly New York was short one bus for every seven it expected to have on the street. Since then, through such devices as renting 150 old buses from Washington Metro and resurrecting another 200 from the New York bus graveyard, most schedules have been partially restored.

New Yorkers will not get their buses back until a panel of three engineers declares Grumman's proposed engineering solution adequate. Then the buses will return in a trickle from a Grumman rework plant on Long Island, one of several Grumman has set up around the country.

Los Angeles was luckier. At the time it pulled 230 Flxibles from service, it was taking delivery on a big new order of General Motors buses. "We simply kept some of the old buses we were going to replace, and we were back to a full schedule within a week," said Los Angeles spokesman Mike Barnes.

Chicago's Regional Transit Authority, with 205 Flxibles, chartered school buses from a private operator. Only a few express runs from suburban locations to downtown have been temporarily cut.

In Roanoke, general manager William Vanderbilt was able to lease buses from other transit authorities to fill his needs.

As part of an agreement between Grumman and the transit authority in New York, Flxible was forced to withdraw its apparent low bid for 500 more new buses. Thus the order goes to GM. New Jersey Transit, a statewide operation, is seeking to suspend its contract to buy 271 new buses from Flxible until questions about the bus are answered. Washington Metro general manager Richard S. Page is reconsidering his plan to order 50 buses this year, because he wants competitive bidding. "I want to be satisfied that Grumman Flxible has found a fully satisfactory fix for cracked A-frames," Page said.

Grumman chairman Bierwirth said it will be sometime this year before Grumman shows a profit in the bus business. He had earlier projected that Flixble would turn the corner in the fourth quarter of 1980. Grumman acquired Flxible from Rohr Industries in 1978 to diversify from defense contracting. Bierwirth said he remains confident the nation's energy problems mean there is a good future in the sale of public transit buses.

In the early days of the New York problems, some Grumman executives were quoted as complaining about terrible New York streets and New York maintenance, although they had tested the Flxible Model 870 before delivery. "Clearly, the stresses encountered in service were greater than the stresses recorded in the tests," said Robert Landon, president of Grumman Flxible.

However, New York street conditions and the maintenance situation were known when Grumman Flxible bid, and cracks have now been found in Flxible buses across the country.

"We ought to be able to build a bus that works, and we are building one," Landon said.