Computing revealed preferences and limits to the validity of quadratic objective functions for policy optimization