Integrate A-B*(d^2y/dt^2*cos(y) - (dy/dt)^2*sin(y)) with respect to t