I am trying to do a simple optimization algorithm to find the min of a function. I was wondering about the way to find the derivative/ gradient. So lets discuss about the se