function y = x2dot(x)
g=10; % gravitasi [m/sec2]
l=0.5; % panjang pendulum [m]
M=0.25; % Massa Kereta [kg]
m=0.05; % massa bob pendulum [kg]
F=x(1); % gaya dorong pada kereta [Newton]
x3=x(2); % sudut pendulum [radian]
x4=x(3); % kecepatan sudut pendulum [rad/sec]
y = (F - (0.5*m*g*sin(2*x3))+ (m*l*(x4^2)*sin(x3)))/(M + (m*(sin(x3))^2));