Heat equation on a rectangle with two insulated sides (source code)

= Heat equation on a rectangle with two insulated sides
{title2=$T=\sum_{n\geq1,m\geq0}A_{nm}\sin(n\pi x/a)\cos(m\pi y/b)e^{-\lambda\pi^2(n^2/a^2+m^2/b^2)t}$}

On $0<x<a$, $0<y<b$, impose zero <Dirichlet boundary conditions> at $x=0,a$ and zero <Neumann boundary conditions> at $y=0,b$. <Separation of variables> for $T_t=\lambda\Delta T$ gives the displayed sine-cosine expansion. The zero cosine mode must be included: its norm is $b$, whereas the positive cosine modes have norm $b/2$. Thus $A_{n0}=2(ab)^{-1}\int\!\int T_0\sin(n\pi x/a)$ and $A_{nm}=4(ab)^{-1}\int\!\int T_0\sin(n\pi x/a)\cos(m\pi y/b)$ for $m\geq1$. Expanding $x(a-x)$ gives sine coefficient $4a^2[1-(-1)^n]/(n^3\pi^3)$. Initial data $x(a-x)\sin^2(2\pi y/b)$ therefore involve only $m=0,4$ and odd $n$. Their leading long-time mode is $4a^2\sin(\pi x/a)e^{-\lambda\pi^2t/a^2}/\pi^3$.