Battery troubles on 2001 BMW 325i

My battery died last week when it was really cold. I charged it up and 5 days later it died again. How do I tell if it is the alternator or ecu?

Asked by for the 2001 BMW 325i
Got to have it tested! Take it to a repair shop for this.
1 more answer , 1 more comment
have battery tested 1st,if alt bad i believe it wuld have died sooner
Well, I went to local parts store and I didn't know they could test alt with the alt still in. Alt is good battery is bad. Also didn't mention the heat went out after I jumped the battery. That's why I thought it was the alt.