# Thread: Partial derivatives for the sign function

1. ## Partial derivatives for the sign function

Hi there. Well, I've got some doubts on the partial derivatives for the next function:

$\displaystyle f(x,y)=sg\{(y-x^2)(y-2x^2)\}$ Where sg is the sign function.

So, what I got is:

$\displaystyle f(x,y)=f(x)=\begin{Bmatrix}{ 1}&\mbox{ si }& (y-x^2)(y-2x^2)>0\\0 & \mbox{si}& (y-x^2)(y-2x^2)=0\\-1 & \mbox{si}& (y-x^2)(y-2x^2)<0\end{matrix}$

How should I get the partial derivatives? I'm sure that for the zero I must use the definition. But in the other cases should I?

Bye, and thanks.

2. Because $\displaystyle f(*,*)$ is a constant in the regions where is $\displaystyle (y-x^{2})\ (y-2\ x^{2}) >0$ or $\displaystyle (y-x^{2})\ (y-2\ x^{2}) < 0$ , here the partial derivatives are both equal to 0. Where is $\displaystyle (y-x^{2})\ (y-2\ x^{2}) = 0$ the partial derivatives don't exist...

Kind regards

$\displaystyle \chi$ $\displaystyle \sigma$

3. How did you solve it?

Is this the right way?

If $\displaystyle x=y=0$
$\displaystyle \displaystyle\frac{\partial f}{\partial x}=\displaystyle\lim_{x \to{0}}{\displaystyle\frac{f(x,0)-f(0,0}{x}}=\displaystyle\lim_{x \to{0}}{\displaystyle\frac{(0-x^2)(0-2x^2-0)}{x}}=\displaystyle\lim_{x \to{0}}{\displaystyle\frac{2x^4}{x}}=0$

If $\displaystyle y=x^2$, $\displaystyle (x,y)=(x_0,x_0^2)$

$\displaystyle \displaystyle\frac{\partial f}{\partial x}=\displaystyle\lim_{h \to{0}}{\displaystyle\frac{f(x_0+h,x_0^2)-f(x_0,x_0^2)}{h}}=\displaystyle\lim_{h \to{0}}{\displaystyle\frac{(x_0^2-(x_0+h)^2)(x_0^2-2(x_0+h)^2)-0}{h}}=\displaystyle\lim_{h \to{0}}{\displaystyle\frac{(x_0^2-x_0^2-2x_0h-h^2)(x_0^2-2x_0^2-4x_0h-h^2)}{h}}=$

$\displaystyle =\displaystyle\lim_{h \to{0}}{\displaystyle\frac{-h(2x_0-h)(x_0^2+4x_0h+h^2)}{h}}=\displaystyle\lim_{h \to{0}}{-(2x_0-h)(x_0^2+tx_0h+h^2)=-2x_0^3}$

If $\displaystyle (x,y)=(x_0,2x_0^2)$

$\displaystyle \displaystyle\frac{\partial f}{\partial x}=\displaystyle\lim_{h \to{0}}{\displaystyle\frac{f(x_0+h,2x_0^2)-f(x_0,2x_0^2)}{h}}=\displaystyle\lim_{h \to{0}}{\displaystyle\frac{(2x_0^2-(x_0+h)^2)(2x_0^2-2(x_0+h)^2)-0}{h}}=\displaystyle\lim_{h \to{0}}{\displaystyle\frac{(2x_0^2-x_0^2-2x_0h-h^2)(2x_0^2-2x_0^2-4x_0h-h^2)}{h}}=$

$\displaystyle =\displaystyle\lim_{h \to{0}}{\displaystyle\frac{(x_0^2-2x_0h-h^2)(-h(4x_0+h))}{h}}=\displaystyle\lim_{h \to{0}}{-(x_0^2-2x_0h-h^2)(4x_0+h)=-4x_0^2$

As $\displaystyle -4x_0^2\neq{-2x_0^3}$ the derivative doesn't exist at the point (0,0).

Is this right?

Thanks.