Αποστολή με SMS: Functional Analysis, Calculus of Variations and Optimal Control