You really can't though. I had a phone with an awful battery-- it would shut off around 25% randomly. I brought it into Apple 3 times, it even had apple care-- and because the f*ing diagnostic suite identified the battery as good, they wouldn't replace it.
They wouldn't even LET ME PAY FOR THE REPAIR.