The wave equation is
[tex]\frac{\partial^2 \phi}{\partial x^2}= \frac{1}{c^2}\frac{\partial^2\phi}{\partial t^2}[/tex]
If you use "separation of variables" you would look for solutions of the form [tex]\phi(x, t)= X(x)T(t)[/tex] (separating x and t into separate functions) so that the equation becomes
[tex]T\frac{d^2X}{dx^2}= \frac{1}{c^2}X\frac{d^2T}{dt^2}[/tex]
Divide both sides by XT to get
[tex]\frac{1}{X}\frac{d^2X}{dx^2}= \frac{1}{c^2T}\frac{d^2T}{dt^2}[/tex]
Now the left side is a function of x only and the right side is a function of t only. In order to be the same for all x and t, each side must be equal to a constant:
[tex]\frac{1}{X}\frac{d^2X}{dx^2}= \lambda[/tex]
[tex]\frac{d^2X}{dx^2}= \lambda X[/tex]
This is what pasmith is referring to as the "spatial variation".
IF we are given the heat problem on a finite interval, say T(0)= T(P)= 0, then we can show that the "spatial dependence", the function X(x), must have sine and cosine solutions.
If, for example, [itex]\lambda= 0[/itex] this becomes just [itex]d^2X/dx^2= 0[/itex] so the general solution is y= Ax+ B which is NOT periodic and so cannot satisfy the boundary conditions.
If, for example, [itex]\lambda> 0[/itex] the general solution is [itex]y= Ae^{x\sqrt{\lambda}}+ Be^{x\sqrt{\lambda}}[/itex].
So [itex]\lambda[/itex] must be negative. If we write [itex]\lambda= -\alpha^2[/itex], the equation becomes [itex]d^2X/dx^2= -\alpha^2 X[/itex], which has general solution [tex]Acos(\alpha x)+ B sin(\alpha x)[/tex]. That's where the
[tex]\frac{1}{c^2T}\frac{d^2T}{dt^2}= \lambda[/tex]
[tex]\frac{d^2T}{dt^2}= \lambda c^2T[/tex]
Again, that is for the heat problem on a finite interval. If we had and infinite interval, say the heat equation on [itex]x\in [0, \infty)[/itex], the solutions are Fourier Transforms, not Fourier series, and are NOT periodic at all.