Regarding functions from R² to R: continuity and differentiability Let $f : U \rightarrow \mathbb{R}$ where $U \subseteq \mathbb{R}^2$ is an open set and $P \in U$.
I am almost sure the following statements are correct, but please confirm:


*

*The only requirement for $f$ to have a tangent plane at $P$ is: $\exists \  \nabla f(P)$ (in other words, both $\frac{\partial f}{\partial x}$ and $\frac{\partial f}{\partial y}$ exist at $P$. Edit: the partial derivatives must be continuous!

*If the tangent plane exists, still not necessarily the function is continuous at $P$.

*The statement 2 is reverse order: if the function is continuous at $P$, still not necessarily the tangent plane exists.

*If the function happen to be continuous at $P$, still not necessarily the function is differentiable at $P$.
And now, assuming those are correct, my main question comes:
If $f$ is continuous at $P$, and $f$ has a tangent plane at $P$, is it possible that $f$ still is not differentiable?
I might have misunderstood what my teacher said, but it seems that the answer is yes! If you agree, can you provide at least one example?
Thank you! 

EDIT (Six months later): This question awarded me the Tumbleweed badge and even after six months there hasn't been any answers, comments or even votes! Today something made me remember of this question. Fortunately, I already made some progress: I was able to confirm the statements 1, 3 and 4. I couldn't confirm statement 2 yet, and my main question also still stands (I put it in italic above). Thanks for any help.

EDIT 2 (May 28): Thanks for the attention. I have felt the need to quote James Stewart in his definition of tangent plane:

Suppose f has continuous partial derivatives. An equation of the tangent plane to the surface $z = f(x, y)$ at the point $P(x_0, y_0, z_0)$ is
  $$z - z_0 = f_x(x_0, y_0)(x - x_0) + f_y(x_0, y_0)(y - y_0)$$

Therefore, Stewart needs only continuous partial derivatives to define the tangent plane.
This shows that I was wrong about my statement 1. I have edited it now, adding the "must be continuous" requirement. This doesn't change any of my other thoughts though (yet).
I would like to emphasize that I am considering any weird function you could come up with, not just real life functions and such. In this question I am looking for properties that will formally apply in any case.
If anyone disagrees that statements 1, 3 and 4 are true please comment for further discussion (maybe I did miss something!).
Now I'll try to give an example of what makes me believe in statement 2: Please correct me if I'm wrong!
Take this weird function:
$$ f(x, y)=\begin{cases}
    0, & \text{if $x = 0$ or $y = 0$}.\\
\\
    1, & \text{otherwise}.
  \end{cases} $$
Hopefully, if I'm not mistaken, this function is an example that shows that my second statement is true. (please let me know if I'm mistaken).
Assuming everything is fine by now, don't forget of my main question:

If $f$ is continuous at $P$, and $f$ has a tangent plane at $P$, is it possible that $f$ still is not differentiable?

 A: Like Daniel mentions in the comments, you have to first very carefully define what you mean by a "tangent plane."
Here's how I might do it: for any differentiable curve $\gamma: [-1,1]\to U,\ 0\mapsto P$, the tangent vector associated to $\gamma$, if it exists, is given by 
$$\frac{d}{dt}\left[\gamma(t), f(\gamma(t))\right]_{t\to 0}.$$
I'd say a tangent plane exists at $P$ if (i) the tangent vector exists for all $\gamma$, and (ii) they span a two-dimensional linear space.
Existence of the partial derivatives $f_x$ and $f_y$ is not enough to guarantee both of these conditions. Consider the standard counterexample
$$f(x,y) = \frac{(x-y)^2}{x^2+y^2}.$$
Here are a few $\gamma$ and their tangent vectors at $P=(0,0)$:
\begin{align*}
(t,0) &: (1,0,0)\\
(0,t) &: (0,1,0)\\
(t,t^2) &: (1,0,-2)
\end{align*}
these already span all of $\mathbb{R}^3$ so I would not say a tangent "plane" exists at $P=0$.


*Existence of a tangent plane means that the limit of $f(x,y)$ as you approach $P$ along any path must be equal to $f(P)$, and so $f$ is continuous.

*Certainly not.

*Nope.
To summarize:
$$\nabla f \textrm{ exists and continuous} \Rightarrow f\textrm{ differentiable} \Leftrightarrow \textrm{tangent plane exists} \Rightarrow \begin{cases}f_x, f_y \textrm{ exist}\\f \textrm{ continuous}\end{cases}$$
