Solve the heat equation

with the boundary conditions

and the following initial condition:

.

Now, the question itself isn't a problem, its the actual derivation of the heat equation that is (its not asked in the question but we're told that in an exam it would be).

So I'm looking to derive this.

where

.

So i start by doing separation of variables to get

and

.

Now at this point I think I should use eigenfunctions then superposition to solve it but i cant see where the

or the

come from?

Any help please?