Verifying Duhamel Principle for Heat Equation From separation of variables, we get a solution to the homogeneous problem for the heat equation $$u_t - u_{xx} = 0$$ $$u(0,t) = u(L,t) = 0$$ $$u(x,0) = f(x)$$
of the form $$u(x,t) = \int_0^L f(y) H(x,y,t) dy.$$ I'm trying to use this result to show that $$u(x,t) = \int_0^L f(y) H(x,y,t) dy + \int_0^t \int_0^L g(y,s) H(x,y,t-s) dy ds$$ is the solution to the non-homogenous problem with $$u_t - u_{xx} = g(y,t).$$
So far I've gotten that for $u$ defined in this way, \begin{equation*}u_t - u_xx = \int_0^t \int_0^L g(y,s) \left(H_t(x,y,t-s) - H_{xx}(x,y,t-s)\right) dy ds \\ + \int_0^L g(y,t) H(x,y,0) dy\end{equation*} where the last term comes from using Leibniz's rule for differentiating an integral with variable bounds when finding $u_t$. Obviously, I want to show that this equals $g(x,t)$, but I can't figure out how to proceed from here. Have I made a mistake somewhere? Is there a trick I'm not thinking of?
 A: Let's begin with the proposed solution
$$u(x,t)=\int_0^L f(y) H(x,y,t) dy + \int_0^t \int_0^L g(y,s) H(x,y,t-s) dy ds$$
Operating on both sides with the operator $\mathscr{L}$, where
$$\mathscr{L}=\frac{\partial \{\cdot \} }{\partial t}-\frac{\partial^2 \{\cdot \} }{\partial x^2}$$
reveals that 
$$\begin{align}
u_t - u_{xx} &= \int_0^t \int_0^L g(y,s) \left(H_t(x,y,t-s) - H_{xx}(x,y,t-s)\right) dy ds \\ &+ \int_0^L g(y,t) H(x,y,0) dy\\\\
&=\int_0^L g(y,t) H(x,y,0) dy
\end{align}$$
This last equality hold since we must have $\mathscr{L}\{H\}=H_t(x,y,t) - H_{xx}(x,y,t)=0$ for all $0\le x\le L$, $0\le y\le L$, and $0<t$.  We also have that 
$$\int_0^L g(y,t) H(x,y,0) dy=g(x)$$
as per the initial condition of the homogeneous problem.  Thus, 
$$u(x,t)=\int_0^L f(y) H(x,y,t) dy + \int_0^t \int_0^L g(y,s) H(x,y,t-s) dy ds$$
satisfies the PDE $\mathscr{u}=g(x,t)$.  The boundary and initial conditions are easy to verify using ($1$) $H(0,y,t)=H(L,y,t)=0$, and ($2$) $\int_0^L f(y,t) H(x,y,0) dy=f(x)$.
