ok heres the situation. my m3 would start up but sometimes feels like it has low power when i turn the key, but 2 days ago it would just crank and not start. i would crank it until the battery dies, i jump start it and it would fire up right away and i can drive it. when i accelerate it makes a whinning noise until i shift and whines again when i press the gas. after driving it and letting it sit for at least 30 min it will crank and not start again. is there a problem with the alternator or battery? any ideas what the problem would be? i just recently had the heater core replaced, would something have happend after that? any info would help me out, let me know you thoughts.

thanks,
jays36