Since it's implicit, you don't need to get rid of both variables. You're differentiating two different things at the same time, or at least that's what I thought it was. You could probably do some voodoo with the original equation, but why bother? x.x;