The battery in the 2005 BMW 3 series is located in the trunk. To access the battery, open the trunk and remove the floor mat. The battery is located on the right side of the trunk, behind a plastic cover.
[Image of the battery location in a 2005 BMW 3 series]