I need some help on the following PDE using separation of variables:
$$\frac {\delta U}{\delta t}+U =\frac {\delta^2U}{\delta x^2 }, 0<x<\pi, t>0 $$ Given that $$ U(0,t)=U(\pi,t)=0, t>0 $$ $$U(x,0)=x(\pi-x), 0<x<\pi$$ My attempt, let; $$ U = X T $$ Then $$ XT'+XT=X''T $$ $$\frac {T'+T}{T}=\frac{X''}{X}=-k^2 $$ Solving ODE with $X$ $$X(x)=A\cos kx+B\sin kx$$ $$X(0)=A=0$$ $$X(\pi)=B\sin k\pi=0$$ $B=0$ or $\sin k\pi=0$ take the non trivial case $\sin k\pi=0$ $$k=n, n=1,2,3....$$ $$X(x)=B\sin nx$$ Solving ODE with $T$ $$\frac {T'+T}{T}=\frac{T'}{T}+1=-k^2 $$ $$T(t)=Ce^{-t(n^2+1)}$$ $$U(x,t)=B\sin nx \cdot Ce^{-t(n^2+1)}, BC=C$$ By the principle of superposition: $$U(x,t) = \sum C_n \sin nx \cdot e^{-t(n^2+1)}, $$ $$U(x,0) = \sum C_n \sin nx = x(\pi-x)$$ And now solve using fourier sine series. If this is complete garbage could somebody point me in the right direction or perhaps where I have gone wrong only just started PDE's so would be nice to have some constructive input, thanks as always and feel free to edit my late night mistakes.