The 5th generation BMW 5 Series was produced from 2003 to 2010. For these models, BMW introduced a controversial new design, the iDrive control system, and active steering.
If it starts okay when you jumpstart it but once you remove the booster cables and it dies, check your alternator. Keep the booster cables on and see if it runs longer (not sure if you use another vehicle or a separate booster station to jump-start your BMW