Mathematical Modeling of Lithium Batteries