A Hypothetical Spring-Mass System

Problem: A mass is attached to a spring, displaced, and released. All of the motion takes place on a horizontal frictionless surface.  The period of the motion is 1.5 seconds. The amplitude of the motion 8.3 cm. Find the speed of the mass when its displacement is one-half the maximum displacement.

Solution: From the period we can get the m/k ratio:

Using two points during the motion - the maximum displacement (where v = 0) and one-half the maximum displacement - I use conservation of energy (which Serway calls the work-energy theorem):

Why is this problem impossible if the oscillation is vertical?  (Hint: work the problem including gravitational potential energy to see why.)