While Fourier series solve heat equation on a finite interval, can Fourier transform solve heat equation on infinite line?

Consider the heat equation with initial value $$f$$ $$\frac{\partial u}{\partial t}=\frac{\partial^2 u}{\partial x^2},\ \ \ u(x,0)=f(x).$$ We look at two cases, one with $$x\in[-\pi,\pi]$$ (heat equation in a finite interval), another with $$x\in\Bbb R$$ (heat equation in infinite line).

In the case where we attempt to solve heat equation in a finite interval, we can first decompose the initial value function $$f$$ into Fourier series $$f(x)=c+\sum_{n=1}^{\infty}a_n\sin(nx)+b_n\cos(nx)$$ and then use this Fourier series to solve the heat equation as $$u(x,t)=c+\sum_{n=1}^{\infty}(a_n\sin(nx)+b_n\cos(nx))e^{-n^2t}\label{a}\tag{1}$$ (let's not worry about boundary values).

As for the case of heat equation on infinite line, I am thinking of using Fourier transform the same way Fourier series solve heat equation on finite interval.

My understanding of Fourier transform is that it does the same thing as Fourier series: to decompose a function as "sum" of sine and cosine waves (or $$e^{ikx}$$), just that Fourier series is applied to functions on a finite interval, while Fourier transform is applied to functions on infinite line that decay fast enough at infinity. The "coefficient" of the term $$e^{2\pi ikx}$$ is obtained by doing "inner product" of $$f(x)$$ and $$e^{2\pi ikx}$$, that $$\hat f(k)=\int_{-\infty}^{\infty} f(x)e^{-2\pi ikx}dx$$ is the coefficient of the term $$e^{2\pi ikx}$$. From these "coefficients", the function $$f$$ is written as a "series" $$f(x)=\int_{-\infty}^{\infty}\hat f(k)e^{2\pi ikx}dk.$$

Like how $$\sin(nx)$$ and $$\cos(nx)$$ provide easy solutions $$\sin(nx)e^{-n^2t}$$ and $$\cos(nx)e^{-n^2t}$$ to the heat equation, the functions $$e^{2\pi ikx}$$ also provide easy solutions $$e^{2\pi ikx}e^{-4\pi^2k^2t}$$ to the heat equation.

With my concept of Fourier transform, can we do something to the representation $$f(x)=\int_{-\infty}^{\infty}\hat f(k)e^{2\pi ikx}dk$$ to obtain a solution to the heat equation on infinite line with initial condition $$f$$? Like, would $$u(x,t)=\int_{-\infty}^{\infty}\hat f(k)e^{2\pi ikx}e^{-4\pi^2k^2t}dk$$ be a solution to the problem? (I just copied what we did at equation $$(\ref{a})$$)

• This is often how the heat equation solution on an infinite line is derived, in fact! – Cameron Williams Jul 4 '19 at 18:11

Yes, you can represent $$u(x,t)= \int_{-\infty}^{\infty}C(s,t)e^{isx}ds.$$ The condition $$u(x,0)=f(x)$$ gives $$f(x)=\int_{-\infty}^{\infty}C(s,0)e^{isx}ds$$ or $$C(s,0)=\frac{1}{2\pi}\int_{-\infty}^{\infty}f(x)e^{-isx}dx.$$ and $$u_{t}-u_{xx}=0 \implies \int_{-\infty}^{\infty}(C_t(s,t)+s^2C(s,t))e^{isx}dx = 0 \\ \implies C_t(s,t)=-s^2C(s,t) \\ \implies C(s,t)=e^{-ts^2}C(s,0) \\ \implies C(s,t)=e^{-ts^2}\frac{1}{2\pi}\int_{-\infty}^{\infty}f(x)e^{-isx}dx$$ Finally, $$u(x,t)=\int_{-\infty}^{\infty}\left(e^{-ts^2}\frac{1}{2\pi}\int_{-\infty}^{\infty}f(y)e^{-isy}dy\right)e^{isx}ds \\ =\frac{1}{2\pi}\int_{-\infty}^{\infty}f(y)\int_{-\infty}^{\infty}e^{-ts^2}e^{is(x-y)}dsdy$$