Q: How did the mathematician solve his constipation problem

A: He worked it out with a pencil.