# Thread: Partial derivatives

1. ## Partial derivatives

1. The problem statement, all variables and given/known data
Hi there. Well, I got the next function, and I'm trying to work with it. I wanted to know if this is right, I think it isn't, so I wanted your opinion on this which is always helpful.

$\displaystyle f(x,y)=\begin{Bmatrix} (x+y)^2\sin(\displaystyle\frac{\pi}{x+y}) & \mbox{ si }& y\neq-x\\0 & \mbox{si}& y=-x\end{matrix}$

If $\displaystyle y\neq-x$:
$\displaystyle \displaystyle\frac{\partial f}{\partial x}=2(x+y)\sin(\displaystyle\frac{\pi}{x+y})-\pi\cos(\displaystyle\frac{\pi}{(x+y)})$

$\displaystyle \displaystyle\frac{\partial f}{\partial y}=2(x+y)\sin(\displaystyle\frac{\pi}{x+y})-\pi\cos(\displaystyle\frac{\pi}{(x+y)})$

Second case:

If $\displaystyle y=-x$
$\displaystyle f(x,y)=0$

$\displaystyle \displaystyle\frac{\partial f}{\partial y}=\displaystyle\frac{\partial f}{\partial x}=0$

Is this right? I would like to know why it isn't, I think its not. Should I think when I consider the second case as I would go in all directions or something like that? cause in other cases where I got defined different functions for a particular point I've used the definition, but in this case I got trajectories. What should I do?

Bye and thanks.

2. Originally Posted by Ulysses
1. The problem statement, all variables and given/known data
Hi there. Well, I got the next function, and I'm trying to work with it. I wanted to know if this is right, I think it isn't, so I wanted your opinion on this which is always helpful.

$\displaystyle f(x,y)=\begin{Bmatrix} (x+y)^2\sin(\displaystyle\frac{\pi}{x+y}) & \mbox{ si }& y\neq-x\\0 & \mbox{si}& y=-x\end{matrix}$

If $\displaystyle y\neq-x$:
$\displaystyle \displaystyle\frac{\partial f}{\partial x}=2(x+y)\sin(\displaystyle\frac{\pi}{x+y})-\pi\cos(\displaystyle\frac{\pi}{(x+y)})$

$\displaystyle \displaystyle\frac{\partial f}{\partial y}=2(x+y)\sin(\displaystyle\frac{\pi}{x+y})-\pi\cos(\displaystyle\frac{\pi}{(x+y)})$
This is correct.

Second case:

If $\displaystyle y=-x$
$\displaystyle f(x,y)=0$

$\displaystyle \displaystyle\frac{\partial f}{\partial y}=\displaystyle\frac{\partial f}{\partial x}=0$
Actually, it IS correct but do you understand why? You cannot just say the partial derivatives are 0 because the value of the function is 0. In order to calculate $\displaystyle \frac{\partial f(x,y)}{\partial x}$ or $\displaystyle \frac{\partial f(x,y)}{\partial y}$, you have to vary x while holding y constant and vice-versa. You cannot have "y= -x" for every such point.

You need to use
$\displaystyle \frac{\partial f(x_0, -x_0)}{\partial x}= \lim_{h\to 0}\frac{(x_0+ h- x_0)^2 sin(\pi/(x_0+h-x_0)- 0}{h}$$\displaystyle = \lim_{h\to 0}\frac{h^2 sin(\pi/h)}{h}= 0 and \displaystyle \frac{\partial f(x_0, -x_0)}{\partial y}= \lim_{h\to 0}\frac{(x_0- x_0+ h)^2 sin(\pi/(x_0-x_0+h)- 0}{h}$$\displaystyle = \lim_{h\to 0}\frac{h^2 sin(\pi/h)}{h}= 0$

Is this right? I would like to know why it isn't, I think its not. Should I think when I consider the second case as I would go in all directions or something like that? cause in other cases where I got defined different functions for a particular point I've used the definition, but in this case I got trajectories. What should I do?

Bye and thanks.