second derivative implicit differentiation