United Technologies Corp. last night formally launched a battle to take over Babcock & Wilcox Co., offering to buy all shares of B&W common stock at $42 apiece, despite a harshly worded rejection and a federal lawsuit filed by the smaller firm earlier in the day.

After the close of trading on the New York Stock Exchange, UTC announced that it had filed with the Securities and Exchange Commission a notice of intent to make a purchase offer, a formality which the firm had studiously avoided during initial frosty exchanges with B&W last week. UTC also said it will file a proposed form of offer with the SEC and the State of Ohio today.

Before trading began yesterday Babcock had released the text of a letter from its board of directors to UTC dated April 1, refusing the takeover bid as well as the details of a lawsuit filed in federal court in Akron, Ohio, aimed at halting the acquisition.

The $42 a share offer for the 12.2 million outstanding shares of the nation's oldest and largest steam-generating equipment manufacturer meant a half billion cash outlay by UTC, a 20 per cent premium over the market value of Babcock shares before United's overture.

Characterizing the takeover as "corporate buccaneering," B&W's board said the offer was "so grossly inadequate that it was never intended to be taken seriously." But, it added, "The legal and national public interest issues raised by your proposition make academic the question of price."

Babcock's attorneys are seeking a federal injunction to block the takeover on grounds that the acquisition would violate federal antitrust and state and federal securities laws. The lawsuit claims that UTC would criminally violate the Atomic Energy Act if it took control of B&W's nuclear licenses without the prior approval of the Nuclear Regulatory Commission.

B&W said it will request hearings under the New York and Ohio takeover laws.

B&W has criticized United's motives for the takeover, which would link two of the largest firms in the energy equipment field. The April 1 letter commented that "simple self-aggrandizement is no longer the parameter defining the role of American business."

Babcock, which makes fossil fuel (coal) and nuclear-fired boilers as well as nuclear power reactors, said the pressures of the energy crisis made it "peculiarly inappropriate" to consider a takeover bid at this time. "The abortion of (that) competition would be hostile to the public interest," the letter asserted.

Babcock's attractiveness as a takeover property is in part due to its focus on both the coal-fired as well as nuclear technology. Founded in 1867 as an industrial boiler manufacturing firm, it is now one of the largest producers of nuclear power reactors in the country. It also produces tubular steel and refractory products, machine tools and automated machinery and controls.

Uncertainty over the role of nuclear power in the Carter administration's energy policy has had no dampening effect on B & W's outlook, analysts say, because of the firm's involvement in coal-burning boilers. "Babcock has it both," one analysts said. "They can't lose no matter what road Carter chooses.

UTC's bid for Babcock was hardly unexpected by merger watchers, who note that B&W well matches the criteria set forth by UTC in 1973 for its potential "partners." Babcock is successful, established, a high technology company operating profitably in markets where it holds a leading position outside the government sphere.

At UTC's initial acquisition announcement, Babcock stock jumped $5.25 to $40 a share as speculators took a chance that a pleasant profit could be turned if the deal was consummated. While many on Wall Street were cynical about the B&W-UTC outcome and some tried to warn speculators from betting too heavily on the stock, the potential for a short term profit of even $1.50 or $2 a share tempted many into the market.

Babcock, whose sales in 1976 totalled $1.69 billion, with earnings of $53.1 million, yesterday closed at $37.875, down 12.5 cents on the New York Stock Exchange.

United Technologies, whose operating units include Pratt & Whitney Aircraft, Otis Elevator, Essex, Sikorsky Aircraft, Power Systems, Hamilton Standard, Norden and Chemical Systems, recorded corporate sales of $5.2 billion in 1976 with earnings of $157 million. At the close of trading yesterday, UTC stock was $34.50, down 25 cents.