# example of discontinuous function having direction derivative

Is there a function (non piece-wise unlike below) which is discontinuous but has directional derivative at particular point? I have a manual that says the function has directional derivative at $(0,0)$ but is not continuous at $(0,0)$. $$f(x,y) = \begin{cases} \frac{xy^2}{x^2+y^4} & \text{ if } x \neq 0\\ 0 & \text{ if } x= 0 \end{cases}$$

Can anyone give me few examples which is not defined piece wise as above?

• Before I think about $|\cdot |$, does it count as a piece wise function? – Git Gud Jan 16 '13 at 18:58
• what would that be? could you give me link about |.| – Santosh Linkha Jan 16 '13 at 18:59
• I mean the absolute value. Of what? Yet to be determined, maybe $|x|$ or $|xy|$.. – Git Gud Jan 16 '13 at 19:00
• I think not .. i just don't want that condition imposed like f(x) = this when x = this or x=that – Santosh Linkha Jan 16 '13 at 19:01
• It's probably continuous anyway. – Git Gud Jan 16 '13 at 19:02

$$f(x,y)=\lim_{u\to0}\frac{xy^2+u^2}{x^2+y^4+u^2}$$
• @experimentX And I know you can't disallow limits if you would be willing to accept $e^x$ or $\sin x$. :) – Hagen von Eitzen Jan 16 '13 at 19:37
The standard "elementary" functions are always continuous where they are defined, so this would be hard to do. You might try $$f(x,y) = \arg( -\exp(i(y-x^2)(2x^2-y))) - (y-x^2)(2x^2-y)$$ where arg is the "principal branch" of the argument.
$f(x,y)=\frac{xy}{x^2+y^2}$ at $(x,y)\neq (0,0)$ and $=0$ at $(x,y)=(0,0)$
• Since $f(x,x)\to\frac12$ when $x\to0$, some functional derivatives of $f$ at $(0,0)$ do not exist. – Did Jan 16 '13 at 19:08