finding stationary points implicit differentiation