# Partial derivative with respect to $y$ of $(y/x)$?

I'm just starting partials and don't understand this at all. I'm told to hold $y$ "constant", so I treat $y$ like just some number and take the derivative of $\frac{1}{x}$, which I hope I'm correct in saying is $-\frac{1}{x^2}$, then multiply by $y$, getting $-\frac{y}{x^2}$.

But apparently the correct answer is $\frac{1}{x}$. What am I missing?

• @ZenLogic: No, that's the integral :) – psmears Mar 20 '15 at 10:14
• Taking the partial derivative with respect to $y$ means holding constant all other variables; here that means holding constant $x$, not $y$. – Marc van Leeuwen Mar 20 '15 at 11:12

When you take the derivative of $\frac{y}{x}$ with respect to $y$ you are computing $\frac{\partial }{\partial y} \frac{y}{x} = \frac{1}{x}$ because here you are holding $x$ constant. If you take the derivative of the same expression with respect to $x$ then you compute $\frac{\partial}{\partial x} \frac{y}{x} = - \frac{y}{x^2}$ and this is when you hold $y$ constant.

• Huh, I just had it backward I guess. Thanks. – SquarerootSquirrel Mar 20 '15 at 3:49
• @SquarerootSquirrel: I this answer was helpful to you, you might wish to accept it. – Marc van Leeuwen Mar 20 '15 at 11:16
• @අරුණ I'm shocked, your answer is better. I even up-voted yours :) – Mnifldz Mar 20 '15 at 14:02
• @Mnifldz Actually I also up voted yours ;) – ASB Mar 20 '15 at 14:27

By first principles,

$\dfrac{\partial}{\partial y}\left( \dfrac{y}{x}\right)=\lim\limits_{\delta y\to 0}\left( \dfrac{\dfrac{y+\delta y}{x}-\dfrac{y}{x}}{\delta y}\right)=\lim\limits_{\delta y\to 0}\dfrac{\delta y}{x\delta y}=\lim\limits_{\delta y\to 0}\dfrac{1}{x}=\dfrac{1}{x}$

• This answer is so nice as it shows every "fancy" statement comes from first principles. – Mahdi Mar 20 '15 at 5:22
• I don't think the confusion of OP came from the definition of the derivative of a function of one variable, so I think this answer just muddles things unnecessarily. – Marc van Leeuwen Mar 20 '15 at 11:15

"With respect to $y$" means that you will be holding $x$ constant, not $y$. $y$ is the variable we are differentiating with respect to, so it is /not/ to be treated as a constant!

There is nothing special about the symbol $x$. Unfortunately, there's a certain bias to calling $f$ the function and $x$ the variable, but really it should never1 matter how variables are labelled as long as it's done consistently.

So in particular, if you write $$f(x,y) = \tfrac{y}{x}$$ it means exactly the same thing as $$f(y,x) = \tfrac{x}{y}.$$ Note that $x$ and $y$ aren't actually part of the definition: this equation defines only $f$, and introduces two new “private” symbols, locally, to do that. I could also have written $$f(\mathscr{Y},\Xi) = \tfrac{\Xi}{\mathscr{Y}}.$$

Now, what you're doing is actually $$f'(x,y) \equiv \tfrac{\partial}{\partial y} f(x,y),$$ and that again is the same as $$f'(y,x) \equiv \partial_x f(y,x) = \partial_x \tfrac{x}{y}.$$ You certainly won't doubt that this is $\tfrac1y$... although again that statement is meaningless without context: really I should say that $f'(y,x) = \tfrac1y$, and therefore $f'(x,y) = \tfrac1x$.

1Alas, in many applications of maths this is widely neglected! In physics, two equations may be interpreted as something completely different depending on how the variables are labelled.

You're supposed to hold x constant.

have you looked at the graph? if you have a good enough plotting program (good enough to rotate 3D graphs), it should be easy to see that the surface is linear for all fixed x (and hyperbolic for all fixed y)

first pass:

http://www.wolframalpha.com/input/?i=plot+y%2Fx+for+x%3D-1..1%2C+y%3D-1..1