A question about differentiating equations that are impossible to solve for a variable I thought I had a good idea on why/how implicit differentiation works until I read the following passage in my Calculus book:

Furthermore, implicit differentiation works just as easily for equations such as
  $$x^5+5x^4y^2+3xy^3+y^5=1$$
  which are actually impossible to solve for $y$ in terms of $x$

My problem with it is the following:
The way we go about differentiating, for instance, $xy=1$ is by differentiating the whole equation through with respect to $x$ and treating $y$ as a function of $x$. But (and at least that's how I see it)  we can only treat $y$ as $f(x)$ because the equation determines $y$ as a function of $x$ in a relation that can ben written expliclity (in this case, $y=\frac{1}{x}$). If we have an equation such as the quoted one, in which we just can't solve for $y$, doesn't that mean that $y$ is not a function of $x$? In such a case, wouldn't treating it as such be an invalid move?
I hope I have made myself understood. Any clarification will be appreciated. Thanks
 A: At a basic level, I think this question is really about the difference between saying that something exists, on the one hand, and being able to write a formula for it on the other. It's important to distinguish between three different (but closely related) ideas:


*

*It may be that the relationship between $x$ and $y$ does not define $y$ as a function of $x$ because there is more than one $y$-value associated to a given $x$-value.  To take a simple example, the equation of a unit circle ($x^2+y^2=1$) does not define $y$ as a function of $x$.

*However, even if $y$ is not globally a function of $x$, it is nevertheless possible that locally (i.e. in the vicinity of some point) there may be a function of $x$ that "matches" the graph of the relationship, in a precise sense.  For example, the point $(0.6, -0.8)$ lies on the bottom half of the unit circle. and the function $f(x) = -\sqrt{1-x^2}$ is a local solution for $y$ in terms of $x$ that includes that point.  The Implicit Function Theorem provides conditions under which such a function exists.

*On the other hand, even when such a local function exists, it may be impossible to write down an explicit formula for it.  That, I think, is what your textbook means by "impossible to solve".  It's not that the function doesn't exist, but rather that there is no way to write down a formula for the function.


To elaborate on this last point, consider the implicitly defined relation
$$ y^3 + 2^y = \cos(2\pi x^2) + x   $$
This relationship implicitly defines $y$ as a function of $x$:  choose any specific value of $x$, say $x=2$.  Then the right-hand side of the equation is $\cos(2\pi\cdot4) + 2 = 3$.  The equation then asks us to find a value of $y$ such that $y^3 + 2^y = 3$.  Such a $y$ is guaranteed to exist, and is in fact unique, as you can convince yourself of by looking at the graph of the function $h(t) = t^3 + 2^t$ (it's strictly increasing because its derivative is always positive, and its range is $(-\infty ,\infty)$ .  And there's nothing special about the choice $x=2$ in this example; choose any value of $x$, and there is a unique $y$ value associated to that value of $x$ by the relation $ y^3 + 2^y = \cos(2\pi x^2) + x   $.  In fact you can see the graph of this implicitly-defined function below. 

But go ahead, try to find a formula for explicitly calculating $y$ in terms of $x$.  I'll wait.
(Okay, this is the point where someone jumps into the comments and says "Well, actually..." and goes on to explain that you can explicitly calculate $y$ in terms of $x$ by introducing a Lambert function or something.  Let me try to pre-empt that by arguing that such a"solution" just sweeps the implicitness under the rug.  In any case it misses the point of the example, which is that a relationship may implicitly define a function even if you lack an explicit formula for computing one variable in terms of the other.)
On the other hand, consider this closely-related example:
$$ y^2 + 2^y = \cos(2\pi x^2) + x   $$
(The only change is the exponent on the $y$ on the left-hand side.)  This relationship most definitely does not define $y$ as a function of $x$, as can be seen in the graph below:

We can see that for many values of $x$ there are two different $y$ values that both satisfy $ y^2 + 2^y = \cos(2\pi x^2) + x   $, so this is not a function.  Nevertheless if we choose a point on the graph — $(2,1)$ is a convenient one — and zoom in on a neighborhood of that point, it locally looks like a function:

The power of implicit differentiation as a technique is precisely that it allows us to find an explicit formula for the slope of the tangent line at $(x,y)$, even when we can't find an explicit formula for $y$ in terms of $x$, and even when the "function" isn't really a function at all.  (The trade-off is that the "explicit" formula for the slope is expressed in terms of both variables, so there is still some lurking implicitness in the problem.)
A: Your example is usable, though far overkill.  Let's look at a simpler case:
$$y^2=x$$
Upon differentiating, we end up with
$$\frac{dy}{dx}=\frac1{2y}$$
But... what if we solved for $y$ first?
$$y=\pm\sqrt x$$
Then differentiated?
$$\frac{dy}{dx}=\frac1{2(\pm\sqrt x)}=\frac1{2y}\color{green}\checkmark$$
So... what really did happen?  Well, the basic idea is this:
It is... sort of possible to solve for $y$.  Algebraically, this is not always the case, but if we take a look at a graph:

This is clearly not a function!  It fails to pass the vertical line test, so why can we treat it like a function?
Well, the answer is simple.  As it satisfies some basic properties, we can split the function into two cases here: a positive and a negative function.  Each, differentiable.
Now, let's look at your thing:

While not pretty, it can still be broken up into some semi-well behaved functions that are all differentiable.  While we cannot solve for these functions explicitly, they are functions, and differentiating them is not a major problem.
A: To take a different tack... let's forget for a moment that $x$ and $y$ are dependent. i.e. we can consider the function of two variables
$$ f(x,y) = x^5+5x^4y^2+3xy^3+y^5 $$
We can differentiate this no problem;
$$ \mathrm{d}f(x,y) = (5 x^4 + 20 x^3 y^2 + 3 y^3) \mathrm{d} x  + (10 x^4 y + 9 x y^2 + 5 y^4) \mathrm{d} y$$
I've written this in terms of differentials; in my opinion, when working algebraically, arguments and calculations in calculus become a lot simpler when formulated in these terms.
Anyways, the point is, this relationship still holds when we restrict to a subset of the plane, such as the curve defined by the equation $f(x,y) = 1$.
When we restrict to that curve, $f(x,y)$ and $1$ become the same function — and consequently have the same differential. That is, when we enforce this constraint, we get
$$ \mathrm{d}f(x,y) = \mathrm{d} 1$$
and consequently,
$$ (5 x^4 + 20 x^3 y^2 + 3 y^3) \mathrm{d} x  + (10 x^4 y + 9 x y^2 + 5 y^4) \mathrm{d} y = 0 $$
so that, when subject to this constraint, the ratio between the differentials is (when the two denominators are nonzero):
$$ \frac{\mathrm{d}y}{\mathrm{d}x} = - \frac{5 x^4 + 20 x^3 y^2 + 3 y^3}{10 x^4 y + 9 x y^2 + 5 y^4}$$

Notice that nowhere in the post above have I even considered treating $y$ as being a function of $x$. Often, it is simply not useful to think in those terms, despite the fact calculus is usually introduced that way.
Also, based on the comments, I should emphasize that you should not try this sort of calculation in terms of partial derivatives rather than in terms of differentials; partial derivatives simply don't work in this fashion.
A: That's an excellent question. 
Part of the conclusion of the Implicit Differentiation Theorem (perhaps better known as the Implicit Function Theorem) is that the equation locally defines $y$ as a function of $x$.
The theorem says, roughly, this. Suppose that $(x,y)=(a,b)$ lies in the solution set, and suppose furthermore that the partial derivative $\frac{\partial F}{\partial y}$ of the left hand side is nonzero at $(a,b)$. Then there exists an open ball $B \subset \mathbb{R}^2$ of some positive radius $\epsilon>0$ centered on the point $(a,b)$, such that the intersection of the solution set with the ball $B$ is, indeed, the graph of a differentiable function $y=f(x)$, and furthermore its derivative $\frac{dy}{dx}$ can be calculated using the method you learned in calculus.
Now you may ask: how do we find a formula for $y=f(x)$? 
There's not really an answer there. In general you cannot find the formula, although if you follow through the proof of the theorem then you can find numerical approximation methods. That's the real power of the Implicit Differentiation Theorem, proving the existence of a differentiable function without even being able to write down a formula for it.
A: A function is defined as soon as you specify a relation between the independent variable and the dependent one, such as
$$y=x^2+1,\\xy=4,\\x^2-y^5-y=0.$$
Tehcnically speaking, at most one $y$ must correspond to a given $x$, so the equation you gave doesn't define a function stricto sensu. But this can be circumvented by decomposing the curve in several branches.
Whether it is possible or not to evaluate $y$ in terms of $x$ is not so relevant. Even if there is no explicit formula, numerical computation remains possible. But the definition of a function des not require $y$ to be computable, just that it be unambiguously specified; if you know it, you can check that it fits the relation.
A: The way I see it, is that when differentiate a relation of $x$ and $y$ $$f(x,y)=0$$ in respect to $x$, $$\frac{\mathrm{d}f(x,y)}{\mathrm{d}x}=0$$ you find the derivative of $y$ in terms of $x$ and $y$. $$\frac{\mathrm{d}y}{\mathrm{d}x}=g(x,y)$$
If you think of this graphically, you are finding the gradient of the tangent to a point (x,y), which is exactly what $g$ represents. It doesn't even matter if the relation at hand gives many $y$ values for a particular $x$ value, since $g$ will consider these $y$ values as different inputs. In other words, $y$ does not need to be a function of $x$, but we can treat it as one when considering the derivative of a relation at distinct points $(x,y)$.

Disclaimer: I haven't actually learnt about implicit differentiation yet, and would appreciate confirmation to if what I've said is true.
