# Fourier transform of heat equation

I need to solve following partial differential equation with Fourier transform numerically.

$\frac{\partial T}{\partial t} = \nabla(c\nabla T)$

where T is temperature, c heat conductivity and t is time.

Now the problem is c itself has space dependence. Had it not been after Fourier transform equation would look like $\frac{\partial \tilde T}{\partial t} = -k^2c\tilde T$

How should Fourier transform of first equation look like?

What I am doing is as follows:

1. Take Fourier transform of T. Multiply corresponding values of c(in real space) and T (in Fourier space). i.e. evaluate $g = k\cdot i \cdot c \cdot\tilde T$

2. Take $g$ back to real space. Now $g = c\nabla T$

3. Take $g$ back to Fourier space . Evaulate $f = k \cdot i \cdot \tilde g$

4. Take $f$ to real space. Now $f$ should be $\nabla c \nabla T$

But results of the above procedure are not matching with Finite Difference approach. What am I missing here? Using convolution theorem seems difficult. Is using convolution theorem the only option?

Thanks for any help in advance

-
Why do you think it should match finite difference? Even if $c$ was constant I doubt they match. – timur Sep 2 '12 at 1:11
@timur, there is difference of nearly factor of two in the results of FFT and Finite difference. In sufficiently small time step results of FFT and Finite difference must be identical. – alekhine Sep 2 '12 at 5:02
I don't think the results are supposed to match. Here's why I think so. (I could be wrong.) If you use finite difference, which method do you use for the time variable? If you use an explicit method, the domain of influence/dependence of one cell is only limited to nearby cells in the case of finite difference. You expand the domain of influence/dependence of one cell to be the whole domain by taking Fourier transform. – Tunococ Sep 5 '12 at 6:43

To evaluate $\nabla(c\nabla T)$ in Fourier space, you need to do the following. Suppose that you are given $\hat T$, which is the Fourier image of $T$.

1. Compute $\hat g(k)=ik\hat T(k)$. This corresponds to real space gradient.
2. $g= \mathrm{IFT}\,\hat g$, the inverse Fourier transform.
3. $f=cg$.
4. $\hat f = \mathrm{FT}\,f$, the Fourier transform.
5. Compute $\hat r(k)=ik\cdot\hat f(k)$. Note the scalar product. This corresponds to real space divergence.
6. $r= \mathrm{IFT}\,\hat r$, the inverse Fourier transform.

Now you have $r = \nabla\cdot(c\nabla T)$. I think in practice, you don't need step 6, because the left hand side $\partial T/\partial t$ can be computed in Fourier space directly from $\hat T$. You can also write all the steps in one formula $$\frac{\partial\hat T}{\partial t} = ik\cdot\mathrm{FT} (c\cdot\mathrm{IFT}(ik\hat{T})).$$

-

Not sure why I can't comment below your question, so I'm posting a comment here: The fourier transform will be a convolution, which is a bit nasty to work with, i.e. you get that:

$$\mathcal{F}(c T) = \mathcal{F}(c) \star \mathcal{F}(T)$$

Here $\mathcal{F}(f) =$ Fourier transform of $f$. Note that

$$\mathcal{F}(c) \star \mathcal{F}(T) (s) = \int_{\infty}^{\infty} \mathcal{F}(c)(s - t) \mathcal{F}(T) (t) dt$$

This will couple all the Fourier modes together. In my humble opinion, the Fourier transform is going to be a bit nasty numerically, though maybe still do-able. Unfortunately, I am not able to suggest another alternative.

-
– dblazevski Aug 29 '12 at 19:10
thanks dblazevski. your explanation was useful. – alekhine Aug 29 '12 at 23:33
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9567960500717163, "perplexity": 459.64526625958206}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2016-07/segments/1454701162648.4/warc/CC-MAIN-20160205193922-00159-ip-10-236-182-209.ec2.internal.warc.gz"}