There are many threads on this subject.
Leaving aside the obvious question which is:
Why did it break?
In the immortal words of the proverbial Yank: "If it ain't broke, don't fix it."
It is now broke.
General consensus is that the best way to get them out is to take a stick welder, and strike the rod onto the end of the broken stud. Keep it "stuck" to the broken stud till the stud gets really hot. (Tip starting to glow) Just a few seconds.Turn off and remains of stud will unscrew easily. Welding a nut onto the broken stud with a MiG wleder will make the now loosened stud easier to remove. If you should go down this path, the location of the earth connection of the welder(s) is critical. It must go directly onto the engine, and preferably onto the cylinder head concerned. This is to avoid circulating currents which could damage bike electrics.
Alteratively, you could go to your local BMW dealer, who will suck air through his teeth and tell you the only possible course of action is to fit a new cylinder head.
Myke