# Solution for the inhomogeneous 3D heat equation with initial temperature distribution

Can anyone describe the general solution for the inhomogeneous 3-dimensional heat equation:

$u_t = K\nabla^2u + \frac{1}{c\rho}f$, with initial condition $u(x, 0) = g(x)$, no boundary conditions.

where $K$ is thermal diffusivity, $c$ is specific heat capacity and $\rho$ is the density of the medium. $K,c$ and $\rho$ are constants.

I have tried to find the answer, but what i have found in books, wikipedia and the internet in general describe the general solution for the 1-dimensional case. Is there any (free) online resource that describes the solution ?

The solution is obtained with the multidimensional heat kernel \begin{align} (e^{t\nabla^2}f)(x) & = \frac{1}{(2\pi)^{2/n}}\int_{\mathbb{R}^n}\hat{f}(\xi)e^{-t|\xi|^2}e^{i\xi\cdot x}d\xi\\ & = \frac{1}{(4\pi t)^{n/2}}\int_{\mathbb{R}^n}f(y)e^{-|x-y|^2/4t}dy,\;\;\; x\in\mathbb{R}^n. \end{align} This exponential operator is a type of integrating factor. Let $t > 0$ be given. For $0 \le s \le t$, $$\frac{\partial}{\partial s}u(s,x) - K\nabla^2u(s,x)=\frac{1}{c\rho}f(x) \\ \frac{\partial}{\partial s}\left(e^{(t-s)K\nabla^2}u(s,x)\right)=\frac{1}{c\rho}e^{(t-s)K\nabla^2}f \\ \int_{0}^{t}\frac{\partial}{\partial s}\left(e^{(t-s)K\nabla^2}u(s,x)\right)ds=\frac{1}{c\rho}\int_{0}^{t}e^{(t-s)K\nabla^2}f(x)ds \\ u(t,x)-e^{tK\nabla^2}u(0,x) = \frac{1}{c\rho}\int_{0}^{t}e^{(t-s)K\nabla^2}f(x)ds \\ u(t,x)=e^{tK\nabla^2}u(0,x)+\frac{1}{c\rho}\int_{0}^{t}e^{(t-s)K\nabla^2}f(x)ds$$ Expanding everything, and using $u(0,x)=g(x)$, the solution becomes \begin{align} u(t,x) &= \frac{1}{(4\pi Kt)^{n/2}}\int_{\mathbb{R}^{n}}g(y)e^{-|x-y|^2/4Kt}dy\\ &+\frac{1}{c\rho}\int_{0}^{t}\frac{1}{(4\pi K(t-s))^{n/2}}\int_{\mathbb{R}^{n}}f(y)e^{-|x-y|^2/4K(t-s)}dyds. \end{align}
• I did not expect that the thermal diffusivity would disapear from the final solution !! So, the constant $K$ does not affect the final solution ?? Commented Jul 31, 2016 at 5:22