Continuity, derivatives of rational function I'm studying the continuity of a function and its derivatives checking if the function is continuous, differentiable and calculating some derivatives.
The function is 
\begin{cases}
\dfrac{x^2y}{x^2+y^2}& \text{if }\, (x,y)\neq 0\\
0& \text{if}\,\, (x,y)=0
\end{cases}
I'm asked to study the continuity in $(0,0)$.
My work:
I started checking the limit of the function for $(x,y) \rightarrow (0,0)$ and considered the trasformation in polar coordinates to get a easier limit:
$$\lim_{\rho\rightarrow 0} \frac{\rho^3\cos^2\theta \sin\theta}{\rho^2}=\lim_{\rho\rightarrow 0} \rho \cos^2\theta \sin\theta=0$$
So I got the continuity.
Then I've been asked to study the value of partial derivatives in $(0,0)$ and the directional derivatives in $(0,0)$ calculated on $y=x$.
I calculated the derivatives:
$f_x=\dfrac{2xy^3}{(x^2+y^2)^2}$,
this is not defined in $(0,0)$ so I considered the limit using polar coordinates again, and I got:
$$\lim_{\rho\rightarrow 0} \frac{2\rho^4 \cos\theta \sin^3\theta}{\rho^4}=2\cos\theta \sin^3\theta$$
Is it right? What can I say now about this limit?
The value of the derivatives in this point is supposed to be $0$ according to the solution given but I'm stuck in this point.
Besides  $f_y=\dfrac{x^4-x^2y^2}{(x^2+y^2)^2}$, from which I get to the same kind of problem (again the values is supposed to be $0$)
Finally the directional derivatives: I used the definition and got:
the vector of the direction is $(\sqrt2/2;\sqrt2/2)$ and $f(0,0)=0$ so
$$\lim_{t\rightarrow 0} \frac{f(\frac{\sqrt2}{2}t;\frac{\sqrt2}{2}t)-0}{t}=\lim_{t\rightarrow 0} \frac{\frac{1}{2}t^2\cdot\frac{\sqrt2}{2}t}{\frac{1}{2}t^2+\frac{1}{2}t^2}\cdot\frac{1}{t}=\frac{\frac{\sqrt2}{4}t^3}{t^2}\cdot\frac{1}{t}=\frac{\sqrt2}{4}$$
I have no idea how to finish the discussion of the two first derivatives and so how to check if the whole function is differentiable in the point $(0,0)$
 A: To work out $\mathrm{f}_x$ you need to use the limit definition:
$$\left.\frac{\partial\mathrm{f}}{\partial x}\right|_{x=y=0} = \lim_{h \to 0} \ \frac{\mathrm{f}(h,0) - \mathrm{f}(0,0)}{h} = \lim_{h \to 0}\ \frac{0-0}{h} = 0$$
To find the partial derivative $\mathrm{f}_y(0,0)$ you need to find the limit
$$\left.\frac{\partial\mathrm{f}}{\partial y}\right|_{x=y=0} = \lim_{h \to 0} \frac{\mathrm{f}(0,h)-\mathrm{f}(0,0)}{h} = \lim_{h \to 0} \ \frac{0-0}{h} = 0$$
To see if $\mathrm{f}$ is differentiable at $x=y=0$ then we need to show that $z=\mathrm{f}(x,y)$ is well approximated by a plane close to $x=y=0$. Since $\mathrm{f}(0,0)=\mathrm{f}_x(0,0) = \mathrm{f}_y(0,0) = 0$ then the only candidate for this plane is $z=0$. To see if $z=\mathrm{f}(x,y)$ is approximated by the plane $z=0$ we need to show that
$$\lim_{(x,y)\to(0,0)} \frac{\mathrm{f}(x,y)-(0x+0y)}{\sqrt{x^2+y^2}} = 0$$
This is the ideal time to use polar coordinates: $x=r\cos\theta$ and $y=r\sin\theta$. We need to show
$$\lim_{r \to 0} \ \frac{\mathrm{f}(r\cos\theta,r\sin\theta)-(0x+0y)}{\sqrt{r^2\cos^2\theta+r^2\sin^2\theta}} = 0$$
We can simplify this quite considerably:
$$\lim_{r \to 0} \ \frac{\mathrm{f}(r\cos\theta,r\sin\theta)}{r} = \lim_{r \to 0} \frac{r\cos^2\theta\sin\theta}{r} = \cos^2\theta\sin\theta$$
This limit depends on $\theta$, which means it is not unique. Since the limit is not well-defined, it follows that $\mathrm{f}$ is not differentiable at $x=y=0$. I've attached a picture below which shows the surface $z=\mathrm{f}(x,y)$ and the plane $z=0$. Notice what bad of a job the plane does at being tangent to the surface at the origin. The blue line is the line $z=\mathrm{f}(0,y)$, the green line is $z=\mathrm{f}(x,0)$ and the red line is $z=\mathrm{f}(t,t)$.

A: Fly by Night says using the standard rules of differentiation "isn't allowed" for partial derivatives.  I'm not sure what exactly he/she means by this; however, in your case, you can still use your approach in calculating the values of $f_x$ and $f_y$, and I wanted to explain how.
From this question, you know the partial derivative $f_x(0,0)$ is equal to the limit of $f_x(0,h)$ as $h \to 0$, with the important qualification that that limit exists.  But as you have calculated, the partial derivative $f_x$ everywhere except $0$ is given by
$$
2 \cos \theta \sin^3 \theta
$$
Now, the problem is where you take the limit as $\rho \to 0$.  In fact, you should not be taking the limit in $\mathbb{R}^2$, but rather you need to take the limit along the line $\boldsymbol{y=0}$.  This is because the definition of the partial derivative is taken with the other variables held constant, so when computing $f_x$ at $(0,0)$, $y$ is held fixed at $0$.  So what am I getting at?  Well, you should be taking $\rho \to 0$, with $\boldsymbol{\theta = 0 \textbf{ or } \pi}$ at the same time.  Thus you have
$$
f_x(0,0) = \lim_{\rho \to 0}_{\theta = 0, \pi} 2 \cos \theta \sin^3 \theta = 0.
$$
Similarly, you can compute the partial derivative $f_y$ by taking the limit with $\theta = \pm \pi/2$, and with the important qualification that this limit exists.
\begin{align*}
f_y(0,0)
&= \lim_{\rho \to 0}_{\theta = \pm \pi/2} 
\frac{x^4-x^2y^2}{(x^2+y^2)^2} \\
&= \lim_{\rho \to 0}_{\theta = \pm \pi/2} 
\frac{\rho^4 \cos^2 \theta (\cos^2 \theta - \sin^2 \theta)}{\rho^4} \\
&= \lim_{\rho \to 0}_{\theta = \pm \pi/2} 
\cos^2 \theta \cos (2\theta) = 0. \\
\end{align*}
In summary,


*

*The standard rules of differentiation do work (in some sense) for partial derivatives, because a partial derivative is just a derivative with some variable held constant.

*If the limit as $h$ goes to $0$ of $f_x(x + h, y)$ exists, then the partial derivative $f_x(x,y)$ exists and is equal to the limit.  Similarly for $f_y$.

*(This is the important thing I think you were missing) The partial derivative $f_x$ is taken with $y$ held constant, and the partial derivative $f_y$ is taken with $x$ held constant.  In particular, these are not really limits taken in $\mathbb{R}^2$, but rather limits as only one variable goes to $0$.  And when you switch to polar coordinates and want to compute the partial derivatives at $(0,0)$, that means the angle is taken to have just two fixed possibilities as $\rho \to 0$.
A: I know it has been past two years when this question was asked, but I study that example and I think I can show you some new idea that hasn't been shown so future reader can learn something.
 The main idea is to use Squeeze theorem and AG inequality.
$$\frac{x+y}{2}>=\sqrt{xy}$$
$$\frac{x^2+2xy+y^2}{4}>=xy$$
$$\frac{x^2+y^2}{1}>=2xy$$
$$\frac{xy}{x^2+y^2}>=\frac{1}{2}$$
$$\frac{xy*|x|}{x^2+y^2}>=\frac{1}{2}*|x|$$
So we can squeeze our limit and use absolute of that:
$$\lim_{(x,y)\rightarrow 0,0}|\frac{x^2*y}{x^2+y^2}|$$
$$0=<|\frac{x^2*y}{x^2+y^2}|<=\frac{1}{2}*|x|$$
SO by the squeeze theorem this limit is equal to zero and function is continous at $(0,0).$
