To solve , you use separation of variables to get
with lambda a constant (of the same units as x) and the negative sign chosen to make the solution finite for all t>0. Solving these separately, one gets an exponential for T(t) and a sine wave function for X(x). Using the x boundary conditions, one determines the discrete values allowed for to get the , and
Then we compare this at t=0 with the boundary condition . The should then become quite apparent.