function [dy] = TM_method_ODE(L,mu,grad,X,Y,hess,t,y)





rho=1-sqrt(1/(L/mu));
alpha=(1+rho)/L;
beta=rho^2/(2-rho);
gamma=rho^2/((1+rho)*(2-rho));
delta=rho^2/(1-rho^2);

M = ((1-beta)/(sqrt(alpha)*(1+beta)))^2;

    dy(1) = y(2);
    dy(2) = -2*sqrt(M)*y(2)-gamma*(1+sqrt(M*alpha))*sqrt(alpha)*hess(y(1),X(:,1),Y)*y(2)-(1+sqrt(M*alpha))*grad(y(1),X(:,1),Y);

    dy=dy';


end