rough engine idle is usually caused buy a imbalance of power between cylinders or cylinders not firing correctly, in order for a engine too run correctly it needs several things
1 fuel too burn
2 a correct air fuel mixture ideally stoichiometric 14.7/1
3 something too ignite the air fuel mixture like a spark
4 proper compression and relatively equally balanced compression between each cylinder.
first check spark, you can usually get a spark tester, make sure there is good spark too each cylinder, if you are getting spark check the condition of your spark plugs, since you have already replaced your spark plugs your spark plug condition should be ok, but are they gapped correctly? also make sure the ignition coils are in good condition, they are what makes the high amperage low voltage current, into low amp high voltage current for your spark plugs too work correctly, sometimes they wear out and dont produce enough spark, sometimes you may experience voltage leaks where spark is traveling somewhere ells besides the spark plug gaps… this can be caused buy bad wires or poor connections, also check for corrision too any connections, clean the corrosion up and apply die electric grease, be carful beacuse ignition systems create very high voltages, and they hurt!
check fuel pressure, if fuel pressure is low this means your engine is being starved of fuel and is not running correctly, low fuel pressure is commonly caused buy bad fuel pump, or clogged fuel filter, or even a fuel leak, in some cases bad fuel regulators can cause odd things with fuel systems, most modern sequencial fuel injection systems are between 40-60PSI but check with manufacturer specs to be sure.
check compression too each of the cylinders, compression should be roughly within specification, and each cylinder should be within 20% of each other, if one cylinder is over 20% difference in compression between cylinders there may be a compression issue, and if there is a major difference in compression with a wet test it may be caused buy warn out piston rings, if two cylinders neighboring are low in compression like cylinders 2-3 or 1-2 or 3-4 are low in compression you may have head gasket issues, low compression can also be caused buy warped valves, HOWEVER this is caused typically after engines reach high mileages 49,000 miles i don’t think you should be having compression issues unless at some time you seariously overheated your engine, this leads too blown head gaskets, takes the tension out of piston rings… screws up bearings… which causes all sorts of rough engine run.
also check throttle position sensor, MAP sensor if applicable, and O-2 sensor data, Eric has a video on 0-2 sensor scan tool checking and all that, 0-2 sensors are largely responsible for correct air fuel mixture