in bimmers, rough idle at start-up usually points to bad gas or sticky injectors.
Get some injector cleaner, put it in your tank when u fill up next time. Injector will clean as you drive.
OR, use chevron gas, mid-grade or better. It already contains the additive to keep your injectors clean.