Currently I'm working on this problem:
$$\frac{\partial u(x,t)}{\partial t}- \frac{\partial ^2u(x,t)}{\partial ^2x}=f(x,t)$$
$$u(0,t)=u(\pi,t)=0$$
$$u(x,0)=g(x)$$
I realize that because of my boundary conditions the solutions should be on this form:
$$u(x,t)=\sum_{k=1}^{\infty}u_k(t)\sin(kx)$$
But then they say, for the function f and g I can put them like:
$$f(x,t) =\sum_{k=1}^{\infty}f_k(t)\sin(kx)$$ $$g(x) =\sum_{k=1}^{\infty}g_k \sin(kx)$$
I don't understand the last part, why can I put $g$ and $f$ like that? Thanks in advance!