derivative(cos(theta)*V*(sqrt(V^2*sin^2(theta)+2*G*H)-V*sin(theta))/g)=0