Stav dette: Calculus of variations with applications