I have a 2014 Toyota Corolla with 36k miles and last year it had a bit of rough idle. It only happened right after engine start up and it would only last for about 3 seconds. Engine is at around ~1000 rpm and then it will be rough when it goes down to ~700 rpm but after 3 seconds it will go back to ~1000 rpm and be smooth again.

I didn’t pay that much attention to it and after some basic maintenance/oil change recently the problem went away.

I also changed the brand of fuel I use for that car a few months before the oil change. The old brand of fuel has been used on that car for 5+ years and I thought it was okay.

How do I know if the problem was fixed by the oil change or the new brand of fuel? Was that rough idle the effect of bad gas?