The nation's economy grew substantially more rapidly last quarter than had been estimated previously, while inflation was not quite so virulent, the government reported yesterday. Meanwhile, corporate profits rebounded.

Revised figures on the gross national product showed the economy's total output, adjusted for inflation, rose at a respectable annual rate of 3.5 percent between July and September, not 2.4 percent as reported before.

At the same time, the GNP price index, the government's most comprehensive measure of inflation, showed prices climbed at an 8 percent annual rate over the quarter rather than 8.4 percent, as estimated earlier.

The report on corporate profits showed before-tax earnings of American firms up 6.4 percent in the third quarter, reversing a 2.3 percent decline during the April-June period. After-tax profits jumped 6.2 percent.

However, a substantial portion of the third-quarter rise stemmed from sharply higher foreign earnings by U.S. oil companies and banks rather than from any general rebound among domestic operations.

Although profits from domestic ventures fared relatively robustly in the trade and refining industries, earnings of the major automakers plunged sharply, and profits in other industries were lackluster.

William Cox, the Commerce Department's deputy chief economist, said neither the GNP figures nor the statistics on corporate profits altered expectations that the economy will fall into a recession late this year and early in 1980.

Most economists still expect "real" GNP to post at least a slight decline for the final quarter of this year and then plunge sharply in the first six months of 1980. Retail sales have begun to slide already.

The upward revisions in the third-quarter economic growth rate primarily reflected stronger-than-expected investment in new equipment and machinery and a better performance on net exports.

At the same time, the figures showed that businesses engaged in significantly less inventory-building than some analysts had feared. Forecasters had fretted that too-rapid accumulation of inventories would worsen the recession.

Yesterday's revisions still left the overall "real" GNP only a quarter present higher than the first quarter's level. The report showed real growth up 1.9 percent from the same period in 1978.

The 3.5 percent growth rate for the third quarter compares to a decline in the second quarter that reached a 2.3 percent annual rate, and a rise in the first quarter at a 1.1 percent annual rate.

The 8 percent inflation rate for the July-September period compares to annual rates of 9.3 percent in the first and second quarters, and is contrary to the performance of consumer prices.

Officials say the 13.2 percent annual rate of increase in consumer prices has been exaggerated by the makeup of the index, which, unlike the GNP price index, includes mortgage interest rates.

The rise in before-tax corporate profits last quarter compares to a 2.3 percent decline posted for the second quarter. After-tax earning fell 1.9 percent in the April-June period.

Profits from current production, which are adjusted to eliminate "book" profits from inventory and capital replacement costs, rose 4.4 percent last quarter, following a 2.3 percent drop in the second quarter.

Of this, however, 2.4 percentage points were attributed to the increase in foreign earnings of American petroleum companies, while another 1.7 percentage points stemmed from higher profits of financial corporations.

After-tax operating profits of U.S. corporations actually declined 1.8 percent, the department said.