Does there exist a function $f:\mathbb{R}^2\to\mathbb{R}$ that is discontinuous at a point but all of whose directional derivatives exist there? Can such function exist whose all directional derivatives exist at a point but it isn't continuous at that point? Preferably give examples of $f: \Bbb R^2 \rightarrow \Bbb R$ . Our teacher said such a function can exist but the example he gave had one undefined directional derivative. 
 A: Yes. 
Here is a simple and natural way to construct such a function, with the discontinuity at the origin. I don't see this method discussed elsewhere on MSE. There are other, plucked-out-of-a-hat examples, but this is surely the simplest.
You want the function to be smooth along every line into the origin; that'll guarantee the directional derivatives exist at the origin in any direction. But we can make it discontinuous at the origin by setting it to have a different value along a nonlinear curve through the origin.
This is easy! Just take $f(x,y)=0$ except when $y=x^2$ and $x\neq0$, in which case it is some other constant, say $1$. Symbolically:
$$f(x,y)=\begin{cases}1 & y=x^2, x\neq0\\ 0 & \text{otherwise}\end{cases}$$
The function isn't continuous at the origin because the value there is $0$ but approaching along the parabola yields a limit of $1$.
But the directional derivatives all exist because 
$$\frac{f(hv_1,hv_2)}{h}=0$$
for all sufficiently small $h$.

The point of this sort of counterexample is that directional derivatives, which enforce a degree of smoothness along lines, are not sensitive enough to detect irregularity along nonlinear curves.
