Fourier 变换

从 Fourier 积分的角度

Fourier 积分公式 `f(x) = int_-oo^oo int_-oo^oo f(t) "e"^(2pi"i" xi (x-t)) dt "d"xi`. (指数形式) `f(x) = int_-oo^oo int_-oo^oo f(t) cos 2pi xi(x-t) dt "d"xi`. (实形式)

将函数 `f(x)` 在 `[-l, l]` 上展开为 Fourier 级数 `f(x) = sum_(n=-oo)^oo hat(f)(n) "e"^(2 pi"i" n x // 2l)`, `quad hat(f)(n) = 1/(2l) int_-l^l f(t) "e"^(-2 pi"i" n t // 2l) dt`. 记 `xi_n = n//2l`, 于是 `f(x) = sum_(n=-oo)^oo 1/(2l) int_-l^l f(t) "e"^(2pi"i" xi_n (x - t)) dt`. 当 `l to oo` 时, 用 Riemann 积分的定义将上式写为积分, 就得到 Fourier 积分公式的指数形式. 利用 Euler 公式有 `"e"^(2pi"i"xi(x-t)) = cos 2pi xi (x-t) + "i" sin 2pi xi (x-t)`. 第二项是关于 `xi` 的奇函数, 它在 `(-oo, oo)` 上的积分为零. 从而得到 Fourier 积分公式的实形式.

Fourier 变换 由 Fourier 积分公式立即得到, `f(x) = int_-oo^oo (int_-oo^oo f(t) "e"^(-2pi"i" xi t) dt) "e"^(2pi"i"xi x) "d"xi`. 括号内的积分记为 `hat(f)(xi)`, 有 `hat(f)(xi) = int_-oo^oo f(x) "e"^(-2pi"i"xi x) dx`, `quad f(x) = int_-oo^oo hat(f)(xi) "e"^(2 pi"i"xi x) "d"xi`. 两个公式分别为 Fourier 变换及其逆变换.

    Fourier 正余弦变换及其逆变换
  1. 余弦变换: `f` 为偶函数时, `f_c(xi) = int_-oo^oo f(x) cos 2pi xi x dx`, `quad f(x) = int_-oo^oo f_c(xi) cos 2pi xi x "d"xi`.
  2. 正弦变换: `f` 为奇函数时, `f_s(xi) = int_-oo^oo f(x) sin 2pi xi x dx`, `quad f(x) = int_-oo^oo f_s(xi) sin 2pi xi x "d"xi`.

利用 Fourier 积分公式的实形式, `f(x) = int_-oo^oo int_-oo^oo f(t) cos 2pi xi(x-t) dt "d"xi` `= int_-oo^oo int_-oo^oo f(t) cos 2pi xi x cos 2pi xi t dt "d"xi` `+ int_-oo^oo int_-oo^oo f(t) sin 2pi xi x sin 2pi xi t dt "d"xi`. `f` 为偶函数时, 上式第二项为零, 得到: `f(x) = int_-oo^oo cos 2pi xi x "d"xi int_-oo^oo f(t) cos 2pi xi t dt`. 同理 `f` 为奇函数时, 上式第一项为零, 得到: `f(x) = int_-oo^oo sin 2pi xi x "d"xi int_-oo^oo f(t) sin 2pi xi t dt`.

从 Stein 的角度

设 `f(x) in L(-oo, oo)`, 则积分 `hat(f)(xi) = int_(-oo)^oo f(x)"e"^(-2 pi"i" x xi) dx` 有意义, 称为 `f(x)` 的 Fourier 变换或 Fourier 变式. 工程上, 常把 `x` 的定义域称为时域, `xi` 的定义域称为频域. 本节的主要目标是证明下面这个优美的 Fourier 反演公式: `f(x) = int_(-oo)^oo hat(f)(xi) "e"^(2 pi "i" x xi) "d"xi`. 上式称为 Fourier 逆变换, 它与 Fourier 变换仅在 `"e"` 的指数相差一个符号.

`L(-oo, oo)` 表示在 `(-oo, oo)` 上可积函数的全体. 下面无特别说明时, 总假定进行 Fourier 变换的函数是属于 `L(-oo, oo)` 的.

    Fourier 变换的运算性质 我们用 `f ~ hat f` 表示 `hat f` 是 `f` 的 Fourier 变换.
  1. 线性性质: `a f + b g ~ a hat f + b hat g`;
  2. 位移性质: `f(x) "e"^(-2 pi "i" h x) ~ hat(f)(xi + h)`, `h in RR`;
  3. 延时性质: `f(x + h) ~ "e"^(2 pi "i" h xi) hat(f)(xi)`, `h in RR`;
  4. 伸缩性质: `f(delta x) ~ hat(f)(xi//delta)//delta`, `delta gt 0`;
  5. 对称性质: 若 `f(-x) = g(x)`, 则 `hat(f)(-xi) = hat(g)(xi)`;
  6. 微分性质: `f'(x) ~ 2 pi "i" xi hat(f)(xi)`, 其中 `f'` 在 `(-oo, oo)` 上连续且可积;
  7. 乘多项式: `-2 pi "i" x f(x) ~ hat(f)'(xi)`;
  8. 卷积性质: `f ** g ~ hat f hat g`, 其中 `(f ** g)(x) = int_(-oo)^oo f(x-t) g(t) dt` `in L(-oo, oo)`.

和 Laplace 变换类似, Fourier 变换将微分运算化为乘多项式, 从而为计算带来便利.

Gauss 函数在 Fourier 变换下不变 设 `f(x) = "e"^(-pi x^2)`, 则 `hat(f)(xi) = f(xi)`.

    注意到 `f` 满足微分方程 `f'(x) = -2 pi x f(x)`, `f(0) = 1`. 下面证明 `hat f` 满足同样的方程:
  1. 由 Poisson 积分, `hat(f)(0) = int_(-oo)^oo f(x) dx` `= int_(-oo)^oo "e"^(-pi x^2) dx` `= 1`.
  2. 由 Fourier 变换的运算性质及 `f'(x) = -2 pi x f(x)`, `hat(f)'(xi) = -2 pi "i" * widehat(x f(x))` `= "i" * widehat(f'(x))` `= -2 pi xi hat(f)(xi)`.

`hat(f)(y)` `= int_-oo^oo "e"^(-pi x^2 - 2 pi "i"x y) dx` `= "e"^(-pi y^2) int_-oo^oo "e"^(-pi(x+"i"y)^2) dx`. 利用 Cauchy 积分公式构造矩形围道, 上式中的积分等于 `int_-oo^oo "e"^(-pi x^2) dx = 1`.

    好的核函数 令 `K_delta(x) = 1/sqrt delta "e"^(-pi x^2//delta)`, `G_delta(x) = "e"^(-pi delta x^2)`, 两个函数互为 Fourier 变换. `K_delta` 是一个好的核函数:
  1. `int_(-oo)^oo K_delta(x) dx = 1`;
  2. `int_(-oo)^oo |K_delta(x)| dx lt oo`;
  3. `AA epsi gt 0`, `lim_(delta to 0) int_(|x| gt epsi) |K_delta(x)| dx = 0`.

若 `K_delta(x)` 是一族好的核函数, 则 `delta to 0` 时 `(f ** K_delta)(x)` 一致收敛到 `f(x)`.

内积公式 `(f, hat g) = (g, hat f)`, 换言之 `int_(-oo)^oo f(x) hat(g)(x) dx` `= int_(-oo)^oo hat(f)(y) g(y) dy`.

积分换序的合理性由 Fubini 定理保证: `int_(-oo)^oo f(x) hat(g)(x) dy dx` `= int_(-oo)^oo f(x) int_(-oo)^oo g(y) "e"^(-2 pi i x y) dy dx` `= int_(-oo)^oo g(y) int_(-oo)^oo f(x) "e"^(-2 pi i x y) dx dy` `= int_(-oo)^oo g(y) hat(f)(y) dy`.

Fourier 逆变换 若 `f(x) in L(-oo, oo) nn C^1(-oo, oo)`, 则有反演公式: `f(x) = "P.V." int_(-oo)^oo hat(f)(xi) "e"^(2 pi "i" x xi) "d" xi` 其中积分取 Cauchy 主值: `"P.V." int_(-oo)^oo = lim_(A to oo) int_(-A)^A`.

  1. 先证公式对 `x = 0` 成立. 令 `K_delta(x) = 1/sqrt delta "e"^(-pi x^2//delta)`, `G_delta(x) = "e"^(-pi delta x^2)`. 注意到两个函数互为 Fourier 变换, 应用内积公式有 `int_(-oo)^oo f(x) K_delta(x) dx` `= int_(-oo)^oo hat(f)(xi) G_delta(xi) "d"xi`. 两边令 `delta to 0`, 由于 `K_delta` 是好的核函数, 上式左边趋于 `f(0)`; 而上式右边趋于 `int_(-oo)^oo hat(f)(xi) "d"xi = 1`.
  2. 一般情形, 记 `F(y) = f(y + x)`, 平移得 `f(x) = F(0) = int_(-oo)^(oo) hat(F)(xi) "d"xi` `= int_(-oo)^oo hat(f)(xi) "e"^(2 pi "i" x xi) "d"xi`.

Mellin 变换

函数 `f(x)`, `x gt 0` 的 Mellin 变换为 `F(s) = int_0^oo x^(s-1) f(x) dx`, `quad "Re"s gt sigma_0`.

当 `f` 在任一有限区间上有界变差, 且 `F(s)` 绝对收敛时, Mellin 变换的反转公式是 `bar(f)(x) = 1/(2pi"i") lim_(A to oo) int_(sigma-"i"A)^(sigma+"i"A) x^-s F(s) "d" s`, 其中 `sigma = "Re" s gt sigma_0`, `bar(f)(x) = (f(x+0) + f(x-0))/2`. 由于 `f` 在任一有限区间有界变差, 因而处处有左右极限, 故 `bar f` 存在.

换元 `x = "e"^(2 pi u)` 得 `F(s) = int_(-oo)^oo "e"^(2 pi u (s-1)) f("e"^(2pi u)) 2pi"e"^(2 pi u) "d"u` `= int_(-oo)^oo 2pi"e"^(2 pi u s) f("e"^(2pi u)) "d"u`. 记 `s = sigma + "i"tau`, 应用 Fourier 变换的反转公式得 `2 pi "e"^(2 pi u sigma) bar(f)("e"^(2pi u))` `= lim_(A to oo) int_(-A)^A F(sigma + "i"tau) "e"^(-2pi"i"u tau) "d"tau`. 再换回 `x = "e"^(2 pi u)` 即得第一式.

Laplace 变换

函数 `f(t)`, `t gt 0` 的 Laplace 变换为 `cc L[f(t)] = F(s) = int_0^oo "e"^(-s t) f(t) dt`, `quad "Re"(s) gt sigma_0`. 下文将 `f(t)` 和它的 Laplace 变换简记为 `f ~ F`.

导数变多项式 若 `x(t) ~ X(s)`, 则 `x'(t)` 的 Laplace 变换存在, 且有 `x'(t) ~ s X(s) - x(0)`. 由归纳法知 `x^((n+1))(t) ~ s^(n+1) X(s) - sum_(k=0)^n x^((n-k))(0) s^k`, Laplace 变换将求导化为多项式, 大大简化了运算. 这个性质可以与 Fourier 变换相比较.

    Laplace 变换的运算性质
  1. 线性性质: `cc L[a f(t) + b g(t)] = a F(s) + b G(s)`;
  2. 位移性质: `cc L["e"^(-a t) f(t)] = F(s + a)`;
  3. 延时性质: `cc L[f(t - tau)] = "e"^(-tau s) F(s)`;
  4. 伸缩性质: `cc L[f(delta t)] = F(s/delta)//delta`, `delta gt 0`;
  5. 微分性质: `cc L[f'(t)] = s F(s) - f(0)`;
  6. 积分性质: `cc L[f^((-1))(t)] = (F(s))/s + (f^((-1))(0))/s`; `f^((-1))` 是 `f` 的原函数;
  7. 频域微分性质: `cc L[t f(t)] = -F'(s)`;
  8. 频域积分性质: `cc L[f(t)//t] = int_s^oo F(u) "d"u` (积分换序可证);
  9. 卷积性质: `cc L[f(t) ** g(t)] = F(s) G(s)`;
  10. 初值性质: `f(0^+) = lim_(s to oo) s F(s)`;
  11. 终值性质: `f(oo) = lim_(s to 0^+) s F(s)`;

Laplace 逆变换 当 `f` 在任一有限区间上有界变差时, Laplace 变换的反转公式为 `bar(f)(t) = 1/(2 pi "i") int_(sigma-"i" oo)^(sigma+"i"oo) "e"^(s t) F(s) "d"s`, 其中 `sigma = "Re" s gt sigma_0`, `bar(f)(t) = { (f(x+0) + f(x-0))//2, x gt 0; f(0_(+)) // 2, x = 0; 0, x lt 0 :}` 积分取主值, 即 `int_(sigma-"i"oo)^(sigma"i"oo) = lim_(A to oo) int_(sigma-"i" A)^(sigma+"i" A)`. Laplace 逆变换亦可用留数求得: `bar(f)(t) = sum "Res " "e"^(s t) F(s)`.

在 `(-oo, 0]` 上定义 `f(x) -= 0`. 令 `s = sigma + "i"tau`, `x = 2pi u` 得 `F(sigma + "i"tau) = int_(-oo)^oo "e"^(-sigma x) "e"^(-"i"tau x) f(x) dx` `= 2pi int_(-oo)^oo "e"^(-2pi sigma u) "e"^(-2pi"i"tau u) f(2pi u) "d"u`. 应用 Fourier 逆变换公式得 `2 pi "e"^(-2pi sigma u)` `= lim_(A to oo) int_(-A)^A int_(-oo)^oo F(sigma + "i"tau) "d"tau`. 整理即得结论.

常见函数的 Laplace 变换 设 `p gt 0`, `z in CC`, `"Re"(s) gt "Re"(z)`, 则 `t^(p-1) "e"^(z t) ~ (Gamma(p))/(s-z)^p`. 特别 `"e"^(z t) ~ 1/(s-z)`. 令 `z = a "i"`, 分别取实部虚部得 `cos a t ~ s/(s^2+a^2)`, `quad sin a t ~ a/(s^2+a^2)`. 更完整的表格参见附录.

用 Laplace 变换解方程 `sum_(k=0)^n a_k x^((k))(t) = f(t)`. 记 `x(t) ~ X(s)`, `f(t) ~ F(s)`, Laplace 变换将方程变为 `X(s) sum_(k=0)^n a_k s^k`
`= F(s) + sum_(k=0)^n a_k sum_(j=0)^(k-1) x^((j))(0) s^(k-1-j)`
`= F(s) + sum_(j=0)^(n-1) x^((j))(0) sum_(k=j+1)^n a_k s^(k-1-j)`
`= F(s) + sum_(j=1)^n x^((j-1))(0) sum_(k=j)^n a_k s^(k-j)`.
记 `p_j(x) = sum_(k=j)^n a_k s^(k-j)`, 上式可以写成 `X(s) p_0(s) = F(s) + sum_(j=1)^n x^((j-1))(0) p_j(s)`. 解出 `X(s)` 后, 适当分解分式, 再作 Laplace 逆变换解出 `x(t)`

用 Laplace 变换解: `{ x'' + a^2 x = f(t); x"|"_(t=0) = x_0; x'"|"_(t=0) = x'_0; :}`

对方程两边作 Laplace 变换得 `X(s) (s^2+a^2) = x_0 s + x_0' + F(s)`,
作 Laplace 逆变换得 `x = x_0 cos at + (x_0')/a sin at + int_0^t f(tau) sin [a(t-tau)]"d"tau`.

    Dirichlet 积分 [来自 flyingczx] `a gt 0` 时,
  1. `cc L[(sin a t)/t] = arctan(a/s)`;
  2. 取 `s = 0` 有 `int_0^oo (sin a t)/t dt = pi/2`.
  3. 显然 `a lt 0` 时结论取负号.

利用频域积分性质和伸缩变换, 我们有 `cc L[(sin a t)/t]` `= int_s^oo cc L[sin a t] "d"u` `= int_s^oo (1//a)/(1 + (u//a)^2) "d"u` `= pi/2 - arctan(s/a)` `= arctan(a/s)`.

对 `I(a) = int_0^oo (sin a t)/t dt` 作 Laplace 变换得 `cc L_a[I(a)] = int_0^oo t/(s^2+t^2) dt/t` `= pi/2 1/s`. 两边再作 Laplace 逆变换得 `I(a) = pi/2`.

    Laplace 积分 [来自 Aries]
  1. 积分换序可证分部 Laplace 变换公式: `int_0^oo f(t) G(t) dt = int_0^oo F(s) g(s) "d"s`;
  2. `a, b gt 0`, 则 `I(a, b) = int_0^oo t/(t^2+a^2) sin b t dt` `= int_0^oo cos a t (b dt)/(t^2+b^2)` `= pi/2 "e"^(-a b)`.

对参数 `a` 求导两次, `pp {::} a I(a, b)` `= -b int_0^oo t/(t^2+b^2) sin a t dt` `= -b int_0^oo (1 - b^2/(t^2+b^2)) (sin a t)/t dt` `= -b pi/2 + b^2 int_0^oo b/(t^2+b^2) (sin a t)/t dt`,
`pp^2 {::} a I(a, b)` `= b^2 int_0^oo b/(t^2+b^2) cos a t dt` `= b^2 I(a, b)`.
于是得到常微分方程 `pp^2 {::} a I(a, b) = b^2 I(a, b)`, `quad I(0, b) = pi/2`, `pp {::} a I(0, b) = -b pi/2`. 解得 `I(a, b) = pi/2 "e"^(-a b)`.

作 Laplace 变换, `cc L_a[I(a, b)]` `= int_0^oo s/(s^2 + t^2) b/(t^2+b^2) dt` `= (s b)/(b^2-s^2) int_0^oo (1/(s^2+t^2) - 1/(t^2+b^2)) dt` `= pi/2 1/(s+b)`. 再作逆变换得 `I(a, b) = pi/2 "e"^(-a b)`.

  1. `int_0^oo "e"^(-t x^2)/(1+x^2) dx = pi/2 "e"^t "erfc"sqrt t`, `t gt 0`;
  2. `cc L["e"^t "erfc"sqrt t] = 1/sqrt s - 1/sqrt(s + 1)`.
  1. 左边记为 `I(t)`, 积分号下求导, `I'(t) = int_0^oo (-x^2 "e"^(-t x^2))/(1+x^2) dx` `= I(t) - int_0^oo "e"^(-t x^2) dx` `= I(t) - 1/2 sqrt(pi/t)`. 上述常微分方程通解为 `I(t) = sqrt pi "e"^t int_(sqrt t)^c "e"^(-y^2) dy`. 代入 `I(0) = pi/2` 知 `c = +oo`.
  2. 左边等于 `cc L[2/pi I(t)]` `= 2/pi int_0^oo 1/(x^2+1) dx/(x^2+s)` `= 2/pi int_0^oo (1/(x^2+1) - 1/(x^2+s))dx` `= 1/sqrt s - 1/(sqrt s + 1)`.
    [stack exchange], `gamma` 为 Euler 常数:
  1. `int_0^oo sin x/x ln x dx = -pi/2 gamma`;
  2. `int_0^oo sin x/x ln^2 x dx = pi/2 gamma^2 + pi^3/24`.
  1. 因为 `cc L^-1[ln s / s] = -gamma-ln t`, `cc L [sin t] = 1/(s^2+1)`. 运用分部 Laplace 公式, `int_0^oo ln x / x sin x dx` `= int_0^oo (-gamma - ln x) dx/(x^2+1)`. 第一项为 `-pi/2 gamma`, 我们来说明第二项为零. 事实上 `int_0^oo ln x/(x^2+1) dx` `= int_0^1 + int_1^oo`, 第二项倒代换 `x mapsto 1//x` 后恰与第一项抵消.
  2. 和上题思路类似. 因为 `cc L[ln^2 t]` `= 1/s(Gamma''(1)+2gamma ln s+ ln^2 s)`, 所以 `cc L^-1[(ln^2 s)/ s]` `= ln^2 t - Gamma''(1) + 2gamma (gamma+ln t)`. 利用 digamma 函数 `psi(s) = Gamma'(s)//Gamma(s)`, 可写出 `Gamma''(1) = psi'(1) + psi(1)^2` `= pi^2/6 + gamma^2`. 原式等于 `int_0^oo (ln^2 t)/(t^2+1) dt` `+ pi/2(2gamma^2-Gamma''(1))` `= I + pi/2(2gamma^2-gamma^2-pi^2/6)`. 最后这个 `I = pi^3/8`, 证明参见这里.