Let $\Omega$ be an open subset of $\mathbb R^n$ for $n \geq 2$, and $p \in \Omega$.


Let $k$ be a positive integer. Suppose that $f: \Omega \setminus \{p\} \to \mathbb R$ is in $C^k$, and $\lim\_{x \to p} D^k f (x)$ exists.


**Question:** Is it true that $f$ admits an extension to $\Omega$ that is in $C^k (\Omega)$?



An extension problem
$\newcommand\R{\mathbb R}\newcommand{\Om}{\Omega}$This is to detail the [comment by Fedor Petrov](https://mathoverflow.net/questions/446053/an-extension-problem#comment1152071_446053).


Without loss of generality, $p=0$ and $\Om$ is an open ball in $\R^n$ centered at $p=0$. Assume, slightly more generally, that $f\colon\Om\_0\to\R^d$ for some natural $d$, where $\Om\_0:=\Om\setminus\{0\}$. (Actually, the original problem is clearly equivalent to the "$d$-dimensional" one.) Let $g\colon\Om\_0\to\R$ denote any coordinate-function of the vector function $f$.
Let $L^kf:=\lim\_{x\to0}(D^kf)(x)\in((\R^n)')^d$ and $L^kg:=\lim\_{x\to0}(D^kg)(x)\in(\R^n)'$, where $(\R^n)'$ is the space of all linear functionals on $\R^n$; let us identify $(\R^n)'$ with $\R^n$ in the standard manner, and then $((\R^n)')^d$ with $\R^{nd}$.


Consider first the case $k=1$. Take any sequence $(x\_r)$ in $\Om\_0$ such that $x\_r\to0$ and $0$ is not on the straight line segment $[x\_m,x\_r]$ from $x\_m$ to $x\_r$ for any natural $m,r$; let us call such a sequence $(x\_r)$ *good*. Then, by the mean value theorem, for any (coordinate-function) $g$, any natural $m$ and $r$, and some $t\_{m,r}\in(0,1)$ we have
\begin{equation}
 g(x\_r)-g(x\_m)=(D^1g)(x\_m+t\_{m,r}(x\_r-x\_m))(x\_r-x\_m)\to0
\end{equation}
as $m,r\to\infty$, since $x\_r-x\_m\to0$, $x\_m+t\_{m,r}(x\_r-x\_m)\to0$, and hence $(D^1g)(x\_m+t\_{m,r}(x\_r-x\_m))\to L^1g\in(\R^n)'=\R^n$. So, by the Cauchy convergence test, the sequence $(g(x\_r))$ converges to a limit in $\R$ and hence the sequence $(f(x\_r))$ converges to a limit in $\R^d$.


Now take any sequence $(x\_r)$ in $\Om\_0$ such that $x\_r\to0$, now allowing $0$ to be on the straight line segment $[x\_m,x\_r]$ for some natural $m,r$. We can consecutively approximate the sequence $(x\_r)$ by a good sequence $(y\_r)$ such that $|x\_r-y\_r|+|f(x\_r)-f(y\_r)|<1/r$ for all natural $r$ -- **it is only here that we use the condition $n\ge2$** (here we also use the continuity of $f$ on $\Om\_0$). So, for any sequence $(x\_r)$ in $\Om\_0$ such that $x\_r\to0$, the sequence $(f(x\_r))$ converges to a limit in $\R^d$. Clearly, this limit, which let us denote by $f(0)$, does not depend on the choice of a sequence $(x\_r)$ in $\Om\_0$ such that $x\_r\to0$, so that $f(0)=\lim\_{x\to0}f(x)$. Let then $g(0):=\lim\_{x\to0}g(x)$.


Moreover, using the mean value theorem again (as well as the condition $L^kg:=\lim\_{x\to0}(D^kg)(x)$), for all $x\in\Om\_0$ and some $t\_x\in(0,1)$,
\begin{equation}
 g(x)-g(0)-(L^1g)(x)=(D^1g)(t\_x x)(x)-(L^1g)(x)=((D^1g)(t\_x x)-L^1g)(x)=o(|x|)
\end{equation}
as $x\to0$, where $|x|$ denotes the Euclidean norm of $x$. Thus, $(D^1g)(0)=L^1g$ and hence $(D^1f)(0)=L^1f$.


So, the case $k=1$ is done. The general case of any natural $k$ now follows by backward induction, utilizing the vector extension of the original problem and identifying the arising finite-dimensional linear spaces of linear functionals with spaces $\R^N$ of appropriate dimensions $N$.


