Improving the Lifetime of Lithium-Ion Batteries’ Life through Chemical Composition Analysis