Insulated ends of a rod I'm trying to understand the boundary condition for a rod that's insulated at its ends. The boundary conditions for such a rod is said to be $-k\frac{dT}{dx}=0$. In other words, the temperature gradient at the ends must be zero. But how do we define a temperature gradient at the end of the rod in the first place? For a derivative to exist at the ends of the rod, the slope of the temperature distribution must approach zero from both sides. But there simply aren't points to both sides for the end points of the rod. For example, the end point at $x=0$ has points only to the right of it, but not to the left of it.

 A: Usually one defines the derivative of a function at a point $x=a$ as   $$f'(x)=\lim_{x \to a} \frac{f(x)-f(a)}{x-a}.$$ Indeed, this definition assumes this limit has the same value whether $x$ approaches $a$ from below or from above.
However, one can define the derivative of a function coming from a point just from one side. For example, the left-hand and right-hand derivatives are defined as $$f'_-(a)=\lim_{x \to a^-} \frac{f(x)-f(a)}{x-a}$$ and $$f'_+(a)=\lim_{x \to a^+} \frac{f(x)-f(a)}{x-a},$$ where $x \to a^-$ means that $x$ approaches $a$ from below and $x \to a^+$ means that $x$ approaches $a$ from above.
For the derivative of a function to exist at $x=a$ we need to have $f'_-(a)=f'_+(a)$ (and this to be finite) and we simply denote it as $f'(a)$.
Now, if $f$ is defined on an interval, say $f:[a,b],$ we obviously can't calculate $f'_-(a)$, but we can still talk about $f'_+(a)$.
In your problem, you essentially have a function $T:[0,L]$, so you can only compute $T'_+(0)$ at $x=0$, and this is what it is meant by the boundary condition. It is essentially assumed that at the boundary you compute the derivative from below or from above that is relevant for that specific boundary.
A: Technically, the boundary condition at $x=0$ is not that the derivative equals zero, but that the right derivative equals zero. It's just that they are being sloppy. Similarly, at $x=L$, the left derivative is zero. The notation is similar to $\text{d}T/\text{d}x$, except the first $\text{d}$ has a $+$ as a subscript. So we have
$$\frac{\text{d}_+T}{\text{d}x} = 0$$
at $x=0$, and
$$\frac{\text{d}_-T}{\text{d}x} = 0$$
at $x=L$.
The functions for every variable on the rod are left-continuous and right-differentiable at $x=0$, as well as right-continuous and left-differentiable at $x=L$. See this article for more information.
