4.7.20Partial Differential Equations
Convolution with Fourier transform
1,644 words7 min readdifficulty · medium1 backlinks
1. What is convolution?
WHAT it does: produces a new function that is a weighted blur of using as the weight. WHY it matters: it is the real-space partner of multiplication in frequency space. HOW to read : flip (the ) and shift it by .
2. The Fourier transform convention (fix it once)
We use
f(x) = \frac{1}{2\pi}\int_{-\infty}^{\infty} \hat f(k)\, e^{ikx}\, dk.$$ > [!mistake] The constant depends on convention! > A wrong-feeling-right trap: people memorize "$\mathcal F\{f*g\} = \hat f\hat g$" but forget a $2\pi$ appears for the **reverse** identity $\mathcal F\{fg\}=\frac{1}{2\pi}\hat f * \hat g$. *Why it feels right:* symmetry suggests both should be clean. *Fix:* the asymmetry comes from the $\frac{1}{2\pi}$ living only in the **inverse** transform in this convention. Track where the $2\pi$ lives. --- ## 3. Derivation of the Convolution Theorem (from scratch) > [!formula] Convolution Theorem > $$\boxed{\;\mathcal F\{f * g\}(k) = \hat f(k)\,\hat g(k)\;}$$ **Derivation — every step justified:** Start from the definition of the transform of $f*g$: $$\mathcal F\{f*g\}(k) = \int_{-\infty}^{\infty}\left[\int_{-\infty}^{\infty} f(u)\,g(x-u)\,du\right] e^{-ikx}\,dx.$$ *Why this step?* Just plug the convolution definition into the FT definition. Swap the order of integration (Fubini — valid since $f,g\in L^1$): $$= \int_{-\infty}^{\infty} f(u)\left[\int_{-\infty}^{\infty} g(x-u)\, e^{-ikx}\,dx\right] du.$$ *Why?* The double integral is absolutely convergent, so order swap is legal; we want to isolate the inner $x$-integral. Substitute $v = x-u \Rightarrow x = v+u,\ dx=dv$: $$\int_{-\infty}^{\infty} g(v)\, e^{-ik(v+u)}\,dv = e^{-iku}\int_{-\infty}^{\infty} g(v)\,e^{-ikv}\,dv = e^{-iku}\,\hat g(k).$$ *Why?* The shift just factors out a phase $e^{-iku}$; the remaining integral **is** $\hat g(k)$ by definition. Put back: $$= \int_{-\infty}^{\infty} f(u)\, e^{-iku}\,\hat g(k)\,du = \hat g(k)\int_{-\infty}^{\infty} f(u)\,e^{-iku}\,du = \hat g(k)\,\hat f(k). \qquad\blacksquare$$ *Why?* $\hat g(k)$ doesn't depend on $u$, pull it out; the leftover integral is $\hat f(k)$. **The deep reason it works:** the FT diagonalizes the shift operator. $e^{-ikx}$ are eigenfunctions of "shift by $u$" with eigenvalue $e^{-iku}$. Convolution is built entirely from shifts, so in the eigenbasis it becomes plain multiplication. ![[4.7.20-Convolution-with-Fourier-transform.png]] --- ## 4. Properties (and why each holds) > [!formula] Algebra of convolution > - Commutative: $f*g = g*f$ — *substitute $w=x-u$ to flip roles.* > - Associative: $(f*g)*h = f*(g*h)$ — *since transforms just multiply, and multiplication is associative.* > - Distributive: $f*(g+h)=f*g+f*h$. > - Identity: $f * \delta = f$ — *because $\hat\delta(k)=1$, so $\hat f\cdot 1=\hat f$.* > [!intuition] Why $\delta$ is the identity > Multiplying spectra by $1$ changes nothing. The function whose spectrum is constantly $1$ is the Dirac delta. So convolving with $\delta$ leaves everything unchanged — it's the "do nothing" blur. --- ## 5. Worked Examples > [!example] Example 1 — Convolution of two Gaussians > Let $f(x)=e^{-ax^2},\ g(x)=e^{-bx^2}$. Find $f*g$ using the theorem. > > **Step 1.** Known transform: $\mathcal F\{e^{-ax^2}\}=\sqrt{\pi/a}\,e^{-k^2/4a}$. > *Why?* Standard Gaussian FT (complete the square in the exponent). > > **Step 2.** Multiply transforms: > $$\widehat{f*g}=\sqrt{\tfrac{\pi}{a}}\sqrt{\tfrac{\pi}{b}}\,e^{-k^2/4a}e^{-k^2/4b}=\frac{\pi}{\sqrt{ab}}\,e^{-k^2\frac{a+b}{4ab}}.$$ > *Why?* Convolution theorem turns the messy integral into a product. > > **Step 3.** Recognize this as the transform of another Gaussian $C e^{-cx^2}$ with $\frac{1}{4c}=\frac{a+b}{4ab}\Rightarrow c=\frac{ab}{a+b}$. > > **Result:** $f*g = \sqrt{\dfrac{\pi}{a+b}}\; e^{-\frac{ab}{a+b}x^2}.$ > *Takeaway:* a Gaussian convolved with a Gaussian is a Gaussian — variances add (the heat kernel inherits this). > [!example] Example 2 — Heat equation via convolution > Solve $u_t = D u_{xx}$, $u(x,0)=f(x)$. > > **Step 1.** FT in $x$: $\hat u_t = -Dk^2 \hat u$. *Why?* $\mathcal F\{u_{xx}\}=(ik)^2\hat u=-k^2\hat u$. > > **Step 2.** Solve ODE in $t$: $\hat u(k,t)=\hat f(k)\,e^{-Dk^2 t}$. *Why?* Linear first-order ODE in $t$. > > **Step 3.** Product of transforms $\Rightarrow$ convolution in $x$: > $$u(x,t)=f * \mathcal F^{-1}\{e^{-Dk^2t}\} = f * G_t, \qquad G_t(x)=\frac{1}{\sqrt{4\pi Dt}}e^{-x^2/4Dt}.$$ > *Why?* $e^{-Dk^2t}$ is a Gaussian in $k$; its inverse FT is the **heat kernel** $G_t$. > > **Result:** $u(x,t)=\dfrac{1}{\sqrt{4\pi Dt}}\displaystyle\int_{-\infty}^{\infty} f(u)\,e^{-(x-u)^2/4Dt}\,du.$ The solution is the initial data *blurred* by a spreading Gaussian. > [!example] Example 3 — Box ∗ Box = triangle > Let $f=g=\mathbb 1_{[-1,1]}$ (indicator). Then $(f*g)(x)$ measures overlap length of two unit-half-width boxes shifted by $x$: a **triangle** of width 4, peak $2$ at $x=0$, zero for $|x|\ge 2$. *Why?* Overlap shrinks linearly as you slide them apart. This is why repeated convolution smooths spikes into bumps (and ultimately Gaussians — CLT!). --- ## 6. Active Recall > [!recall]- Quick self-test (cover answers) > - State the convolution integral. → $\int f(u)g(x-u)du$. > - What does $\hat f\hat g$ become in real space? → $f*g$. > - Why is $\delta$ the convolution identity? → $\hat\delta=1$. > - Heat kernel? → $\frac{1}{\sqrt{4\pi Dt}}e^{-x^2/4Dt}$. > [!recall]- Feynman: explain to a 12-year-old > Imagine you have a row of lamps (function $f$) and a fuzzy lens (function $g$). When you look through the lens, each lamp's light spreads out and blends with its neighbors — that blending is **convolution**. Now here's the magic: if instead of looking at lamps you look at their "musical notes" (frequencies, the Fourier transform), the fuzzy lens just turns each note's volume up or down by a fixed amount — that's simple **multiplication**. So a complicated blur in lamp-world is just turning knobs in note-world. To go back, you "un-listen" and the knob-turning becomes blurring again. > [!mnemonic] Remember it > **"Multiply in spectrum land = blur back home."** > And: **F**lip, **S**hift, **M**ultiply, **A**dd = the convolution recipe (FSMA). --- ## 7. Flashcards #flashcards/maths Define convolution $(f*g)(x)$. ::: $\int_{-\infty}^{\infty} f(u)g(x-u)\,du$ — flip $g$, shift by $x$, multiply, integrate. State the convolution theorem. ::: $\mathcal F\{f*g\} = \hat f \cdot \hat g$. Key derivation step that produces the phase factor. ::: Substituting $v=x-u$ gives $\int g(v)e^{-ik(v+u)}dv = e^{-iku}\hat g(k)$. Why does convolution become multiplication under FT? ::: The FT diagonalizes the shift operator; complex exponentials are its eigenfunctions, so shift-built operations multiply. What is the convolution identity element and why? ::: The Dirac delta $\delta$, because $\hat\delta(k)=1$ and multiplying by $1$ is no-op. Gaussian ∗ Gaussian result for $e^{-ax^2}*e^{-bx^2}$. ::: $\sqrt{\pi/(a+b)}\,e^{-\frac{ab}{a+b}x^2}$ (a Gaussian; precisions combine as $c=ab/(a+b)$). Heat kernel $G_t(x)$. ::: $\frac{1}{\sqrt{4\pi Dt}}e^{-x^2/4Dt}$, the inverse FT of $e^{-Dk^2t}$. Heat equation solution as a convolution. ::: $u(x,t)=f*G_t$, initial data blurred by a spreading Gaussian. Box ∗ box equals? ::: A triangle function (overlap length decreases linearly). Reverse identity $\mathcal F\{fg\}$ (with this convention). ::: $\frac{1}{2\pi}(\hat f * \hat g)$ — note the $2\pi$. --- ## 8. Connections - [[Fourier Transform]] — the engine; differentiation → multiplication. - [[Heat Equation]] — solved as data convolved with the heat kernel. - [[Dirac Delta Function]] — the convolution identity. - [[Gaussian Integral]] — needed for the Gaussian transforms. - [[Green's Functions]] — solution = source $*$ Green's function (same idea). - [[Central Limit Theorem]] — repeated convolution → Gaussian. - [[Parseval's Theorem]] — energy version of the same multiplication trick. ## 🖼️ Concept Map ```mermaid flowchart TD PDE[PDEs heat wave Laplace] -->|FT turns d/dx into x| ALG[Algebraic equations] ALG -->|solution appears as| PROD[Product of transforms] PROD -->|inverse needs| CONV[Convolution] CONV -->|defined as| DEF[Integral of f u times g x-u] DEF -->|meaning| SMEAR[Smearing weighted blur] FTCONV[FT convention with 2pi in inverse] -->|fixes constant| THM[Convolution Theorem] DEF -->|plug into FT def| DERIV[Derivation via Fubini and shift] DERIV -->|substitute v equals x-u| PHASE[Shift factors phase e^-iku] PHASE -->|yields| THM[F of f star g equals fhat ghat] THM -->|deep reason| DIAG[FT diagonalizes shift operator] FTCONV -->|reverse identity| REV[F of fg equals 1 over 2pi fhat star ghat] ``` ## 🔊 Hinglish (regional understanding) > [!intuition]- Hinglish mein samjho > Dekho, convolution ka matlab simple hai: ek function ko doosre se "smear" ya blur karna. Formula $(f*g)(x)=\int f(u)g(x-u)du$ — yahan $g$ ko flip karo, $x$ se shift karo, multiply karo, phir add (integrate) karo. Yeh PDEs mein bahut kaam aata hai, kyunki heat ya wave equation solve karte time answer aksar Fourier space mein ek product ki tarah aata hai — aur us product ka real-space meaning hi convolution hai. > > Magic point yeh hai: **Fourier transform lene par convolution multiplication ban jaata hai**, yaani $\mathcal F\{f*g\}=\hat f \cdot \hat g$. Iska reason deep hai — FT shift operation ko diagonalize karta hai, complex exponentials $e^{-ikx}$ uske eigenfunctions hain. Convolution sirf shifts ka combination hai, isliye frequency land mein woh sirf knob ghumana (multiply) ban jaata hai. Derivation mein bas $v=x-u$ substitute karo aur ek phase $e^{-iku}$ bahar nikal aata hai — wahi pura trick hai. > > Practical example: heat equation $u_t=Du_{xx}$. FT lo, $-Dk^2$ wala ODE banta hai, solution $\hat u=\hat f\,e^{-Dk^2t}$. Product hai na? Toh real space mein answer hai $u=f*G_t$, jahan $G_t$ ek spreading Gaussian (heat kernel) hai. Matlab initial temperature ko ek phailti hui Gaussian se blur kar diya — physics bilkul intuitive ho gayi. > > Yaad rakhne ka mantra: "Spectrum mein multiply = ghar wapas blur." Aur $\delta$ (Dirac delta) convolution ka identity hai kyunki uska transform $1$ hota hai — multiply by 1, kuch nahi badla. Bas itna pakka kar lo, exam mein convolution wale saare sawaal nikal jayenge. ![[audio/4.7.20-Convolution-with-Fourier-transform.mp3]]Test yourself — Partial Differential Equations
Connections
Fourier TransformBridge · Maths, Physics, Coding/CS, HardwareSolving heat equation — separation of variablesMaths · 4.7.9Heaviside step function and Dirac delta functionMaths · 4.6.31Central limit theoremAI-ML · 1.3.15Parseval's theoremMaths · 4.7.7Convolution theorem — proof, applicationsMaths · 4.6.32