President Reagan signed the $4.1 billion three-year tax bill Friday that provides some tax breaks for numerous groups, including farmers, free-lance writers, and investors in low-income housing and mutual funds.

The bill also added 600 acres to the historic Manassas Battlefield Park in Virginia, a move designed to block construction of a proposed shopping mall in the area.Primarily designed to make corrections in the landmark 1986 tax reform bill, the legislation was approved in the final hours of the 100th Congress when Senate and House negotiators broke a seemingly hopeless stalemate.

The $4.1 billion figure was a compromise between the $7.5 billion bill approved by the House and a $2.5 billion Senate package. Reagan threatened to veto the House version because of the high price.

The new tax breaks were offset by some tax increases, primarily on businesses. The bill would speed up estimated corporate tax payments and hit life insurance tax shelters as well as increase taxes on sales of paper tax losses by corporations created by the Alaska Native Claims Commission.

The bill also would allow the Treasury Department to pay lower interest on some long-term bonds instead of the higher rate now required for short-term bonds.

The legislation imposes new restrictions on a controversial accounting system used by defense manufacturers to defer taxes.

Included in the bill was a tax exemption for the interest on U.S. Savings Bonds when used for education purposes and a new taxpayers' "bill of rights" to guard against harassment by the Internal Revenue Service.

The bill extended for one year expiring tax credits for 20 percent of certain investments in research and for hiring handicapped and other groups that are hard to employ.

A one-year extension also was provided for a tax exclusion for employer-financed deductions, for a tax credit for low-income rental housing and for tax-free state or local bonds used to cut the cost of mortgages for first-time homebuyers.

Farmers got a break with an exemption from the tax on diesel fuel. They now have the exemption but must pay the tax and apply for a refund. Free-lance writers were awarded more lenient deductions.