Zaslat SMS: The calculus of variations