Background Information:
I am using the book Partial Differential Equations by Walter A. Strauss. In chapter $5$ section $6$ the author solves the diffusion equation with sources at the endpoints. $$u_t = k u_{xx} \ \ 0<x<l, t>0$$ $$u(0,t) = h(t) \ \ \ \ \ u(l,t) = j(t)$$ $$u(x,0) = 0$$ He starts off by saying for each $t$ we certainly can expand $$u(x,t) = \sum_{n=1}^{\infty} u_n(t)\sin \frac{n\pi x}{l}$$ for some coefficients $u_n(t)$ given by $$u_n(t) = \frac{2}{l}\int_{0}^{l}u(x,t)\sin \frac{n\pi x}{l}dx$$ He stats that the initial condition requires $u_n(0) = 0$. Then he proceeds to solve the problem where we arrive at the solution $$u_n(t) = C e^{-\lambda_n kt} - 2n\pi l^{-2}k \int_{0}^{t} e^{-\lambda_n k(t-s)}[(-1)^n j(s) - h(s)] ds$$
Question:
Solve the inhomogeneous system: $$\begin{cases} u_t = u_{xx} \ \ \text{for} \ \ 0 < x < 1, t > 0\\ u(0,t) = e^{t}\\ u(1,t) = 0\\ u(x,0) = \sin(\pi x) \end{cases}$$
Now this problem seems similar to what the author did but the initial condition here is $u(x,0) = \sin(\pi x)$ so I am not exactly sure how to proceed. Any suggestions are greatly appreciated.
With the method of separation of variables and Fourier series for the fitting to the boundary equations :
Or, on another equivalent form : $$u(x,t)=\left(-\frac{\cosh(1)}{\sinh(1) }\sinh(x)+\cosh(x) \right)e^t +\sin(\pi x)e^{-\pi^2 t} -\sum_{k=1}^{\infty}{\frac{2k\pi}{\pi^2k^2+1}\sin(k\pi x)e^{-\pi^2k^2 t} }$$