# Differentiating both sides of an equation

I'm going through the MIT lecture on implicit differentiation, and the first two steps are shown below, taking the derivative of both sides:

$$x^2 + y^2 = 1$$ $$\frac{d}{dx} x^2 + \frac{d}{dx} y^2 = \frac{d}{dx} 1$$ $$2x + \frac{d}{dx}y^2 = 0$$

$$x = 5$$ $$\frac{d}{dx} x = \frac{d}{dx} 5$$ $$1 = 0$$

Why is the first example correct, while the second is obviously wrong?

-
What is the function $y$ defined implicitly by $x = 5$? –  Willie Wong May 31 '13 at 16:28
Christian what do you mean? –  Jon Jun 1 '13 at 3:06

The first of your identities makes some implicit assumptions: it should be read as $$x^2+f(x)^2=1$$ where $f$ is some (as yet undetermined) function. If we assume $f$ to be differentiable, then we can differentiate both sides: $$2x+2f(x)f'(x)=0$$ because the assumption is that the function $g$ defined by $g(x)=x^2+f(x)^2$ is constant.

From this we can derive $$f'(x)=-\frac{x}{f(x)}$$ at least in the points where $f(x)\ne0$, which excludes $x=1$ and $x=-1$ from the domain where $f$ is differentiable.

Thus what you get is that assuming $f$ exists and is differentiable, then, for $x\ne1$ and $x\ne 1$, $f'$ satisfies the above relation.

Why is the relation written in that way? The answer is that often we're given a locus defined by some equation in two variables: it's the set of points $(x,y)$ such that $h(x,y)=0$ and we try finding an explicit form for the locus, that is a relation $y=f(x)$ or $x=g(y)$ , so that $$h(x,f(x))=0\qquad\text{ or }\qquad h(g(y),y)=0$$ holds for $x$ in a suitable neighborhood of $x_0$ or $y$ in a suitable neighborhood of $y_0$ where $(x_0,y_0)$ belongs to the locus.

Take for example the folium Cartesii, $x^3+y^3-3xy=0$. If we differentiate with respect to $x$, we get $$3x^2+3y^2y'-3y-3xy'=0$$ which gives $$y'=\frac{y-x^2}{y^2-x}$$ We're able to find where the derivative is zero by setting $y=x^2$ and plugging in the original equation $$x^3+x^6-3x^3=0$$ that is $x=0$ (which can't be used) or $x^3=2$, without even knowing the “explicit form“ $y=f(x)$.

-

$x=5$ implies that $x$ doesn't change so it's meaningless to try to take the derivative of it with respect to $x$

-

You wrote "$x = 5$"; what does that tell us about $x$? Just that, $x$ equals 5. So in differentiating both sides you must keep that in mind. In other words, $x$ is constant and 5 is constant.

Also, then you can't do

$${d \over dx} x = {d \over dx} 5, \tag{1}$$

since that's equivalent to

$${d \over d5} x = {d \over d5} 5, \tag{2}$$

which already has been pointed out is meaningless.

Though you can do

$${d \over dy} x = {d \over dy} 5 \Leftrightarrow 0 =0;\tag{3}$$

here $y$ is an independent variable over the real numbers.

-