Case studies in electromagnetism