# Solving the Heat Equation using the Fourier Transform

The Question:

Solve the Heat Equation (for $u = u(x,t)$)

$$\frac{\partial u}{\partial t} = \frac{\partial^2u}{\partial x^2} \qquad u(x,0)=T(x)$$

by applying the Fourier Transform in the $x$ variable, where the function $T$ is defined as

$$T(x) = \begin{cases} 1+\frac x2, & -2≤x≤0 \\ 1-\frac x2, & \; \; \, 0<x≤2 \\ 0 \quad \; \; \,, & \; \; \,\text{else}\end{cases}$$

My Attempt:

In the previous parts of the questions I have already found that

$$\hat T (s) = \frac{2}{s^2}\sin ^2(s) \qquad \text{and} \qquad \hat{q_t}(s) = e^{-s^2t}$$

where

$$q_t(x) = \frac{1}{\sqrt{4\pi t}}\exp \bigg(\frac{-x^2}{4t}\bigg)$$

Applying the Fourier Transform in the $x$ variable, the PDE becomes (for $\hat u =\hat u(s,t)$)

$$\frac{\partial \hat u}{\partial t} = -s^2 \hat u \qquad \hat u(s,0) = \frac{2}{s^2}\sin^2 (s)$$

Solving this, we get

$$\hat u(s,t) = \frac{2}{s^2}\sin ^2(s)e^{-s^2t} = \hat T(s) \hat {q_t}(s)$$

So by the Convolution Theorem, the solution should be

$$u(x,t) = \big(T*q_t\big)(x) = \int_{-\infty}^{\infty}T(\omega) q_t(x-\omega)\, d\omega$$

However, the answer says that the solution should be

$$u(x,t) = \frac{1}{\pi} \int_{-\infty}^{\infty}e^{-\omega^2t+ix\omega}\frac{\sin^2(\omega)}{\omega^2} \, d\omega$$

Can someone explain to me what I have done wrong?

You haven't done anything wrong. The answer's just left the solution in Fourier space, rather than applying the convolution theorem: you can see that your last displayed equation is the inverse Fourier transform $\frac{1}{2\pi} \int e^{ix\omega}f(\omega) \, d\omega$ applied to your $\hat{u}(s,t)$.