結果 : how to find gradient of a function in python