I want to show that $$u(x,t)=\sum e^{-\lambda_n^2t}\langle f,u_n\rangle u_n(x)$$ where, $$u_n(x)=\sqrt{\frac{2}{l}} \sin(\frac{n\pi x}{l})$$ and, $$\lambda_n=\frac{n \pi c}{l}$$
satisfies
$$\frac{\partial u}{\partial t} = c^2 \frac{\partial^2 u}{\partial x^2}, 0\leq x\leq l$$ $$u(x,0)=f(x)$$
I explicitly want to show that $u(x,t)$ satisfies the given differential equation. However, I am not sure how I can interchange derivative and summation.
Any help is appreciated.
Edit: $f \in L^2[0,l]$ such that $f(0)=f(l)=0$.
Since $f\in L^2$, the Fourier coefficients $\langle f,u_n\rangle$ are bounded, say $|\langle f,u_n\rangle|\le M$. Fix $t_0>0$. Then $$ \bigl|e^{-\lambda_n^2t}\,\langle f,u_n\rangle\, u_n(x)\bigr|\le M\,\sqrt{\frac2l}\,e^{-\lambda_n^2t_0}. $$ It follows that $$ \sum e^{-\lambda_n^2t}\,\langle f,u_n\rangle\, u_n(x) $$ converges uniformly on $[0,l]\times[t_0,\infty)$. The same can be said of the series obtained tagging derivatives inside the sum. This implies that the function defined by the series is $C\infty$ on $0,l=\times(0,\infty)$ and can be derived any number of times inside the sum.