Implicit differentiation with product rule