# 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

• IMO, it is possible to solve for $y$ in terms of $x$. All you need to do is perform two substitutions, and recognize a hypergeometric function, though I highly recommend against this. – Simply Beautiful Art Mar 1 '17 at 20:18
• @SimplyBeautifulArt But that's sort of sidestepping the point of this question. In general, the set of points $(x,y)$ that solve an equation $f(x,y) = 0$ need not be a graph of a function. For example, $x^2+y^2 = 1$ is the unit circle, which, since it doesn't pass the vertical line test, can not be written in the form $y = f(x)$. – Joshua Ruiter Mar 1 '17 at 20:20
• @JoshuaRuiter Of course, hence, it was a comment. – Simply Beautiful Art Mar 1 '17 at 20:21
• this is such a great question. You are asking about one of the most important theorems in real analysis, the implicit function theorem, and one of the more difficult ones in my opinion. kudos – operatorerror Mar 1 '17 at 20:22
• @JoshuaRuiter Of course, we can always split into n functions given $n$ values $f(x_n)$, which in the case of the circle amounts to taking $y = \pm \sqrt{x^2-r^2}$ – Brevan Ellefsen Mar 1 '17 at 20:33

## 6 Answers

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:

1. 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$.
2. 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.
3. 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.)

• To the second to last paragraph, I have the Lagrange inversion theorem just for you, though I'm not sure if $y$ is analytic or not. – Simply Beautiful Art Mar 1 '17 at 20:56
• @mweiss: Very nice presentation! (+1) – Markus Scheuer Mar 2 '17 at 7:02

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.

• The weird thing, by the virtue of the Implicit Function Theorem, $y = f(x)$ is defined as different functions at different $(a,b)$ of the solution set, $f(a,b)=0$. But overall, any solution treating $y = f(x)$ is true given $\dfrac {\partial f}{\partial y} \neq 0$. – Ufuk Can Bicici Mar 2 '17 at 6:21
• I found this confusing: "The theorem says, roughly, this. Suppose that (x,y)=(a,b)(x,y)=(a,b) lies in the solution set, and suppose furthermore that the partial derivative ∂F∂y∂F∂y of the left hand side is nonzero at (a,b)(a,b). Then there exists an open ball B⊂ℝ2B⊂R2 of some positive radius ϵ>0ϵ>0 centered on the point (a,b)(a,b), such that the intersection of the solution set with the ball BB is, indeed, the graph of a differentiable function y=f(x)y=f(x)," – Jwan622 Feb 2 '18 at 15:17

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.

• this works for practical examples, though I could definitely come up with some pedagogical examples where your approach would yield... infinitely splits if I wanted. Just imagine a snake-like function that weaves back and forth going upwards forever. (There are of course infinitely places where the derivative doesn't exist) – Brevan Ellefsen Mar 1 '17 at 20:37
• @BrevanEllefsen What do you mean? Isn't each "ladder" isolateable as its own little function? – Simply Beautiful Art Mar 1 '17 at 20:41

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.

• You are of course sweeping under the rug the common way to write implicit differentiation, namely $\frac{-F_x}{F_y}$ and this brings in partial derivatives, which might confuse a student just learning implicit differentiation. That being said, I generally teach this way along with doing implicit differentiation the long way, because I don't think the basics of partial differentiation are that hard to grasp. – Brevan Ellefsen Mar 2 '17 at 14:16
• I would also take care in treating differentials this way when using partial derivatives such as in your answer.... I have seen many students try to naively play around with differentials in the multivariable chain rule and derive $2=1$ – Brevan Ellefsen Mar 2 '17 at 14:18
• @Brevan: Differentials aren't the problem -- it's the partial derivatives that are the problem: in particular, that they interact very poorly with substitutions and restrictions and other sorts of algebraic manipulation. I very emphatically avoided their use in the post! – user14972 Mar 2 '17 at 16:19
• true, but like I said, you really just swept the partial derivatives under the rug by writing $5x^4+20x^3y^2+3y^3$ instead of $F_x$. You are still implicitly using partial derivatives already. I'm not complaining about the way you wrote this, and I think that differentials can show some beautiful geometric symmetries, but I often find that beginners to the subject often fail to understand the nuances between $dx$ and $\partial x$ – Brevan Ellefsen Mar 2 '17 at 17:01
• @Brevan: Actually, I computed via the usual algebraic differentiation rules in differential form (e.g. $\mathrm{d}(uv) = u \mathrm{d}v + v \mathrm{d}u$); no partial differentiation was used as an intermediary! In fact, these days I tend to compute partial derivatives by first taking a differential and then setting the differentials of fixed variables to zero. I have added a disclaimer to the end that one shouldn't try these calculations with partial derivatives; while this was implicitly meant by my paragraph explaining why I use differentials, I agree it's probably worth explicit mention. – user14972 Mar 2 '17 at 17:19

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.

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.