Add damp newton method

Add the function about damp newton method and modify the gradient
function