Solve the following problem $$\frac{\partial^2 u}{\partial x^2}=\frac{\partial u}{\partial t}-2x$$ subject to $u(0,t)=0$, $u(1,t)=0$ and $u(x,0)=x(1-x)$ where $0<x<1$ and $t>0$.
I have two separate questions on this problem. First is, can we use Duhamel's principle to solve this problem? If yes, please explain the solution by this method. If no, why?
Second I will explain below :
Taking Laplace on both sides of given equation w.r.t. $t$ we get the partial solution as $$U(x,s)=-\frac{2}{s^2}\frac{\sinh ((x-1)\sqrt{s})}{\sinh (\sqrt{s})}+\frac{x(1-x)}{s}+\frac{2(x-1)}{s^2}$$ where $U(x,s)=\mathcal{L}(u(x,t);t\to s)$. But I am not able to calculate explicitly the Laplace inverse of first term of the above expression on RHS. Although I think the problem is not as hard as it looks in the Laplace transform approach rather than its Duhamel principle approach, if possible. Can someone suggest what is the best possible option to go between the above two? Thanks in advance.