The rest position for the spring is .5; the minimum height is .1m and the maximum height is .9m
The period is given as 1.2 seconds. The start position is at the minimum.
The general form for a sinusoid is `y=acos(b(x-h))+k` . (Here we choose cosine since the function begins at a max or min -- you can choose to use sine with a phase shift if you want.)
a gives the amplitude (and if a<0 the graph is reflected over the horizontal axis),b yields the period (`b=(2pi)/p` ), h is the horizontal translation or phase shift and k is the midline.
Here the amplitude is .4m, and a=-.4. (Began at minimum.)
h=0 there is no phase shift.
Then h(.3)=.5, h(.7)=.846,h(2.2)=.3
We assume that the spring has the same displacement in both directions and that the oscillations are not dampened (e.g. from friction, air resistance, etc...).