Hello, could anyone help with this excersise of Harmonic Motion?

I have to show that a block of mass "m" that is attached at the top of a frictionless inclined plane using a string of "k" constant , performs simple harmonic motion...
Well doing the the addition of forces that moves the block, I have found that:
mgsen(thetha)-Kx=ma
Then:
gsen(thetha)-(k/m)x=a
And that's all what I have done, I know that aceleration is the second derivative of x, but what happens to "gsen (thetha)" ...
Or is there another way of solve the problem?

1 answer

g sin theta = constant = your gravitational acceleration for this problem, all it ourg

m a = -kx + m ourg = m d^2x/dt^2

x = Xi + xh sin 2 pi t/T

Xi is our equilibrium x when a = 0
Xi = m ourg/k

now if harmonic then
xh is our harmonic motion x
do it separate as added to Xi

x = xh sin 2 pi t/T
dx/dt = xh(2pi/T) cos 2 pi t/T

d^2x/dt^2 =
-xh(2pi/t)^2 sin 2 pi t/T

so as usual
d^2xh/dt^2 = -(2 pi/T)^2 xh

now do F = m a
-k xh = ma = m (-2 pi /T)^2 xh
sqrt(k/m) = 2 pi/T

T = 2 pi sqrt (m/k)
or
=1/T = (1/2pi) sqrt(k/m)
as usual :)