Continuously differentiable function of several variables on a subset of its domain

continuitydefinitionderivativesreal-analysis

In my calculus textbook I have the following definition of a continuously differentiable function of several variables on an open subset of its domain.

Function of several variables $f: X \subset \mathbb{R}^n \to \mathbb{R}$ is said to be continuously differentiable on an open set $E \subset \operatorname{int}X$, if all its partial derivatives $\frac{\partial f}{\partial x_i}, ~i=1,\ldots,n$ are continuous on $E$.

How can this definition be extended to arbitrary (not necessarily open) subset of the domain? My guess is to generalize the approach to defining a differentiable function on such subset from this MSE post (in essence, I just replaced differentiability with continuous differentiability there). So, I got the following definition:

Function of several variables $f: X \subset \mathbb{R}^n \to \mathbb{R}$ is said to be continuously differentiable on a set $E \subset \operatorname{int}X$ if there exists an open set $\widetilde E$ such that $E \subset \widetilde E \subset \operatorname{int}X$ and $f$ is continuously differentiable on $\widetilde E$.

Is the last definition correct? If not, what would be the correct definition (of a continuously differentiable function on a set $E \subset \operatorname{int}X$)?

Best Answer

I think that most of the time when you are talking about differentiability on a set $E$ that is not open, you don't a priori know that $f$ is $C^1$ on a neighborhood of $E$. For example, $E$ can be a curve in space, or more generally any $C^1$ surface, and usually we only have $X = E$. In this case, sometimes it is useful to say that $f$ is $C^1$ on $E$ means that there is a $C^1$ extension $\tilde{f}$ of $f$ to a neighborhood $U$ of $E$. But the directional derivatives $\partial_v \tilde{f}$ for $v \in \mathbb{R}^n$ depend on $\tilde{f}$, and will be different for different extensions $\tilde{f}$. However, importantly, if $x \in E$ and $v \in T_xE$, i.e. $v$ is tangent to $E$ at $x$, then $\partial_v \tilde{f}(x)$ is independent of the extension $\tilde{f}$ (this is a consequence of $E$ being a $C^1$ surface), so it makes sense to say/define $\partial_v f(x) = \partial_v \tilde{f}(x)$.

Related Question