Now consider the 1-dimensional heat equation u_t = u_{xx} over the x-interval [0,Pi] with insulated ends and the initial temperature u(x,0)=2+cos(x)-cos(4x).    
The solution u(x,t) given by separation of variables is

`u(x,t)` = 2+exp(-t)*cos(x)-exp(-16*t)*cos(4*x)

Below is the plot of this solution as a function of x in [0,Pi] for time t in [0,5]. Note that the steady-state temperature is 2, the average value of u(x,0) in [0,Pi].

[Plot]