# Heat equation with problematic boundary conditions

I'm asked to solve the heat equation $$u_t = \kappa u_{xx}$$ for $t \ge 0$, $0 \le x \le L$, given boundary conditions $$u_x(0,t) = u_x(L,t) = 0$$ and an initial condition $$u(x,0) = f(x) = 100x/L.$$ This seems problematic to me. In particular, it seems $u_x(x,0)$ should coincide with $f'(x) = 100/L$, so that $u_x(0,0) = f'(0) = 100/L \ne 0$, contradicting the first condition that $u_x(0,t) = 0$ for all $t$. Other contradictions seem to arise if I try separation of variables on $u$ (which I'm also asked to do). In general, if you prescribe an $f(x)$ in a situation like this, shouldn't it have to satisfy $f'(0) = 0$? What am I missing here?

• In this situation we can require that the boundary conditions be satisfied for all $t>0$ but not at $t=0$. – Anthony Carapetis Aug 30 '13 at 6:46

This is ok because as soon time starts running, the solution will pick up the boundary condition. The phenomenon is related to the fact that the heat equation immediately makes things smooth even if you start with a nonsmooth initial datum. Imagine you reflect the initial datum $f$ in an even manner across the point $x=0$ so that now you have a function (that looks like a V) on $-L\leq x\leq L$, and then you copy this indefinitely on every interval of length $2L$, to get a periodic function that looks like sawteeth. Now if you solve the heat equation on the real line with this initial condition, it would be equivalent to your original problem. Then the smoothing of those sawteeth at their peaks so that they become horizontal would be equivalent to the original solution picking up the homogeneous Neumann boundary conditions.