Is it the Fuel Injector or something else?

I have a 2003 Mazda 6 and today it started exhibiting a weird symptom. I had driven for 10 minutes and was stopped at a light when I noticed it rocking forward and back. It would pulse a couple of times, then pause, then the same thing. It seemed to do it less when in neutral and not at all in park. Later on, the same thing happened after driving home. Listening to the engine, you could here it revving up then down slightly (like the sound on Cartalk website Noises under “car revving”). It did it kind of rhythmically. Watching the idle gauge, it didn’t seem to waver much as the engine made that sound. Watching the headlights, they would dim some in time with the revving of the engine. I had my husband test it about 20 minutes later when he got home. This time, the engine revved from normal to low and then completely stopped. It has been starting fine, has a new battery in it, but now is completely paid for. What is it and do I have to get it fixed right away? Will it strand me on the highway if I don’t fix it?

Is the Check Engine Light ‘ON’? If it is, have the code(s) read, that will steer the mechanic to the system that needs attention.

So far you have not described an inability to restart nor a driveability problem at speed. It sounds like the problem remains a steady idle concern so it might be the throttle body needs a cleaning or the Idle Air Control valve needs to be looked at. Also look at all vacuum hoses to be sure they remain attached and are not split. From what you describe it would be unlikely that the car will fail catastrophically and leave you stranded.

Hope that helps