Five years ago, a Detroit-based corporation tried to patent what it claimed was a better way to prevent oil leaks in engines and wheel bearings. Because the invention involved the use of a computer program, the patent application is now before the Supreme Court.

At about the same time, another company applied for a patent on a method of making one computer perform many different tasks, so it can be used, for example, for both scientific and business purposes. That invention also involved a computer program and it, too, is before the Supreme Court this year.

Together, they are the sort of cases that easily escape notice, for the issues are fuzzy and the arguments complicated. But the stakes in these two controversies may be staggering. Millions, perhaps billions, of dollars are on the line, for there are about 3,000 patent applications awaiting their resolution.

In addition, for the lawyers and judges who handle patents, a major principle is at stake. This is the rubber match between two ideologies: a contest, at the two extremes, between those who believe that the country, to progress technologically, desperately needs the financial incentives provided by patents and those who see them as essentially monopolistic, to be tolerated where necessary but not encouraged.

The antitrust lawyers in the Justice Department lost last term's case involving genetic engineering, when the court allowed patenting of recombinant DNA organisms. But in 1978 they won a major computer case, in which the justices cautioned a go-slow approach to computer program-related patents until Congress decides to act on them.

This year's cases stem that 1978 computer decision, called Parker vs. Flook, and from a heated dispute between the Justice Department and the Court of Customs and Patent Appeals about what that decision meant.

The court, a special tribunal set up to consider patents, has interpreted the decision liberally from the standpoint of the patent seekers, repeatedly overruling U.S. Patent Office denials of applications involving computer programs. The Justice Department believes that the court's action effectively allows patenting of anything, in a way that gives the computer industry unbridled monopolistic control over products never intended by the laws.

The court, the department has charged, is "flouting" the law.

Neither side in the case is arguing that computer programs themselves are patentable. They are essentially mathematical formulas, the Supreme Court has already ruled, relationships between numbers that existed in nature until they were discovered by man. They belong to everybody unless Congress says otherwise.

The cases are about new inventions that use computer programs and whether they are patentable.

The Federal-Mogul Co. of Detroit makes synthetic rubber seals designed to prevent oil leakage in automobile and railroad engines and wheel bearings. The synthetic rubber must be heated, or cured, in a mold from its initial soft form to a hardness that will act as a seal. If it isn't cured enough, it will leak.

For years, the curing process involved the kind of guesswork familiar to chefs making a souffle. Technicians knew that the rubber should be cured at, for example, 300 degrees for three minutes.But they were never certain of the exact temperature inside their molds. To be certain the seals were sufficiently cured, Federal-Mogul overcured, cooked them a few extra seconds or minutes.

Two corporate scientists, James R. Diehr II and Theodore A. Lutton, solved the problem with a thermostatic device that uses specially programmed computer to take constant temperature measurements and limit the cure time to only that required. The result, according to the corporation, was a dramatic increase in productivity, due to the elimination of overcuring, and a major improvement in the quality of the seals.

Federal-Mogul can always use the technique in its own factories, where it remains its own trade secret. But the corporation decided it could make money, and improve overall industry productivity, by releasing the technique to other rubber products firms. If a company does this without a patent, competitors can simply copy the technique and pay Federal-Mogul nothing. A patent gives a company exclusive rights to a product and the ability to charge a licensing fee for its use. Lutton and Diehr applied for the patent in August 1975.

The second case involves the patent application of two Honeywell Information Systems scientists, John J. Bradley and Benjamin S. Franklin, for a technique that instantaneously changes the use and computing power of computers, allowing the same machine to be used for scientific, business or other purposes.

The company compares the invention to the recently advertised Cadillac that changes from four to eight cylinders according to the power needs of the car. Honeywell hopes to market the device and sought a patent for it in April 1975. The Honeywell invention also requires a form of computer program, though just what kind it is is hotly disputed by the government.

Patent applications must pass through three separate "gates," as the lawyers call them. The second and third ones require a judgment that an invention is, in fact, new and that it wasn't something obvious in an industry. i

The first gate is designed to screen out subject matter which is not patentable at all, whether new or nonobvious. The Honeywell and Federal-Mogul inventions got stopped at the first gate, and it is this issue of patentability around which the Supreme Court cases revolve.

"An idea of itself is not patentable," the court has said. "A principle, in the abstract, is a fundamental truth; an original cause; a motive. These cannot be patented, as no one can claim in either of them an exclusive right." Thus, Einstein's theory of relativity is not patentable.

No one is debating that principle now. But in 1972, the justices determined that a computer program, by itself, without consideration of whether it created a new process, was unpatentable.It was a mere set of numbers, an abstract intellectual concept.

In 1978, in the case of Parker vs. Flook, the court tried to answer the question as to whether the program, in conjunction with its application, was patentable. Justice John Paul Stevens wrote, "We must proceed cautiously when we are asked to extend patent rights into areas wholly unforeseen by Congress."

The trouble began then. The Patent Office and the Justice Department interpreted that decision to mean rougher times for any patent application built around a computer program. So the Patent Office rejected both the Federal-Mogul precision mold device and the Honeywell patent, saying the programs were the only thing that made the devices new.

The corporations appealed, arguing that the mathematics used in their inventions were peripheral to the patent application, that they had created altogther new processes, new machines.

The Court of Customs and Patent Appeals agreed, allowing the patent applications to pass through the first of the gates required under patent law.

The Justice Department, which appealed to the Supreme Court, argues that the computer programs are the only thing new about the two inventions. Since the court has never held such programs patentable, the decision must be left to Congress, not the courts, department lawyers said.