The paper addresses the problem of battery lifetime maximization for a job sequence executing on a processor with discrete voltage/ frequency states under a deadline constraint. We consider a nonlinear electrochemical discharging model of the battery, and present a pseudo-polynomial time optimal algorithm and a fully polynomial time approximation algorithm as solutions. This is the first work that proposes both optimal and approximation algorithms for battery aware energy management based on voltage/frequency scaling techniques. Our experimental results show that the approximation algorithms widely outperform an existing technique. Further, for a number of realistic and synthetic benchmarks, the qualities of the solutions produced by our approximation techniques are much better than the required quality bounds imposed by the designer.