# Heat equation and Fourier series

I am trying to solve the following boundary value problem involving the heat equation: $$\frac{\partial{u}}{\partial{t}} - \frac{1}{4} \frac{\partial^2{u}}{\partial{x}^2} = 0,\;\; t > 0 \text{ and } 0 < x < 1, \\ u(0,t) = u(1,t) = 0,\;\; t > 0, \\ u(x,0) = \sin{(2 \pi x)} - \frac{1}{3} \sin{(4 \pi x)}, \;\; 0 < x < 1.$$ I used separation of variables $$u(x,t) = X(x) T(t)$$ and got down to $$u(x,t) = \sum_{k=1}^{\infty} b_k e^{-\frac{1}{4} (k \pi)^2 t} \sin{(k \pi x)}$$ for some $$b_k$$.

My question is, how do I use the initial condition $$u(x, 0)$$ and finish this problem off by finding $$b_k$$? I assume I would have to use Fourier series on sine, but I'm not sure how to proceed with this. Any help is appreciated.

• The formula you have for $u(x,t)$ is not correct. Commented Aug 14, 2019 at 9:47
• I seem to be getting $X(x) = A \sin{(k \pi x)}$ and $T(t) = Be^{-\frac{1}{4} (k \pi)^2}$ for k = 1, 2, 3, .. after using separation of variables. What should the correct values be for $X(x)$ and $T(t)$? Commented Aug 14, 2019 at 9:51
• You are supposed to have a sequence $(b_k)$ instead of a single $b$. Commented Aug 14, 2019 at 9:53
• Thank you, have edited the post. I am still not sure how to find $b_k$, though. Commented Aug 14, 2019 at 9:55

Buy uniqueness of Fourier series expansions the expression for $$u(x,0)$$ gives $$b_2=1,b_4=-\frac 1 3$$ and $$b_k=0$$ for all other $$k$$.