implicit differentiation

automatic differentiation of implicit functions