TITLE: Why can't we usually speak of partial derivatives if the domain is not open?
QUESTION [13 upvotes]: In the book by Guillemin & Pollack they define a function $f$ from an open subset $U\subset R^n$ to $R^m$ to be smooth if it has continuous partial derivatives of all orders. Then they say "However, when the domain of $f$ is not open, one usually cannot speak of partial derivatives. (Why?)" Can someone explain this a little bit more?

REPLY [2 votes]: Actually, under some favorable conditions one do it for functions defined on subsets which are not open (and it is even useful).
Let $A$ be a subset of $R^n$ and $f: A\to R$ be a function such that there exists an open subset $B$ of $R^n$ (containing $A$) such that $f$ extends to a differentiable function $F: B\to R$. Then to define partial derivatives of $f$ on $A$ you just compute partial derivatives $D_iF$ and then restrict $D_iF$ back to $A$. 
For instance, this appears when you integrate vector fields/differential forms  over curves and surfaces (especially when using Green's and Stokes' theorems). Also, when talking about von Neumann boundary value problem, one talks about normal derivative of a function on the boundary of a domain in $R^n$. 
One drawback of this definition is that at some points $a\in A$ the partials thus defined $D_if(a)$ might depend on the extension $F$. (For the von Neumann BVP this is not an issue since the boundary is typically assumed to be smooth and, hence, the normal derivative is independent of the extension.) For instance, if $A$ is the $x$-axis in the plane then $D_xf(a)$, $a\in A$, is not well-defined. Same for the subset $A$ which is the cuspidal curve $y^2=x^3$. This is related to a bounty question which was asked at MSE recently (maybe I will find it).