# How do I obtain the derivative of $\frac{x^2}{x-y}$?

$d=\frac{x^2}{x-y}$ and im trying to find d'.

do i take it as $x^2(x-y)^{-1}$ ? That seems to give me the wrong answer.

If i take it like that, i get $2x(x-y)^{-1} + x^2(-1)(x-y)^{-2}$.

is this correct?

with respect to $x$

-
Derivative with respect to what? –  Javier Badia Mar 8 '13 at 1:19
You want to find the derivative of $$\frac{x^2}{x-y}$$ with respect to $x$? –  Pedro Tamaroff Mar 8 '13 at 1:19
yes sorry with respect to x –  user65678 Mar 8 '13 at 1:20
Is $y$ a different variable? A function of $x$? –  Andres Caicedo Mar 8 '13 at 1:23
Yes, what you got is correct. –  Berci Mar 8 '13 at 1:29

If we have $f(x,y)=\frac{x^2}{x-y}$ and we are only differentiating with respect to $x$ we can use either the product rule, or the quotient rule. I prefer the product rule though. So here's what we do :
$$\frac{\partial f(x,y)}{\partial x}= \frac{\partial (x^2(x-y)^{-1})}{\partial x}= 2x(x-y)^{-1}+x^2(-1)(x-y)^{-2}$$
@Calc1DropOut I bet you meant $\frac {\partial f}{\partial x}$ :) –  Kaster Mar 8 '13 at 1:38