I have $$U(x,t)=\sum_{n=0}^\infty e^{-t}(A_n\cos(n\pi t)+B_n\sin(n\pi t))\sin(n\pi x) $$ By using the initial condition,
$$U(x,0)=0, A_n=0 \; ,0\le x\le 1$$ therefore $$U(x,t)=\sum_{n=0}^\infty e^{-t}(B_n\sin(n\pi t)\sin(n\pi x))$$
Using the other initial condition, $$U_t(x,0)=x(1-x)\;, 0\le x\le 1$$ This leads to $$x(1-x)=\sum_{n=0}^\infty n\pi B_n\sin(n\pi x))$$
So I use Fourier series to find $B_n$
$$\frac{2}{n\pi}\int_{0}^1x(1-x)\sin(n\pi x) dx$$ This gave me the answer $$B_n=\frac{-4\left((-1)^n-1\right)}{(n\pi)^4}$$
So does that mean $$U(x,t)=\sum_{n=0}^\infty e^{-t}\frac{-4((-1)^n-1)}{(n\pi)^4}\sin(n\pi t)\sin(n\pi x)$$ assuming all my calculations are correct?
What I don't understand is how finding the coefficient for $B_n$ after taking the partial derivative of $U(x,t)$ with respect to $t$ help find the $B_n$ for just $U(x,t)$.