Differentiate implicit equations (#531)