First, read your codes. You can do it yourself without any tools or even opening the hood.
http://www.pelicanparts.com/BMW/tech...de_Reading.htm My guess is that you have a vaccum leak. The main boot which runs from the airbox to the intake is notorious for cracking. You need to take it off to check for leaks. Takes 5 minutes, max.
You may have other leaks, too, but this one usually causes the worst problems.