Green's function of 1d heat equation I'm considering heat equation on a finite line with zero boundary value.  Namely
$$u_t-a^2u_{xx}=0 \qquad (t\ge 0 ,l \ge  x \ge 0)$$
$$u(0,t)=u(l,t) =0 \qquad  (t \ge 0)$$
The green function of this PDE is $$G(x,\xi,t,\tau)=\frac2l\sum_{n=0}^{\infty}\sin\left(\frac{n\pi x}{l}\right)\sin\left(\frac{n\pi \xi}{l}\right)e^{-(\frac{n\pi a}{l})^2(t-\tau)}H(t-\tau)$$
$$l \ge x,\xi \ge 0 \qquad t\gt \tau$$
It seems obivious that this function should always take positive value if we consider its meaning in physics.
But how can I give a rigorous proof to this fact?
 A: Firstly note the heat kernel function is positive for all x and t,
$$k\left( x,t \right)=\frac{{{e}^{-{{x}^{2}}/\left( 4t \right)}}}{\sqrt{4\pi t}}$$ 
Note the definition of Jacobi’s theta function
$${{\vartheta }_{3}}\left( z,q \right)=\sum\limits_{n=-\infty }^{\infty }{{{q}^{{{n}^{2}}}}{{e}^{2niz}}}$$ or alternatively $${{\vartheta }_{3}}\left( z|\tau  \right)=\sum\limits_{n=-\infty }^{\infty }{{{e}^{i\pi {{n}^{2}}\tau }}{{e}^{2niz}}}$$ 
i.e. $q={{e}^{i\pi \tau }}$.  Now consider
$${\mathrm O}\left( x,t \right)=\sum\limits_{n=-\infty }^{\infty }{k\left( x+2n\pi  \right)}=\sum\limits_{n=-\infty }^{\infty }{\frac{{{e}^{-{{\left( x+2n\pi  \right)}^{2}}/\left( 4t \right)}}}{\sqrt{4\pi t}}}$$
which is obviously a solution of the heat equation, and is also positive.  Now consider Jacobi’s famous inversion theorem (see Whittaker & Watson), namely
$${{\left( -it \right)}^{{\scriptstyle{}^{1}/{}_{2}}}}{{\vartheta }_{3}}\left( z|t \right)=\exp \left( -i\frac{{{z}^{2}}}{\pi t} \right){{\vartheta }_{3}}\left( \frac{z}{t}|-\frac{1}{t} \right)$$
which yields the equivalence
$$\sum\limits_{n=-\infty }^{\infty }{{{e}^{i\pi {{n}^{2}}\tau +i2nz}}}=\frac{1}{\sqrt{-i\tau }}\sum\limits_{n=-\infty }^{\infty }{{{e}^{{{\left( z+n\pi  \right)}^{2}}/\pi i\tau }}}$$ 
Therefore for what we need we have then
$$\sqrt{\frac{\pi }{t}}\sum\limits_{n=-\infty }^{\infty }{{{e}^{-{{\left( x/2+n\pi  \right)}^{2}}/t}}}=\sum\limits_{n=-\infty }^{\infty }{{{e}^{-{{n}^{2}}t+inx}}}$$ 
Using this we find
$${\mathrm O}\left( x,t \right)=\frac{1}{2\pi }\sum\limits_{n=-\infty }^{\infty }{{{e}^{-{{n}^{2}}t+inx}}}$$
Now consider the construction
$$\begin{align}
  & G\left( x,\xi ,t \right)={\mathrm O}\left( x-\xi ,t \right)-{\mathrm O}\left( x+\xi ,t \right) \\ 
 & =\frac{1}{2\pi }\sum\limits_{n=-\infty }^{\infty }{\left( {{e}^{in\left( x-\xi  \right)}}-{{e}^{-in\left( x+\xi  \right)}} \right){{e}^{-{{n}^{2}}t}}}\\&=-\frac{i}{\pi }\sum\limits_{n=-\infty }^{\infty }{{{e}^{-in\xi }}\sin \left( nx \right){{e}^{-{{n}^{2}}t}}}\\&=\frac{1}{\pi }\sum\limits_{n=1}^{\infty }{\sin \left( nx \right)\sin \left( n\xi  \right){{e}^{-{{n}^{2}}t}}} \\ 
\end{align}$$
This is your Green’s function (It satisfies the heat equation due to translational symmetries, and all you need to do is scale the domains etc for you specific problem).  Unfortunately however it is the difference of two positive functions.  We are therefore left with proving ${\mathrm O}\left( x-\xi ,t \right)-{\mathrm O}\left( x+\xi ,t \right)>0$.
From Whittaker and Watson we have
$${{\vartheta }_{3}}\left( z,q \right)=G\left( q \right)\prod\limits_{n=1}^{\infty }{\left( 1+2{{q}^{2n-1}}\cos \left( 2z \right)+{{q}^{4n-2}} \right)}$$ 
where for us $z=x/2,\,\,\tau =it/\pi \Rightarrow q={{e}^{-t}}$ and therefore
$${\mathrm O}\left( x,t \right)=G\left( q \right)\prod\limits_{n=1}^{\infty }{\left( 1+2{{q}^{2n-1}}\cos \left( x \right)+{{q}^{4n-2}} \right)}$$
 Now observe $1+2{{q}^{2n-1}}\cos \left( x-\xi  \right)+{{q}^{4n-2}}>1+2{{q}^{2n-1}}\cos \left( x+\xi  \right)+{{q}^{4n-2}}$ since $\cos \left( x-\xi  \right)-\cos \left( x+\xi  \right)=2\sin \left( x \right)\sin \left( \xi  \right)>0$  for  $0<x<\pi,0<\xi <\pi $.  Hence $G>0$.   
