Understanding Electricity and Batteries in Mathematics