Now consider the 1-dimensional heat equation u_t = u_{xx} over the x-interval [0,Pi] with boundary temperatures u(0,t)=1, u(Pi,t)=2 and the initial temperature u(x,0)=0.   
The solution u(x,t) given by separation of variables is an infinite series whose first few terms are  

`u(x,t)` = 1+x/Pi-6*exp(-t)*sin(x)/Pi+exp(-4*t)*sin(2*x)/Pi-2*exp(-9*t)*sin(3*x)/Pi+1/2*exp(-16*t)*sin(4*x)/Pi-6/5*exp(-25*t)*sin(5*x)/Pi+1/3*exp(-36*t)*sin(6*x)/Pi-6/7*exp(-49*t)*sin(7*x)/Pi

Below is the plot of this solution as a function of x in [0,Pi] for time t in [0,3]. Note that the steady-state temperature is the linear function v(x)=1+x/Pi.  

[Plot]