function dzdt = EX_4_NLode_2025(t,z,M,m,k,c1,c2,L,g,AF,AT,w)
% computes the derivative of the states z
if w~=0
    F = AF*sin(w*t);
else
    F = AF;
end
T = AT;
% z = [x; theta; dxdt; dthetadz]

dzdt(1,1) = z(3);
dzdt(2,1) = z(4);
dzdt(3,1) = (-1).*g+L.^(-1).*(m+2.*M+m.*cos(2.*z(2))).^(-1).*((-2).*L.*((-1).*F+ ...
  k.*z(1)+c1.*z(3)+L.*m.*z(4).^2.*cos(z(2)))+2.*((-1).*T+c2.*z(4)).*sin(z(2))); ...
dzdt(4,1) = L.^(-2).*m.^(-1).*(m+2.*M+m.*cos(2.*z(2))).^(-1).*((-2).*(m+M).*(( ...
  -1).*T+c2.*z(4))+2.*L.*m.*((-1).*F+k.*z(1)+c1.*z(3)+L.*m.*z(4).^2.*cos( ...
  z(2))).*sin(z(2)));
end

