Elemental analysis of lithium ion batteries