United States team-mate Maurice Edu fired the second from 22 yards eight minutes later.
Steven Naismith scored on the break after 51 and 81 minutes.
And the victory means the reigning champions stretched their lead to seven points ahead of second-top Celtic's afternoon meeting with the Scottish Premier League's bottom side, Inverness Caledonian Thistle.
Bocanegra (right) opened the scoring for Rangers against Dunfermline
Edu, Naismith, Nikica Jelavic and goalkeeper Allan McGregor had returned to the Rangers side as manager Ally McCoist reverted to the starting 11 that defeated Celtic following the shock exit at the hands of Falkirk.
Andrew Barrowman was chosen ahead of Andy Kirk up front for Dunfermline as Jim McIntyre looked to capitalise on the former Ross County forward's greater mobility.
Barrowman just failed to find advancing midfielder Paul Burns with a clever ball over the Rangers defence, but the visitors were ahead after their first spell of pressure.
Goalkeeper Paul Gallacher produced a superb instinctive save when a curling Gregg Wylde free-kick was flicked on by the head of Naismith.
However, from the corner, Bocanegra shrugged off weak marking to send a header into the corner from 12 yards from Steven Davis's outswinging cross.
The Pars remained positive and ought to have made more of an opportunity presented to them when Sasa Papac lost the ball to Jason Thomson.
Rangers' second goal came as easily as the first when Jelavic laid the ball off to Edu, who sent a dipping left-foot drive from 22 yards past the fingertips of a surprised Gallacher.
Burns tested McGregor with a 25-yard drive and the midfielder's follow-up effort was blocked after the goalkeeper could only beat the ball away.
Rangers were looking to kill off the Pars on the break, but Gallacher managed to smother a low Wylde drive at the second attempt.
Dunfermline's hopes of repeating their two-goal fightback of last week against Hibs finally disappeared only five minutes into the second half.
Davis threaded an excellent ball behind the defence and Naismith lifted it past the arms of the advancing Gallacher from 16 yards.
McGregor prevented the Pars reducing the deficit when the goalkeeper got down well to stop a low David Graham drive after Barrowman rolled it into the forward's path.
Gallacher turned over a curling Jelavic free-kick and pushed wide a dipping 30-yard volley from Steven Whittaker as Dunfermline were left exposed as they opened up in their search for a way back into the game.
Rangers broke clear to score 10 minutes from time when Davis thrust forward before setting up Jelavic, who rolled the ball into the path of Naismith.
The assistant referee signals for offside against Liam Buchanan. Indirect free kick taken by Allan McGregor.
Unfair challenge on Steven Naismith by Gary Mason results in a free kick. Strike on goal comes in from Steven Davis from the free kick, save made by Paul Gallacher. Outswinging corner taken by Steven Davis from the right by-line, clearance by Jason Thomson.
Paul Burns takes a shot. Save made by Allan McGregor.
Dorin Goian challenges Liam Buchanan unfairly and gives away a free kick. Free kick crossed by Austin McCann.
Substitution David Healy replaces Nikica Jelavic.
Assist on the goal came from Nikica Jelavic.
80:30 Goal scored
Goal! - Steven Naismith - Dunf'mline 0 - 4 Rangers Steven Naismith fires in a goal from close in to the bottom left corner of the goal. Dunfermline 0-4 Rangers.
David Graham fouled by Palazon Juanma Ortiz, the ref awards a free kick. The free kick is swung in right-footed by Paul Willis, Steven Whittaker makes a clearance.
Paul Willis crosses the ball in from the free kick, Dorin Goian manages to make a clearance.
Substitution Liam Buchanan on for Andrew Barrowman.
Paul Willis fouled by Sasa Papac, the ref awards a free kick.
Unfair challenge on Austin McCann by Palazon Juanma Ortiz results in a free kick. Austin McCann restarts play with the free kick.
The referee blows for offside against Nikica Jelavic. Paul Gallacher takes the indirect free kick.
Paul Burns gives away a free kick for an unfair challenge on Steven Naismith. Direct free kick taken by Steven Whittaker.
Substitution Gregg Wylde goes off and Alejandro Bedoya comes on.
Outswinging corner taken right-footed by Steven Davis, Headed effort from inside the area by Dorin Goian misses to the left of the goal.
Steven Whittaker has an effort at goal. Save by Paul Gallacher. Corner taken by Steven Davis.
Direct strike on goal from the free kick comes in from Nikica Jelavic, save made by Paul Gallacher. Outswinging corner taken left-footed by Gregg Wylde from the left by-line, Paul Burns manages to make a clearance.
Booking Alex Keddie is shown a yellow card for unsporting behaviour.
Free kick awarded for an unfair challenge on Gregg Wylde by Alex Keddie.
Nikica Jelavic is penalised for handball and concedes a free kick. Free kick taken by Paul Gallacher.
David Graham takes a shot. Save by Allan McGregor.
Steven Whittaker produces a left-footed shot from just outside the box that goes wide left of the goal.
Substitution Joe Cardle goes off and Paul Willis comes on.
Foul by Andrew Barrowman on Steven Davis, free kick awarded. Direct free kick taken by Dorin Goian.
Unfair challenge on Steven Naismith by Austin McCann results in a free kick. Direct free kick taken by Steven Whittaker.
Corner taken by Gregg Wylde played to the near post, Palazon Juanma Ortiz has a headed effort at goal from close in which goes wide of the left-hand upright.
Free kick awarded for a foul by Andrew Barrowman on Sasa Papac. Sasa Papac takes the free kick.
Substitution Andy Kirk replaces Ryan Thomson.
Maurice Edu concedes a free kick for a foul on Jason Thomson. The free kick is delivered right-footed by Joe Cardle from right wing, clearance made by Maurice Edu.
The assist for the goal came from Steven Davis.
50:31 Goal scored
Goal! - Steven Naismith - Dunf'mline 0 - 3 Rangers Steven Naismith gets on the score sheet with a goal from inside the box low into the middle of the goal. Dunfermline 0-3 Rangers.
Corner taken by Joe Cardle from the right by-line, clearance made by Nikica Jelavic.
The referee blows for offside. Paul Gallacher takes the free kick.
The offside flag is raised against Andrew Barrowman. Dorin Goian takes the free kick.
Corner taken by Steven Davis from the right by-line, Foul by Carlos Bocanegra on Andy Dowie, free kick awarded. Paul Gallacher takes the direct free kick.
The referee blows his whistle to start the second half.
Substitution Kyle Lafferty goes off and Palazon Juanma Ortiz comes on.
45:00 +1:55 Half time
Half Time The match has reached half-time.
Steven Naismith is penalised for handball and concedes a free kick. Paul Gallacher takes the free kick.
Gregg Wylde takes a shot. Paul Gallacher makes a save.
Headed effort from inside the box by Steven Davis misses to the right of the target.
Paul Burns takes a shot. Save made by Allan McGregor. Paul Burns takes a shot. Blocked by Dorin Goian. Outswinging corner taken right-footed by Joe Cardle played to the near post, clearance by Kyle Lafferty. Joe Cardle takes the outswinging corner, Header on goal by Alex Keddie from inside the box goes harmlessly over the target.
Gregg Wylde takes a shot. Andy Dowie gets a block in.
Free kick awarded for an unfair challenge on Steven Naismith by David Graham. Gregg Wylde crosses the ball in from the free kick, save made by Paul Gallacher.
Corner taken by Joe Cardle.
Corner taken by Gregg Wylde, free kick awarded for an unfair challenge on Alex Keddie by Nikica Jelavic. Paul Gallacher restarts play with the free kick.
Corner taken right-footed by Steven Davis from the right by-line, clearance by Alex Keddie.
Corner from the left by-line taken by Gregg Wylde, Headed effort from inside the penalty area by Nikica Jelavic misses to the right of the target.
Free kick awarded for a foul by Paul Burns on Steven Whittaker. Steven Whittaker restarts play with the free kick.
Free kick awarded for a foul by Kyle Lafferty on Austin McCann. Austin McCann takes the direct free kick.
Steven Naismith has a shot on goal from outside the area which misses left.
Outswinging corner taken by Steven Davis.
Assist on the goal came from Nikica Jelavic.
16:18 Goal scored
Goal! - Maurice Edu - Dunf'mline 0 - 2 Rangers Maurice Edu scores a goal from outside the box to the bottom left corner of the goal. Dunfermline 0-2 Rangers.
Ryan Thomson is ruled offside. Indirect free kick taken by Allan McGregor.
Unfair challenge on David Graham by Steven Whittaker results in a free kick. Austin McCann takes the free kick.
Steven Naismith takes a shot. Paul Gallacher makes a save.
Steven Davis provided the assist for the goal.
8:19 Goal scored
Goal! - Carlos Bocanegra - Dunf'mline 0 - 1 Rangers Carlos Bocanegra grabs a headed goal from inside the penalty area. Dunfermline 0-1 Rangers.
Free kick awarded for a foul by Alex Keddie on Kyle Lafferty. Headed cross/shot by Steven Naismith, save by Paul Gallacher. Corner taken right-footed by Steven Davis from the right by-line,
Nikica Jelavic challenges Alex Keddie unfairly and gives away a free kick. Alex Keddie restarts play with the free kick.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.