President Carter came to New Jersey today for a whirlwind campaign appearance in support of the re-election of ambattled Democratic Gov. Brendan T. Byrne, and in the process learned just how difficult it is to defend new taxes.

At two of the three events where the President and Byrne appeared together, Byrne, who last year pushed through the state's first income tax, was resoundingly booed throughout his brief remarks. Carter verbally attacked the heckiers and came aggressively to Byrne's defense.

At third appearance, a $600-a-plate fund-raising breakfast at Newark airport, there were no boos. But several tables were empty. Officials said about 450 people attended. There was room for at least 50 more.

Today's five-hour compaign swing was the first for Carter since his election. Another such trip is planned for this fall on behalf of Virginia Democratic gubernatorial candidate Henry Howell.

While the White House is not saying so publicly, the Virginia trip poses fewer problems for the President. Byrne was among the first governors to endorse Carter for Prssident and Carter supported Byrne in 1973 and calls him a dear personal friend. But Byrne's political position at this early stage of his campaign is a difficult one - he just doesn't appear to be very popular.

Earlier this year, Byrne squeaked through the Democratic primary, winning with only 32 per cent of the vote against nine opponents, hardly a confidence-inspiring victory.

The latest Rutgers University poll places him 10 points behind his Republican challenger, Ray Bateman, who is as unknown as Byrne was four years ago when he first, ran for elective office.

Polls indicate that much of Byrne's unpopularityu stems from his sponsorship of the much-disliked new state sutumping in New Jersey.

Today he took a different approach, conceding in speechs that the income tax is unpopular but defending it vigorously.

"Now I know that one of the most unpopular things the tax program of a state." Carter told several thousand people at the "Festival of Lights," a weekend religious celebration in a sulidly Italian, working class enclave in Trenton.

This changed was made because of the courage of Brendign Bryne. I think this is becoming re-organized as the months goby as an unpopular get more and more acquainted with the consquences and the results of the income tax, they begin to like it more an more."

That lines drew applause from the crowd, which had booed Byrne at least as much as it had cheered him when he rose ot introduced the President.

Three hours earlier, in a speech to a mostly black crowd in Newark, Carter took on a group of about 40 white hecklers who booed when Byrne rose to speak and continued throughout his addresss and into the first two minutes or so of Carter's remarks.

They identified as members of United Taxpapers of New Jersy, a statewide group oppose to the income tax. They stood together jumping up and down as they booed and waving tricornered "taxation without representation" hats.

"There are people in this state who don't appreciate the great courage and good judgement of Brendan Byrne in putting into effect . . . a state in come tax which cuts yuor own property taxes . . ." the President said.

He began playing to his audience, mentioning housing for the poor, forcing the rich to pay a greater share of taxes and lthe large number of taxes and the large number of black medical students at the New Jersey College of Medicine, where he was speaking.

He linked those to "the leadership of your governor." and as applause built around each point, the boss died out.

All in all, it was a very low-profile day for a campaign. Crowds were small. Only scattered routes to and from the speaking engagements.

Carter did spent almost 10 minutes shaking hands with the crown at the college of medicine and about five minutes working the crowd at the Festival of Lights.

But he did not exploit the opportunities for campaigning as fully as he did during his campaign. The Festival of Lights, in particular, was awash in sidewalk stands selling Italian food ,trinket stands selling buttons reading. "Kiss Me, I'm Italian," and families of three and four generations strairing at the ropes while clamoring for the President to cvome their way.

The Byrne campaign, which is paying for the trip, including the salaries of the White House advance team that has been in New Jersy all week, wanted Carter to make three visits in October.

Officially, the White House says only that no more trips in support of Byrne have been scheduled.

Some New Jersy political observers see Carter's early appearance as a way of playing it safe. He came in early with an obligatory appearance, their thinking runs, so that if Byrne continues slipping in the polls and subsequently loses. Carter's prestige won't be tied to the governor's defeat.

There's also plenty of time, this thinkin runs, for Carter to schedued one or more appearnces to closer to the election if Byrne manages to look more like a winner as the weeks go by.