Battery may be need to be replaced - I'd try a different one and see if the problem goes away. If not, then it's most likely software. You could try wiping cache, data, etc. out of existing apps, uninstalling anything you don't use on a regular basis, and/or moving apps to the sd card to help free up space. If it looks to be more software-related, the best thing you can do is a full factory reset but not everyone is comfortable with doing that