function z=ydot(t,y)
global A
g=9.81;length=2.5;
z = zeros(2,1);
z(1) = y(2);
%part 4&5
%z(2) = -(g/length)*sin(y(1)) - 1*y(2) + 12*sin(t);
%part 6&7
z(2) = -((g/length)+ A*cos(2*pi*t))*sin(y(1)) - 0.1*y(2) ;