if a function is only differentiable at one point , how is the differential calculated I recently came across this question on a function differentiable at only one point
It looks like the author of the answer has used the epsillion-delta definition of the limit, however, I'm familiar only with this definition $$ \frac{dy}{dx}  = \lim \limits_{h \to 0}\frac{f(x+h)-f(x)}{h}$$
and I don't see how I can use this if a function is only continous at one point.
Could someone please help
 A: Differentiable, or even just continuous, at a single point is a bit surprising but it is possible.  Some examples might help.
Example 0
$$q(x) = \begin{cases} 1 & x \in \mathbb{Q} \\
                       0 & x \notin \mathbb{Q}
         \end{cases}$$
This is sometimes called the indicator function of the rationals.  It is continuous nowhere and hence differentiable nowhere.
Example 1
$$x q(x)$$
This is continuous at $0$ but nowhere else.  It is differentiable nowhere, not even $0$.
Example 2
$$x^2 q(x)$$
This is continuous and differentiable at $0$.  It is neither continuous nor differentiable anywhere else.
A: I'll break this down into what I think the two questions being asked are:
How can we take the limit if the function is only differentiable at one point?
Well, the limit is the definition of differentiability at that point, differentiability does not rely on that of neighboring points. In fact, all you need is continuity at that point. Note that not all continuous functions are differentiable, however all differentiable functions are continuous (which this whole question ultimately demonstrates). Which takes me onto the next point.
How can we take this limit if the function is only continuous at one point
Continuity essentially guarantees that for small enough h, not only will it exist, $f(x+h) \approx f(x)$. It is also guaranteed by continuity that, as h gets smaller, the approximation becomes better. If $f(x+h)$ is getting closer and closer to $f(x)$ (definition of continuity), then the limit of the numerator makes the whole fraction an indeterminate form which allows the derivative to exist (again, continuity does not guarantee differentiability). There is a good example of this in the link you mentioned.
A: It is possible to get a function, which is continuous and differentiable at one point only. First of all there exists a bounded, continuous and nowhere differentiable function $f(x)$ (see). Let $g(x)=x^2f(x).$ Then $g$ is not differentiable at any point $x\neq 0.$ On the other hand $g'(0)=0.$
