Though strong defensive performances have helped guide San Francisco and Arizona to some success over the past two weeks, the 49ers' offense has picked up steam while the Cardinals' unit remains a work in progress under first-year coach Bruce Arians.

The 49ers look for a fifth consecutive home victory over the Cardinals on Sunday in matchup of NFC West foes each trying for a third straight win.

After yielding an average of 28.0 points over the first three games and being outscored 56-10 in consecutive losses to Seattle and Indianapolis, San Francisco (3-2) held a 69-14 scoring advantage in wins over St. Louis and Houston.

"We're the 49ers. When we're on, we can do whatever we want to do," running back Frank Gore said.

Despite missing defensive starters Aldon Smith (substance abuse rehab), Patrick Willis (groin) and Nnamdi Asomugha (knee) for the past two games, the 49ers have allowed one touchdown, 501 total yards and forced six turnovers after recording three in the previous three weeks.

San Francisco ranks second in the NFL with 188.8 passing yards allowed per game and recorded three interceptions during last Sunday's 34-3 rout of Houston. Tramaine Brock twice intercepted Matt Schaub, the first of which he returned 18 yards for a TD three plays into the game.

"We've been kind of down on getting turnovers and sometimes things just kind of start breaking right for you," coach Jim Harbaugh told the 49ers' official website.

Though Smith, who was charged Wednesday with three felony counts of illegal possession of an assault weapon stemming from a party at his home in June 2012, will not play, it's uncertain if Willis or Asomugha will return. Defensive tackle Ray McDonald does expect to play despite tearing a muscle at the top of his right biceps against the Texans.

Gore has led a 49ers ground game that's rushed for 396 yards over the last two games after totaling 305 in the first three. He ran for 153 yards and a TD in a 35-11 win at St. Louis on Sept. 26, then gained 81 with a score against the Texans.

Gore has rushed for 316 yards and averaged 6.6 per carry in the last three games after gaining 60 and averaging 2.0 over the first two.

"Once I get going, it's hard to stop me," said Gore, who has averaged only 67.0 yards and scored two TDs in his last five games against Arizona.

Teammate Colin Kaepernick was intercepted four times and didn't throw a TD against the Seahawks and Colts but has passed for three touchdowns and no picks over the past two weeks. He threw for 276 yards with two TDs and no interceptions during a 27-13 home victory over the Cardinals last season.

A winner in seven of eight overall against Arizona (3-2), San Francisco has outscored the Cardinals 112-36 during its four-game home winning streak in the series.

Arizona has not allowed a touchdown in seven straight quarters after giving up 16 points against Tampa Bay and Carolina to win consecutive games for the first time since last season's 4-0 start.

The Cardinals rank third in the NFL with 79.0 rushing yards allowed per game and give up an average of 19.0 points to rank 10th.

During last Sunday's 22-6 win over Carolina, the Cardinals sacked Cam Newton a career-worst seven times and picked off three of his passes. Only three players in Cardinals history had two sacks and an interception in a single game prior to last Sunday, when linebackers Daryl Washington and Karlos Dansby both did it.

"I love it," Arians said. "We want to be dominant on defense. We'll scratch some points out, but we always want to be a dominating defensive football team."

Though Arians has an offensive coaching background, it appears quarterback Carson Palmer and that unit are still growing accustomed to his system.

Arizona ranks 28th in scoring (18.2 points per game), 23rd in rushing (81.0 yards per game) and 22nd in passing (225.2). Palmer is completing 58.9 percent of his passes with five touchdowns and nine interceptions, and Larry Fitzgerald has a team-leading 24 receptions with three TDs but no more than 80 yards receiving in a game.

The Cardinals did rush for a season-best 90 yards last Sunday, including a team-high 52 on seven attempts from rookie Andre Ellington.

"The win keeps you sane a little bit," Fitzgerald told the Cardinals' official website. "We've just got to do better (offensively). It's great to be 3-2, but obviously, going to San Francisco, (then) having Seattle come here and then Atlanta the next three games, we have to put some points up."

Fitzgerald has been held to five receptions for 54 yards and a touchdown in two games at San Francisco following an 11-catch, 125-yard, one-TD performance during a 38-7 loss there Jan. 2, 2011.