Differentiate an equation I'm learning about implicit differentiation and i'm stuck at understanding the concept of "differentiating an equation".
If I define $ f(x) = x^2$ and $g_1(y) = 9$ and $g_2(y) = 9 + y^2$
Then I define 2 equations:
$(1)$ $f(x) = g_1(y)$ (i.e. $x^2 = 9$)
Then I can't differentiate both side of this equation with respect to x (ortherwise I will get: $2x = 0$)
$(2)$ $f(x) = g_2(y)$ (i.e. $x^2 = 9 + y^2$)
Then I can differentiate both side of this equation with respect to $x$ to get: $ 2.x = 2.y.\frac{dy}{dx}$
Could you please explain me the difference between the 2 cases ? And in general, in which condition could I differentiate both side of an equation concerning more than 1 variable ?
Thank you very much for your help!

A few notes: you are taking derivatives.  I think the more fundamental operator is the differential (which gets confusing because taking a derivative is referred to as "differentiating").  The differential is like a derivative, but not with respect to any variable.  So, for instance the derivative of $x^2$ is $2x$ but the differential is $2x\,dx$.  The derivative of $xy$ depends on which variable the derivative is being taken with respect to, but the differential is just $x\,dy + y\,dx$.
Derivatives are more likely to lead to contradictions.  For instance, take the equation $x = 1$.  The derivative of this with respect to $x$ is $1 = 0$.  However, the differential is $dx = 0$, which is true: the value of $x$ is not changing.  The reason for the contradiction of the derivative is that the derivative with respect to $x$ is just the differential divided by $dx$.  Since $dx = 0$, dividing both sides by $0$ leads to an invalid $\frac{0}{0}$.
So, going back to your problem, when you had $x^2 = 9$, the differential gives you a better picture. $2x\,dx = 0$.  Why?  Because at $x^2 = 9$, $x$ is not moving, so the differential is zero.  If you try to divide by $dx$, you will wind up with an invalid $\frac{0}{0}$.
So, in your second case, differentiating gives you: $2x\,dx = 2y\,dy$.  You can then solve for the derivative by algebraic manipulations.
So, in both cases, finding the differential works.  In the first case, finding the derivative doesn't work because you wind up with a $\frac{0}{0}$ when you try.
