Text this: Functional analysis, calculus of variations and optimal