function dx = harmonicoscillator(t,x)
alpha = 1;  % half friction  
omega = 1;    % proper frequency  
dx = zeros(2,1); 
dx(1) = x(2);
dx(2) = -2*alpha*x(2)-(omega^2)*sin(x(1)); 
end

