Stephen H. answered 01/02/21
Tutor of Math, Physics and Engineering ... available online
The sum of forces on the mass = ma=-ky-mg where m= mass =1, a=acceleration=y'', y=position with up +, g = 9.81 m/s2. First use the transform of the force equation and simplify to find y(s)= (sy(s)+y'(0)-g/s)/(s2+k/m). Use partial fractions to get y(s)=(1-g/9)s/(s2+9) +y'(0)/(s2+9) -g/9/(s2+9). Then find the inverse transform