So i have this newton optimation problem where i must found the value f'(x) and f”(x) where x = 2.5 and the f = 2 * sin(x) – ((x)**2/10) for calculating, but i tried using sympy and np.diff for the First and Second Derivative but no clue, cause it keep getting error so i go back using manual derivate, Any
Tag: derivative
JAX: Getting rid of zero-gradient
Is there a way how to modify this function (MyFunc) so that it gives the same result, but its derivative is not zero gradient? EDIT: Similar function which doesn’t give zero gradient – but it doesn’t return 30/20/10 Answer The gradient of your function is zero because this is the correct result for the gradient as your function is defined.