Battery or starter. If you use a boost pack/ jumper cables does it smooth out the start? does the battery read normal volts/ amps?
Warranty is the best because the starter is hiding under the intake manifold (n52) but if you have to change it the cheapest route is to remove it and have it refurbished.
2006 330i E90 N52 - Coded