Differentiating Absolute Values

How do we differentiate $\displaystyle f(x,y)=|xy|$? I know that the derivative of $\displaystyle xy$ itself is $\displaystyle x+y$, and the derivative with respect to x and y are respectively $\displaystyle f_x=y$ and $\displaystyle f_y=x$. But I don't understand how to find the derivatives with the absolute value signs. Can anyone show me?

Consider a separate function

To make myself clearer I am going to consider the function $\displaystyle f(x) = |x|$. This function can be rewritten as:

$\displaystyle f(x) = \left\{ \begin{matrix}

x & \mbox{ if } 0 \leq x \\

-x & \mbox{ if } 0 > x \

\end{matrix} \right.$

So the derivative is:

$\displaystyle f'(x) = \left\{ \begin{matrix}

1 & \mbox{ if } 0 < x \\

-1 & \mbox{ if } 0 > x \

\end{matrix} \right.$

It can be shown that in x = 0 the derivative does not exist. Apply this idea to your function.

Apply the definition of derivative to different parts of the function

Suppose x > 0 then just apply the definition:

$\displaystyle

\lim_{h \to 0} \frac{f(x+h) - f(x)}{h}=

\lim_{h \to 0} \frac{x+h - x}{h} =

\lim_{h \to 0} \frac{h}{h}=

\lim_{h \to 0} 1 =

1

$

Suppose x < 0 then:

$\displaystyle

\lim_{h \to 0} \frac{f(x+h) - f(x)}{h}=

\lim_{h \to 0} \frac{-x-h + x}{h} =

\lim_{h \to 0} \frac{-h}{h}=

\lim_{h \to 0} -1 =

-1

$

Now if x = 0

$\displaystyle

\lim_{h \to 0^{+}} \frac{f(x+h) - f(x)}{h}=

\lim_{h \to 0^{+}} \frac{h}{h}=

\lim_{h \to 0^{+}} 1 =

1

$

and:

$\displaystyle

\lim_{h \to 0^{-}} \frac{f(x+h) - f(x)}{h}=

\lim_{h \to 0^{-}} \frac{-h}{h}=

\lim_{h \to 0^{-}} -1 =

-1

$

thus the derivative on zero does not exist.

$\displaystyle f'(x) = \frac{x}{|x|}$, provided x is not zero, is just a compact way of writing the derivative, but is still the same function as:

$\displaystyle f'(x) = \left\{ \begin{matrix}

1 & \mbox{ if } 0 < x \\

-1 & \mbox{ if } 0 > x \

\end{matrix} \right.$

Maybe what you wanted to know is if you can obtain the derivative in the form x/|x| by consdering any x, I do not know if this is possible, but in any case I don't think it is that important, because you still obtain the same result. I hope this was the answer you were looking for, if not do tell me.