function xdot = forced_pendulum(x, t)
  k = x(3); beta = x(4); f = 10;
  xdot(1) = x(2);
  xdot(2) = -k * sin(x(1)) - beta * x(2) - f * sin(t);
  xdot(3) = 0;			# k
  xdot(4) = 0;			# beta
endfunction
