I need to solve this problem according to these conditions where $0\leq x \leq \pi, 0\leq t$: $$u_{t}=u_{xx} \\ u(0,t)=u(\pi,t)=0 \\ u(x,0)=\sin(x)+3\sin(2x)+2\sin(5x)$$
I'm pretty sure I need separation of variables: $$u(x,t)=X(x)T(t)$$
I've been able to solve for a constant $\lambda$ such that:
$$\frac{T'}{T}=\frac{X''}{X}=\lambda \text{ where } \lambda = -\beta^{2}\\ X(x)=c_{1}\cos(\beta x)+c_{2}\sin(\beta x) \\ \Rightarrow \beta=n \\ \Rightarrow\lambda=-(n)^{2} \\ X_{n}=\sin(nx)$$ And I've gotten to solving for $T(t)$: $$ T'+ n^{2}T=0 \\ T_{n}(t)=e^{-n^{2}t} \\ X(x)T(t)=\sum_{n=1}^{\infty}e^{-n^{2}t}\sin(nx)$$
But this doesn't converge when $t=0$ so this can't be the answer. Where have I made a mistake? Thank you for your help.