The Mathematics of Applied Electricity