Can a function have a derivative where it has no value?

If a function $f$ is not defined at a point $x_0$ we can't evaluate the derivative at $x_0$ because in the definition of the derivative at $x_0$ we need $f(x_0)$.

However if $f$ is continuous in $0<|x-x_0|<r$ with $r>0$ and the limit $\lim_{x\to x_0}f(x)=L$ exists we can extend $f$ to a continuous function in $|x-x_0|<r$ by letting $f(x_0):=L$.

Moreover if $f$ is also differentiable in $0<|x-x_0|<r$ and the limit $\lim_{x\to x_0}f'(x)=a$ then the extended function is also differentiable at $x_0$ and its derivative at $x_0$ is equal to $a$.

See also Prove that $f'(a)=\lim_{x\rightarrow a}f'(x)$.


No.

You can certainly extend $f$ to a function $g$ as you indicate, but then you are really computing $g'(0)$, not $f'(0)$.

In that case, $f'$ agrees with $g'$ on their common domain, which excludes $x=0$.

Remember, if a function is differentiable at $x_0$, then it is continuous at $x_0$. In particular, it is defined at $x_0$.


As has already been said, and as you have found yourself, the ordinary derivative is not defined. However, the symmetric derivative is defined in your case: $$f'_{\text{symmetric}}(x_0) := \lim_{h\to 0} \frac{f(x_0+h)-f(x_0-h)}{2h}$$

A more general derivative is also defined (I'll call it excluding; I don't know if it has a name): $$f'_{\text{excluding}}(x_0) := \lim_{h,k\to 0\\h,k \neq 0} \frac{f(x_0+h)-f(x_0+k)}{h-k} = \lim_{x_1,x_2\to x_0\\x_1,x_2 \neq x_0} \frac{f(x_1)-f(x_2)}{x_1-x_2}$$