The solution of the nonhomogeneous problem
\[ \begin{cases} u_t - \Delta u = f & \text{in } \mathbb{R}^d \times (0,\infty),\\ u = g & \text{on } \mathbb{R}^d \times \{t = 0\}, \end{cases} \]for appropriate choices of \(f\) and \(g\) is given by
\[ u(x,t) \;=\; \int_{\mathbb{R}^d} \varphi(x - y,\,t)\,g(y)\,dy \;+\; \int_{0}^{t} \int_{\mathbb{R}^d} \varphi\bigl(x - y,\,t - s\bigr)\,f(y,s)\,dy\,ds, \]where \(\varphi\) is the fundamental solution of the heat equation .