What about the battery, battery cables, and battery terminals? Are they clean and tight? Does the battery hold a charge?
Are the grounds around the radiator core support clean and tight?
Is the alternator putting out the correct voltage without excessive AC ripple (bad diode)?
There's no excuse to cut corners here as most every auto parts stores will test batteries and alternators for free.
Bottom line: Today's cars simply will not run right without a strong battery and charging system.
Just in case you don't believe that your problem could be something as simple as a bad battery. Remember that it's NORMAL for the idle to be rough after a battery disconnect. This continues until the PCM re-learns new IAC/idle trim values. IF the power is interrupted to the PCM, this starts the re-learning process all over again (think Ground Hog Day). Without a stable power supply, the PCM never completes the learning process.