Derivative of a multivariable, piecewise function

107 Views Asked by At

I was asked to show that the function $h(t)=f(g(t))$ is differentiable at $t=0$, where

$f(x,y)=\begin{cases} \frac{x^2y}{x^2+y^2} & (x,y)\neq 0 \\ 0 & (x,y)=0 \end{cases}$

and $\vec{g}(t)=(kt,pt)$ for constants $k$ and $p$.

I made a diagram and said "$h$ is a function of $x$ and $y$, which are functions of $t$. Hence, $h'(t)=f_x(x,y)k+f_y(x,y)p$." I then plugged in $t=0$, which gave me $h'(0)=0$. (I had calculated $f_x$ and $f_y$ beforehand and found them to be $0$ at $(x,y)=(0,0)$.)

However, my answer is marked wrong and the correct answer is $\frac{k^2p}{k^2+p^2}$. Why am I wrong, and why is this the correct answer?

2

There are 2 best solutions below

0
On BEST ANSWER

To see that this is the correct answer, we compute the derivative from first principles

$$h'(0)=\lim_{t\to 0} \frac{h(t)-h(0)}{t}$$ which reduces to $$h'(0)=\lim_{t\to 0}\frac{k^2pt^3}{k^2t^3+p^2t^3}=\frac{k^2p}{k^2+p^2}$$

The reason your calculation is wrong is because $f(x,y)$ is not differentiable at $(0,0)$, which is to say there doesn't exist a linear map $df_0$ such that

$$\lim_{(x,y)\to(0,0)}\frac{||f(x,y)-f(0,0)-df_0(x,y)||}{||(x,y)||}=0$$

In the proof of chain rule, we use this fact, which is why chain rule doesn't apply here. Conceptually, this is saying the directionally derivative doesn't change in a "sensible" way, which we would need to be able to write it in terms of the partial derivatives

2
On

$$f(g(t))=\frac{k^2p}{k^2+p^2}t$$ Though for $f(x,y)$ exists partial derivative $$f_x(x,y)=\frac{2xy^3}{(x^2+y^2)^2}, \space f_y(x,y)=\frac{x^4-x^2y^2}{(x^2+y^2)^2}$$ they are not continuous in point $(0,0)$ and function is not differentiable, which comes, if we consider increment in point $(0,0)$ and take, for example, $(x,y)=(\frac{1}{n}, \frac{1}{n})$, then we have $$\Delta f(0,0)=\frac{x^2y}{(x^2+y^2)^{\frac{3}{2}}} = \frac{1}{2\sqrt2}$$