Yeah, in the trunk. I'm pretty sure it's on the right side if you are facing the trunk.
There are two screws that are attached to the battery (one positive (red), and one negative (black).....carefully unscrew them and take the battery out. It's heavy, so lift with caution.
Replace battery, (preferably a BMW battery
) and do the opposite to re-install the battery.