# Question about discontinuous function with directional derivatives at a points

For a function, if at a point $$a$$, the function has directional derivatives along some lines, but the function is discontinuous at $$a$$, does that mean along those lines, the function is continuous, but along some other directions the function is not? What does the graph of such a function look like? Continuous in some direction but discontinuous in others?

• I'm not sure the question is clear. In your first sentence, you say that the function is continuous -- did you actually mean to say discontinuous? Commented Sep 9, 2019 at 1:06
• @Allawonder. Yes, should be discontinuous.
– user533661
Commented Sep 9, 2019 at 1:17
• @saulspatz why in every direction? Seems undefined in directions of rational slope? Commented Sep 9, 2019 at 2:56
• @user7530 You're right. Sloppy thinking. I'll try to fix it. Trouble is, I'm about to fall asleep. Commented Sep 9, 2019 at 2:59
• @user7530 I deleted the comment. I don't know what I was thinking. Commented Sep 9, 2019 at 13:20

Sure. The directional derivative $$D_v f$$ looks at the restriction of the function to the line in the $$v$$ direction; it's quite possible for this restriction to be continuous whereas the overall function is discontinuous. An easy example is $$f(x,y) = \begin{cases}1, &y \geq 0\\ 0, &y < 0\end{cases}$$ which looks continuous in the $$x$$ direction, but not in any other direction.
As you may know, existence of directional derivatives is much weaker than differentiability of $$f$$ (which guarantees that the directional derivative at a point is linear as a function of the direction $$v$$). Perhaps counterintuitively, you can have that the directional derivative of $$f$$ at a point exists in all directions, but $$f$$ is still not continuous at that point. See this writeup for instance which proves that $$f(x,y) = \begin{cases}\frac{x^2 y}{x^2+y^4}, & (x,y)\neq (0,0)\\ 0, & x=y=0\end{cases}$$ is such a counterexample (you can create many others of the same family).