You can use energy methods to show that solutions to the Heat Equation are unique. I was just wondering why it is then that separation of variables, the fundamental solution and the method of Fourier Transforms all give different solutions to the standard Heat Equation?
The problem I am considering is
$$u_t = Du_{xx}, \,\,\,\, 0 \leq x \leq L, \,\, t>0$$ $$u(x,0) = f(x)$$ $$u(0,t) = u(L,t) = 0.$$
Using separation of variables, I get the solution to be $$u(x,t) = \sum_{n=1}^{\infty} C_ne^{\frac{n^2\pi^2}{L^2}Dt}\sin\left(\frac{n\pi x}{L}\right) \text{ where } C_n = \frac{2}{L}\displaystyle \int_0^L f(x)\sin\left(\frac{n \pi x}{L}\right).$$
The Fundamental solution to the Heat Equation on the other hand is $$u(x,t) = \frac{1}{\sqrt{4\pi Dt}} \int_{-\infty}^{\infty} e^{-(x-y)^2/4Dt}f(y) \, dy$$ And then using Fourier Transforms gives the same answer as the Fundamental solution.
Is it just the case that the latter two are for solving the heat equation where $x$ is unbounded (and so there are no boundary conditions)?
And then is it the case that the solution is only unique when $x$ is bounded (and so the Fourier series separation of variables solutoin is unique for the problem it is solving, but the other two methods don't provide unique solutions for the problems they're solving?)