The parameterization method in optimal control problems and differential–algebraic equations