How do we make sense of normal derivatives in PDE at boundary points? In PDE, the normal derivative on a boundary comes up a lot (defined to be the $<\nabla u, v>$ where $v$ is the unit normal vector of our domain. I want to ask how exactly do we define the gradient on boundary points because plenty of textbooks for analysis in $R^n$ explicitly state that we need open sets for partial derivatives to make sense. Is there some adapted definition for derivatives for boundary points?
Now closely related to PDE and normal derivatives is Hopf lemma which I was just reading about: https://en.wikipedia.org/wiki/Hopf_lemma
It states that if a harmonic functions assumes a strict maximum on a boundary point, then its normal derivative must also be strictly positive. Now if the point was an interior point, then we know the gradient must be zero since it is a extrema, but since we have boundary point, this is not the case. So intuitively, are we suppose to imagine that our domain is actually part of some larger space and our function is actually increasing in the direction of the normal at this point in this larger space?
 A: As is the case much of the time in PDE's, it helps to analyze a simpler one-dimensional example:
This function is only defined on the closed interval $[0,3]$, and achieves local maxima at the endpoints. At the right endpoint $x = 3$, it is clear that the function is increasing $\textit{up to}$ that point, which is why it is a local maximum. Since the increase of a differentiable function $f(x)$ is equivalent to $f'(x) > 0$, we would like to be able to say that $f'(3) > 0$; of course, if we use the usual definition
$$ f'(3) = \lim_{h\to 0}\frac{f(3+h)-f(3)}{h} $$
then this is not defined since $f(3+h)$ does not exist for positive $h$. The standard remedy is to just consider one-sided derivatives, meaning in this case we just take negative $h$ and take the limit as it approached $0$ from the left to get
$$ f'(3) := \lim_{h\to 0^-}\frac{f(3+h)-f(3)}{h} > 0 $$
as desired.
Generalizing, in arbitrary dimensions we can always do this type of one-sided limit with the normal derivative since it approaches the boundary at a right angle and so is well defined. It should be clear then that if a point on the boundary is a local maximum, then the normal derivative at that point must be nonnegative since the function cannot be decreasing as we move towards the point in the domain, from any direction. Hopf's lemma strengthens this in the special case that the function is harmonic to say that it is strictly positive rather than just nonnegative. You are right however that we cannot make a general statement about the $gradient$ vanishing on the boundary when we have a min/max like we can on the interior; this is just like the above simple case, where we see that $f'(1) = 0$ for the local min inside the interval but do not get the same behavior for extrema on the boundary.
