Design optimization via finite elements: an elementary account