Formal variational calculus in the algebra of smooth cylindrical functions