Zaslat SMS: Calculus of variations