function I = internal_energy_simple_pendulum(theta)
% internal energy of simple pendulm
    global mass;
    global length;
    global grav;
    global tau;
    
    U = mass*grav*length*(1-cos(theta));
    W = tau*theta;
    I = U - W;
end
