傅里叶级数(FS)的推导

Yesterday was my 21st birthday, at that age Newton and Pascal had already acquired many claims to immortality. ------ Joseph Fourier

推导过程

我们在此直接给出 傅里叶级数(fourier series,FS) 的表达式(实值函数且区间在 <math xmlns="http://www.w3.org/1998/Math/MathML"> [ − π , π ] [-\pi,\pi ] </math>[−π,π]的情况下):
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> f ( x ) = 1 2 a 0 + ∑ n = 1 ∞ a n cos ⁡ ( n x ) + ∑ n = 1 ∞ b n sin ⁡ ( n x ) (1) f(x)=\frac{1}{2} a_0+\sum_{n=1}^{\infty} a_n \cos (n x)+\sum_{n=1}^{\infty} b_n \sin (nx)\tag{1} </math>f(x)=21a0+n=1∑∞ancos(nx)+n=1∑∞bnsin(nx)(1)

关于上式中傅里叶级数的基本描述是:对于任意一个周期函数(在满足一定条件的情况下)都可以被表示为正弦函数(sin)项和余弦函数(cos)项的无限和

接下来我们从探究的角度来思考如何将一个周期函数表示成有三角级数的无线和构成的傅里叶级数。

在傅里叶级数给出的预设场景下,我们的目的自然是使用正余弦函数来表示周期函数。考虑正余弦函数的标准形式即为:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> f ( t ) = A sin ⁡ ( w t + φ ) (2) f(t) = A\sin{(wt + \varphi)}\tag{2} </math>f(t)=Asin(wt+φ)(2)

我们同样易知正弦波频率 <math xmlns="http://www.w3.org/1998/Math/MathML"> f f </math>f可由以下公式得出:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> f = w 2 π (3) f = \frac{w}{2\pi}\tag{3} </math>f=2πw(3)

我们称式(2)为正弦函数,从信号意义上也可称之为正弦信号(sinusoid),余弦波仅是相位 <math xmlns="http://www.w3.org/1998/Math/MathML"> φ \varphi </math>φ不同的正弦信号。其中式(2)中的 <math xmlns="http://www.w3.org/1998/Math/MathML"> t t </math>t为时间(自变量), <math xmlns="http://www.w3.org/1998/Math/MathML"> A A </math>A为幅度, <math xmlns="http://www.w3.org/1998/Math/MathML"> w w </math>w为角速度, <math xmlns="http://www.w3.org/1998/Math/MathML"> ϕ \phi </math>ϕ为相位,式(3)中的 <math xmlns="http://www.w3.org/1998/Math/MathML"> f f </math>f为频率。

我们直接将 <math xmlns="http://www.w3.org/1998/Math/MathML"> f ( x ) f(x) </math>f(x)表示为正弦函数的无限和,则可以获得:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> f ( x ) = ∑ n = 0 ∞ A n sin ⁡ ( n x + ϕ n ) (4) f(x) = \sum_{n=0}^{\infin}A_n\sin(nx+\phi_n) \tag{4} </math>f(x)=n=0∑∞Ansin(nx+ϕn)(4)

当 <math xmlns="http://www.w3.org/1998/Math/MathML"> n = 0 n=0 </math>n=0时, <math xmlns="http://www.w3.org/1998/Math/MathML"> s i n ( n ⋅ 0 + ϕ 0 ) sin(n·0+\phi_0) </math>sin(n⋅0+ϕ0)为常数,因此我们也可以将上式化为:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> f ( x ) = A 0 + ∑ n = 1 ∞ A n sin ⁡ ( n x + ϕ n ) (5) f(x) =A_0 + \sum_{n=1}^{\infin}A_n\sin(nx+\phi_n) \tag{5} </math>f(x)=A0+n=1∑∞Ansin(nx+ϕn)(5)

使用三角恒等式对上式进行处理可以获得:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> f ( x ) = A 0 + ∑ n = 1 ∞ A n [ cos ⁡ ( n x ) sin ⁡ ϕ n + sin ⁡ ( n x ) cos ⁡ ϕ n ] (6) f(x) = A_0 + \sum_{n=1}^{\infin}A_n[\cos(nx)\sin\phi_n + \sin(nx)\cos\phi_n]\tag{6} </math>f(x)=A0+n=1∑∞An[cos(nx)sinϕn+sin(nx)cosϕn](6)

将其中的常数项进行合并我们可以很轻松得到同式(1)结构相似的公式:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> f ( x ) = A 0 + ∑ n = 1 ∞ a n cos ⁡ ( n x ) + b n sin ⁡ ( n x ) (7) f(x) = A_0 + \sum_{n=1}^{\infin}a_n\cos(nx) + b_n\sin(nx)\tag{7} </math>f(x)=A0+n=1∑∞ancos(nx)+bnsin(nx)(7)

在式(7)中,我们关注到未知参数为 <math xmlns="http://www.w3.org/1998/Math/MathML"> A 0 A_0 </math>A0, <math xmlns="http://www.w3.org/1998/Math/MathML"> a n a_n </math>an, <math xmlns="http://www.w3.org/1998/Math/MathML"> b n b_n </math>bn,因此需要一个求出这些未知参数的方法。

再进行下一步之前,我们需要引入几个重要的结论:

首先,我们易知正弦函数在单个周期上的积分为0,因而在 <math xmlns="http://www.w3.org/1998/Math/MathML"> n n </math>n个周期上的积分也同样为0,即:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> ∫ − π π sin ⁡ ( m x ) d x = 0 (8) \int_{-\pi}^\pi \sin (m x) d x=0 \tag{8} </math>∫−ππsin(mx)dx=0(8)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> ∫ − π π cos ⁡ ( m x ) d x = 0 (9) \int_{-\pi}^\pi \cos (m x) d x=0 \tag{9} </math>∫−ππcos(mx)dx=0(9)

接下来我们探究两个三角函数的积的积分关系,包含以下三种情况:

  1. sine 与 sine 的乘积的积分

  2. cosine 与 cosine 的乘积的积分

  3. sine 与 cosine 的乘积的积分

  4. <math xmlns="http://www.w3.org/1998/Math/MathML"> ∫ − π π sin ⁡ ( m x ) sin ⁡ ( n x ) d x \int_{-\pi}^{\pi} \sin(mx)\sin(nx)dx </math>∫−ππsin(mx)sin(nx)dx
    <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> ∫ − π π sin ⁡ ( m x ) sin ⁡ ( n x ) d x = ∫ − π π 1 2 [ cos ⁡ ( m x + n x ) − cos ⁡ ( m x − n x ) ] d x = 1 2 ∫ − π π cos ⁡ [ ( m + n ) x ] d x − 1 2 ∫ − π π cos ⁡ [ ( m − n ) x ] d x = { 0 m ≠ n π m = n (10) \begin{aligned} & \int_{-\pi}^{\pi} \sin(mx)\sin(nx)dx \\ \\ = & \int_{-\pi}^{\pi} \frac{1}{2}[\cos(mx + nx) - \cos(mx - nx)] dx\\ \\ = & \frac{1}{2} \int_{-\pi}^{\pi} \cos[(m+n)x] dx - \frac{1}{2} \int_{-\pi}^{\pi} \cos[(m-n)x] dx \\ \\ = & \begin{cases} 0 & m \neq n \\ \pi &m = n \end{cases} \end{aligned} \tag{10} </math>===∫−ππsin(mx)sin(nx)dx∫−ππ21[cos(mx+nx)−cos(mx−nx)]dx21∫−ππcos[(m+n)x]dx−21∫−ππcos[(m−n)x]dx{0πm=nm=n(10)

  5. <math xmlns="http://www.w3.org/1998/Math/MathML"> ∫ − π π cos ⁡ ( m x ) cos ⁡ ( n x ) d x \int_{-\pi}^{\pi} \cos(mx)\cos(nx)dx </math>∫−ππcos(mx)cos(nx)dx
    <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> ∫ − π π cos ⁡ ( m x ) cos ⁡ ( n x ) d x = ∫ − π π 1 2 [ cos ⁡ ( m x + n x ) + cos ⁡ ( m x − n x ) ] d x = 1 2 ∫ − π π cos ⁡ [ ( m + n ) x ] d x + 1 2 ∫ − π π cos ⁡ [ ( m − n ) x ] d x = { 0 m ≠ n π m = n (11) \begin{aligned} & \int_{-\pi}^{\pi} \cos(mx)\cos(nx)dx \\\\ = & \int_{-\pi}^{\pi} \frac{1}{2}[\cos(mx + nx) + \cos(mx - nx)] dx \\\\ = & \frac{1}{2} \int_{-\pi}^{\pi} \cos[(m+n)x] dx + \frac{1}{2} \int_{-\pi}^{\pi} \cos[(m-n)x] dx \\\\ = & \begin{cases} 0 & m \neq n \\ \pi &m = n \end{cases} \end{aligned} \tag{11} </math>===∫−ππcos(mx)cos(nx)dx∫−ππ21[cos(mx+nx)+cos(mx−nx)]dx21∫−ππcos[(m+n)x]dx+21∫−ππcos[(m−n)x]dx{0πm=nm=n(11)

  6. <math xmlns="http://www.w3.org/1998/Math/MathML"> ∫ − π π sin ⁡ ( m x ) cos ⁡ ( n x ) d x \int_{-\pi}^{\pi} \sin(mx)\cos(nx)dx </math>∫−ππsin(mx)cos(nx)dx
    <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> ∫ − π π sin ⁡ ( m x ) cos ⁡ ( n x ) d x = ∫ − π π 1 2 [ sin ⁡ ( m x + n x ) + sin ⁡ ( m x − n x ) ] d x = 1 2 ∫ − π π sin ⁡ [ ( m + n ) x ] d x + 1 2 ∫ − π π sin ⁡ [ ( m − n ) x ] d x = 0 (12) \begin{aligned} & \int_{-\pi}^{\pi} \sin(mx)\cos(nx)dx \\\\ = & \int_{-\pi}^{\pi} \frac{1}{2}[\sin(mx + nx) + \sin(mx - nx)] dx\\\\ = & \frac{1}{2} \int_{-\pi}^{\pi} \sin[(m+n)x] dx + \frac{1}{2} \int_{-\pi}^{\pi} \sin[(m-n)x] dx \\\\ = & 0 \end{aligned} \tag{12} </math>===∫−ππsin(mx)cos(nx)dx∫−ππ21[sin(mx+nx)+sin(mx−nx)]dx21∫−ππsin[(m+n)x]dx+21∫−ππsin[(m−n)x]dx0(12)

我们可以进一步将式(10)和式(11)紧凑表达为:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> ∫ − π π sin ⁡ ( m x ) sin ⁡ ( n x ) d x = π δ m n (13) \int_{-\pi}^{\pi} \sin(mx)\sin(nx)dx = \pi \delta {m \ n} \tag{13} </math>∫−ππsin(mx)sin(nx)dx=πδm n(13)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> ∫ − π π cos ⁡ ( m x ) cos ⁡ ( n x ) d x = π δ m n (14) \int
{-\pi}^{\pi} \cos(mx)\cos(nx)dx = \pi \delta _{m \ n} \tag{14} </math>∫−ππcos(mx)cos(nx)dx=πδm n(14)

其中 <math xmlns="http://www.w3.org/1998/Math/MathML"> δ m n \delta_{m \ n} </math>δm n为克罗内克函数(Kronecker delta)。
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> δ m n = { 0 m ≠ n 1 m = n (15) \delta_{m \ n} = \begin{cases} 0 & m \neq n \\ 1 &m = n \end{cases} \tag{15} </math>δm n={01m=nm=n(15)

故我们最终可以获得三个结论:

  1. <math xmlns="http://www.w3.org/1998/Math/MathML"> ∫ − π π sin ⁡ ( m x ) sin ⁡ ( n x ) d x = π δ m n \int_{-\pi}^{\pi} \sin(mx)\sin(nx)dx = \pi \delta _{m \ n} </math>∫−ππsin(mx)sin(nx)dx=πδm n
  2. <math xmlns="http://www.w3.org/1998/Math/MathML"> ∫ − π π cos ⁡ ( m x ) cos ⁡ ( n x ) d x = π δ m n \int_{-\pi}^{\pi} \cos(mx)\cos(nx)dx = \pi \delta _{m \ n} </math>∫−ππcos(mx)cos(nx)dx=πδm n
  3. <math xmlns="http://www.w3.org/1998/Math/MathML"> ∫ − π π sin ⁡ ( m x ) cos ⁡ ( n x ) d x = 0 \int_{-\pi}^{\pi} \sin(mx)\cos(nx)dx = 0 </math>∫−ππsin(mx)cos(nx)dx=0

因此我们可以用语言概括为:

  1. 不同周期的cosine函数正交
  2. 不同周期的sine函数正交
  3. sine函数和cosine函数正交

函数正交 的概念为:若两个函数乘积在某一区间上的定积分值为0,则我们称这两个函数在该区间上正交

在获得以上三个结论后我们很容易求出未知参数 <math xmlns="http://www.w3.org/1998/Math/MathML"> A 0 A_0 </math>A0, <math xmlns="http://www.w3.org/1998/Math/MathML"> a n a_n </math>an, <math xmlns="http://www.w3.org/1998/Math/MathML"> b n b_n </math>bn,回到我们之前求出的式(7)( <math xmlns="http://www.w3.org/1998/Math/MathML"> f ( x ) = A 0 + ∑ n = 1 ∞ a n cos ⁡ ( n x ) + b n sin ⁡ ( n x ) f(x) = A_0 + \sum_{n=1}^{\infin}a_n\cos(nx) + b_n\sin(nx) </math>f(x)=A0+∑n=1∞ancos(nx)+bnsin(nx)),我们将正弦函数 <math xmlns="http://www.w3.org/1998/Math/MathML"> sin ⁡ ( k x ) \sin(kx) </math>sin(kx)同时乘到等式的左右两边:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> f ( x ) sin ⁡ ( k x ) = A 0 sin ⁡ ( k x ) + ∑ n = 1 ∞ a n sin ⁡ ( k x ) cos ⁡ ( n x ) + b n sin ⁡ ( k x ) sin ⁡ ( n x ) (16) f(x)\sin(kx) = A_0\sin(kx) + \\ \sum_{n=1}^{\infin}a_n\sin(kx)\cos(nx) + b_n\sin(kx)\sin(nx) \tag{16} </math>f(x)sin(kx)=A0sin(kx)+n=1∑∞ansin(kx)cos(nx)+bnsin(kx)sin(nx)(16)

接下来同时对两边在 <math xmlns="http://www.w3.org/1998/Math/MathML"> [ − π , π ] [-\pi,\pi] </math>[−π,π]上进行积分:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> ∫ − π π f ( x ) sin ⁡ ( k x ) d x = ∫ − π π A 0 sin ⁡ ( k x ) d x + ∑ n = 1 ∞ [ ∫ − π π a n sin ⁡ ( k x ) cos ⁡ ( n x ) d x + ∫ − π π b n sin ⁡ ( k x ) sin ⁡ ( n x ) d x ] (17) \int_{-\pi}^{\pi} f(x)\sin(kx)d x = \int_{-\pi}^{\pi} A_0\sin(kx) d x \\ + \sum_{n=1}^{\infin} [ \int_{-\pi}^{\pi}a_n\sin(kx)\cos(nx) dx + \int_{-\pi}^{\pi} b_n\sin(kx)\sin(nx)dx ] \tag{17} </math>∫−ππf(x)sin(kx)dx=∫−ππA0sin(kx)dx+n=1∑∞[∫−ππansin(kx)cos(nx)dx+∫−ππbnsin(kx)sin(nx)dx](17)

将上述函数正交结论带入可以获得:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> ∫ − π π f ( x ) sin ⁡ ( k x ) d x = ∫ − π π b k sin ⁡ 2 ( k x ) d x = b k π (18) \int_{-\pi}^{\pi} f(x)\sin(kx)d x = \int_{-\pi}^{\pi}b_k\sin^2(kx)dx = b_k \pi \tag{18} </math>∫−ππf(x)sin(kx)dx=∫−ππbksin2(kx)dx=bkπ(18)

故:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> b k = 1 π ∫ − π π f ( x ) sin ⁡ ( k x ) d x (19) b_k = \frac{1}{\pi} \int_{-\pi}^{\pi} f(x)\sin(kx)d x \tag{19} </math>bk=π1∫−ππf(x)sin(kx)dx(19)

使用同样的方法将余弦函数 <math xmlns="http://www.w3.org/1998/Math/MathML"> cos ⁡ ( k x ) \cos(kx) </math>cos(kx)同时乘左右两边积分可以获得:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> a k = 1 π ∫ − π π f ( x ) cos ⁡ ( k x ) d x (20) a_k = \frac{1}{\pi} \int_{-\pi}^{\pi} f(x)\cos(kx)d x \tag{20} </math>ak=π1∫−ππf(x)cos(kx)dx(20)

<math xmlns="http://www.w3.org/1998/Math/MathML"> A 0 A_0 </math>A0则可以理解为乘以 <math xmlns="http://www.w3.org/1998/Math/MathML"> c o s ( 0 ⋅ x ) cos(0\cdot x) </math>cos(0⋅x)时求出的结果:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> ∫ − π π f ( x ) d x = ∫ − π π A 0 d x + ∑ n = 1 ∞ [ ∫ − π π a n cos ⁡ ( n x ) d x + ∫ − π π b n sin ⁡ ( n x ) d x ] (21) \int_{-\pi}^{\pi} f(x)d x \ = \int_{-\pi}^{\pi} A_0 d x+\sum_{n=1}^{\infin} [ \int_{-\pi}^{\pi}a_n\cos(nx) dx + \int_{-\pi}^{\pi} b_n\sin(nx)dx ] \ \tag{21} </math>∫−ππf(x)dx =∫−ππA0dx+n=1∑∞[∫−ππancos(nx)dx+∫−ππbnsin(nx)dx] (21)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> A 0 = 1 2 π ∫ − π π f ( x ) d x (22) A_0 = \frac{1}{2\pi}\int_{-\pi}^{\pi} f(x)d x \tag{22} </math>A0=2π1∫−ππf(x)dx(22)

为了统一分母可以把式(7)化为:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> f ( x ) = 1 2 a 0 + ∑ n = 1 ∞ a n cos ⁡ ( n x ) + b n sin ⁡ ( n x ) (23) f(x) = \frac{1}{2}a_0 + \sum_{n=1}^{\infin}a_n\cos(nx) + b_n\sin(nx)\tag{23} </math>f(x)=21a0+n=1∑∞ancos(nx)+bnsin(nx)(23)

当一个函数 <math xmlns="http://www.w3.org/1998/Math/MathML"> f ( x ) f(x) </math>f(x)在 <math xmlns="http://www.w3.org/1998/Math/MathML"> [ − L , L ] [-L,L] </math>[−L,L]而不是 <math xmlns="http://www.w3.org/1998/Math/MathML"> [ − π , π ] [-\pi,\pi ] </math>[−π,π]上存在周期性时,我们可以将变量转换通过求 <math xmlns="http://www.w3.org/1998/Math/MathML"> [ − L , L ] [-L,L] </math>[−L,L]上的积分以此来求其傅里叶级数,令:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> x = π x ′ L (24) x = \frac{\pi x^{\prime}}{L} \tag{24} </math>x=Lπx′(24)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> d x = π d x ′ L (25) d x = \frac{\pi d x^{\prime}}{L} \tag{25} </math>dx=Lπdx′(25)

由此可以据式(23)得到:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> f ( x ′ ) = 1 2 a 0 + ∑ n = 1 ∞ a n cos ⁡ ( n π x ′ L ) + b n sin ⁡ ( n π x ′ L ) (26) f(x^{\prime}) = \frac{1}{2}a_0 + \sum_{n=1}^{\infin}a_n\cos(\frac{n \pi x^{\prime}}{L}) + b_n\sin(\frac{n \pi x^{\prime}}{L})\tag{26} </math>f(x′)=21a0+n=1∑∞ancos(Lnπx′)+bnsin(Lnπx′)(26)

因此求得:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> a 0 = 1 L ∫ − L L f ( x ′ ) d x ′ (27) a_0=\frac{1}{L} \int_{-L}^{L} f\left(x^{\prime}\right) d x^{\prime} \tag{27} </math>a0=L1∫−LLf(x′)dx′(27)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> a n = 1 L ∫ − L L f ( x ′ ) cos ⁡ ( n π x ′ L ) d x ′ (28) a_n=\frac{1}{L} \int_{-L}^{L} f\left(x^{\prime}\right) \cos \left(\frac{n \pi x^{\prime}}{L}\right) d x^{\prime} \tag{28} </math>an=L1∫−LLf(x′)cos(Lnπx′)dx′(28)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> b n = 1 L ∫ − L L f ( x ′ ) sin ⁡ ( n π x ′ L ) d x ′ (29) b_n=\frac{1}{L} \int_{-L}^{L} f\left(x^{\prime}\right) \sin \left(\frac{n \pi x^{\prime}}{L}\right) d x^{\prime} \tag{29} </math>bn=L1∫−LLf(x′)sin(Lnπx′)dx′(29)

实际上对于任意在 <math xmlns="http://www.w3.org/1998/Math/MathML"> ( x 0 , x 0 + 2 L ) (x_0,x_0+2L) </math>(x0,x0+2L)上具有周期性的函数都可以使用上述公式中的 <math xmlns="http://www.w3.org/1998/Math/MathML"> [ − L , L ] [-L,L] </math>[−L,L]积分区间来求傅里叶级数。同理,也可以使用任意区间 <math xmlns="http://www.w3.org/1998/Math/MathML"> [ x 0 ′ − L , x 0 ′ + L ] [x_0^{\prime}-L,x_0^{\prime}+L] </math>[x0′−L,x0′+L]进行积分。

以上为傅里叶级数对于实数(real-valued)函数 <math xmlns="http://www.w3.org/1998/Math/MathML"> f ( x ) f(x) </math>f(x)分解的全部内容。

接下来我们讨论傅里叶级数在复指数(complex coefficients)函数上的应用和分解:

讨论复数形式前我们需先引入欧拉公式(Eular's formula):
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> e i θ = cos ⁡ θ + i sin ⁡ θ (30) e^{i \theta} = \cos\theta + i \sin\theta \tag{30} </math>eiθ=cosθ+isinθ(30)

欧拉公式联系了复指数函数和三角函数,通过它我们将可以把实数域上的三角函数形式转到复数域上。带入 <math xmlns="http://www.w3.org/1998/Math/MathML"> − θ -\theta </math>−θ可以得到:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> e − i θ = cos ⁡ ( − θ ) + i sin ⁡ ( − θ ) = cos ⁡ θ − i sin ⁡ θ (31) e^{-i\theta} = \cos(-\theta) + i\sin(-\theta) = \cos\theta - i\sin\theta \tag{31} </math>e−iθ=cos(−θ)+isin(−θ)=cosθ−isinθ(31)

将式(30)和式(31)分别相加相减可以获得:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> cos ⁡ θ = e i θ + e − i θ 2 (32) \cos\theta = \frac{e^{i\theta} + e^{-i\theta}}{2} \tag{32} </math>cosθ=2eiθ+e−iθ(32)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> sin ⁡ θ = e i θ − e − i θ 2 i = − i ⋅ e i θ − e − i θ 2 (33) \sin\theta = \frac{e^{i\theta} - e^{-i\theta}}{2i} = -i \cdot \frac{e^{i\theta} - e^{-i\theta}}{2} \tag{33} </math>sinθ=2ieiθ−e−iθ=−i⋅2eiθ−e−iθ(33)

有了式(32)(33)我们可以直接将其带入到式(23)中,得到:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> f ( x ) = 1 2 a 0 + ∑ n = 1 ∞ a n cos ⁡ ( n x ) + b n sin ⁡ ( n x ) = 1 2 a 0 + ∑ n = 1 ∞ [ a n e i n x + e − i n x 2 + b n − i e i n x + i e − i n x 2 ] = 1 2 a 0 + ∑ n = 1 ∞ [ a n − i b n 2 e i n x + a n + i b n 2 e − i n x ] = 1 2 a 0 + ∑ n = 1 ∞ a n − i b n 2 e i n x + ∑ n = − ∞ − 1 a − n + i b − n 2 e i n x (34) \begin{aligned} f(x) & = \frac{1}{2}a_0 + \sum_{n=1}^{\infin}a_n\cos(nx) + b_n\sin(nx)\\ & = \frac{1}{2}a_0 + \sum_{n=1}^{\infin}[a_n\frac{e^{inx} + e^{-inx}}{2} + b_n\frac{-ie^{inx} + ie^{-inx}}{2}]\\ & = \frac{1}{2}a_0 +\sum_{n=1}^{\infin}[\frac{a_n - i b_n}{2}e^{inx} + \frac{a_n + ib_n}{2}e^{-inx}] \\ & = \frac{1}{2}a_0 +\sum_{n=1}^{\infin}\frac{a_n - i b_n}{2}e^{inx} +\sum_{n = -\infin}^{-1}\frac{a_{-n} + i b_{-n}}{2}e^{inx} \\ \end{aligned} \tag{34} </math>f(x)=21a0+n=1∑∞ancos(nx)+bnsin(nx)=21a0+n=1∑∞[an2einx+e−inx+bn2−ieinx+ie−inx]=21a0+n=1∑∞[2an−ibneinx+2an+ibne−inx]=21a0+n=1∑∞2an−ibneinx+n=−∞∑−12a−n+ib−neinx(34)

通过之前我们获得的关于 <math xmlns="http://www.w3.org/1998/Math/MathML"> a n a_n </math>an, <math xmlns="http://www.w3.org/1998/Math/MathML"> b n b_n </math>bn的式(19)(20)可以获得:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> a − n = 1 π ∫ − π π f ( x ) cos ⁡ ( − n x ) d x = 1 π ∫ − π π f ( x ) cos ⁡ ( n x ) d x = a n (35) a_{-n} = \frac{1}{\pi} \int_{-\pi}^{\pi} f(x)\cos(-nx)d x = \frac{1}{\pi} \int_{-\pi}^{\pi} f(x)\cos(nx)d x = a_n \tag{35} </math>a−n=π1∫−ππf(x)cos(−nx)dx=π1∫−ππf(x)cos(nx)dx=an(35)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> b − n = 1 π ∫ − π π f ( x ) sin ⁡ ( − n x ) d x = − 1 π ∫ − π π f ( x ) sin ⁡ ( n x ) d x = − b n (36) b_{-n} = \frac{1}{\pi} \int_{-\pi}^{\pi} f(x)\sin(-nx)d x = -\frac{1}{\pi} \int_{-\pi}^{\pi} f(x)\sin(nx)d x = -b_n \tag{36} </math>b−n=π1∫−ππf(x)sin(−nx)dx=−π1∫−ππf(x)sin(nx)dx=−bn(36)

将式(35)(36)代入回式(34)中:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> f ( x ) = 1 2 a 0 + ∑ n = 1 ∞ a n − i b n 2 e i n x + ∑ n = − ∞ − 1 a − n + i b − n 2 e i n x = 1 2 a 0 + ∑ n = 1 ∞ a n − i b n 2 e i n x + ∑ n = − ∞ − 1 a n − i b n 2 e i n x = A 0 + ∑ n = 1 ∞ A n e i n x + ∑ n = − ∞ − 1 A n e i n x = ∑ n = − ∞ ∞ A n e i n x (37) \begin{aligned} f(x) & = \frac{1}{2}a_0 +\sum_{n=1}^{\infin}\frac{a_n - i b_n}{2}e^{inx} +\sum_{n = -\infin}^{-1}\frac{a_{-n} + i b_{-n}}{2}e^{inx} \\ & = \frac{1}{2}a_0 +\sum_{n=1}^{\infin}\frac{a_n - i b_n}{2}e^{inx} +\sum_{n = -\infin}^{-1}\frac{a_{n} - i b_{n}}{2}e^{inx} \\ & = A_0 +\sum_{n=1}^{\infin}A_n e^{inx} +\sum_{n = -\infin}^{-1}A_n e^{inx} \\ & = \sum_{n = -\infin}^{\infin}A_n e^{inx} \end{aligned} \tag{37} </math>f(x)=21a0+n=1∑∞2an−ibneinx+n=−∞∑−12a−n+ib−neinx=21a0+n=1∑∞2an−ibneinx+n=−∞∑−12an−ibneinx=A0+n=1∑∞Aneinx+n=−∞∑−1Aneinx=n=−∞∑∞Aneinx(37)

其中:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> A n = a n − i b n 2 (38) A_n = \frac{a_n - i b_n}{2} \tag{38} </math>An=2an−ibn(38)

至此,我们求出了傅立叶级数的复数形式 ,接下来我们只需求出 <math xmlns="http://www.w3.org/1998/Math/MathML"> A n A_n </math>An。

我们将式(37)两边同时乘以 <math xmlns="http://www.w3.org/1998/Math/MathML"> e − i m x e^{-imx} </math>e−imx并进行积分:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> ∫ − π π f ( x ) e − i m x d x = ∫ − π π ( ∑ n = − ∞ ∞ A n e i n x ) e − i m x d x = ∑ n = − ∞ ∞ A n ∫ − π π e i ( n − m ) x d x = ∑ n = − ∞ ∞ A n ∫ − π π { cos ⁡ [ ( n − m ) x ] + i sin ⁡ [ ( n − m ) x ] } d x = ∑ n = − ∞ ∞ A n 2 π δ m n = 2 π A m (39) \begin{aligned} \int_{-\pi}^\pi f(x) e^{-i m x} d x & =\int_{-\pi}^\pi\left(\sum_{n=-\infty}^{\infty} A_n e^{i n x}\right) e^{-i m x} d x \\ & =\sum_{n=-\infty}^{\infty} A_n \int_{-\pi}^\pi e^{i(n-m) x} d x \\ & =\sum_{n=-\infty}^{\infty} A_n \int_{-\pi}^\pi\{\cos [(n-m) x]+i \sin [(n-m) x]\} d x \\ & =\sum_{n=-\infty}^{\infty} A_n 2 \pi \delta_{m \ n} \\ & =2 \pi A_m \end{aligned} \tag{39} </math>∫−ππf(x)e−imxdx=∫−ππ(n=−∞∑∞Aneinx)e−imxdx=n=−∞∑∞An∫−ππei(n−m)xdx=n=−∞∑∞An∫−ππ{cos[(n−m)x]+isin[(n−m)x]}dx=n=−∞∑∞An2πδm n=2πAm(39)

由上式可以求得复数 <math xmlns="http://www.w3.org/1998/Math/MathML"> A n A_n </math>An为:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> A n = 1 2 π ∫ − π π f ( x ) e − i m x d x (40) A_n = \frac{1}{2\pi} \int_{-\pi}^\pi f(x) e^{-i m x} d x \tag{40} </math>An=2π1∫−ππf(x)e−imxdx(40)

将区间 <math xmlns="http://www.w3.org/1998/Math/MathML"> [ − π , π ] [-\pi,\pi] </math>[−π,π]映射到 <math xmlns="http://www.w3.org/1998/Math/MathML"> [ − L , L ] [-L,L] </math>[−L,L]上去我们可能获得更一般的表达形式:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> f ( x ) = ∑ n = − ∞ ∞ A n e i ( 2 π n x / L ) (41) f(x) = \sum_{n=-\infin}^{\infin}A_ne^{i(2\pi n x / L)} \tag{41} </math>f(x)=n=−∞∑∞Anei(2πnx/L)(41)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> A n = 1 L ∫ − L / 2 L / 2 f ( x ) e i ( 2 π n x / L ) d x (42) A_n = \frac{1}{L}\int_{-L/2}^{L/2}f(x)e^{i(2\pi n x / L)}d x \tag{42} </math>An=L1∫−L/2L/2f(x)ei(2πnx/L)dx(42)

傅里叶变换(fourier transform,FT) 中,通过式(42)求得 <math xmlns="http://www.w3.org/1998/Math/MathML"> A n A_n </math>An即为目的。

相关推荐
叫我:松哥1 小时前
基于python flask的高血压疾病预测分析与可视化系统的设计与实现,使用随机森林、决策树、逻辑回归、xgboost等机器学习库预测
python·决策树·随机森林·机器学习·数据分析·flask·逻辑回归
friklogff2 小时前
【C#生态园】从数据分析到机器学习:掌握C#统计学库的核心功能
机器学习·数据分析·c#
零澪灵2 小时前
ChartLlama: A Multimodal LLM for Chart Understanding and Generation论文阅读
论文阅读·python·自然语言处理·数据分析·nlp
need help3 小时前
CDA Level1 数据分析基本概念
数据挖掘·数据分析
iwihafu3 小时前
可视化数据分析收集软件Splunk Enterprise for Mac
数据挖掘·数据分析
D11_9 小时前
Pandas缺失值处理
python·机器学习·数据分析·numpy·pandas
Kenneth風车11 小时前
【机器学习(五)】分类和回归任务-AdaBoost算法-Sentosa_DSML社区版
人工智能·算法·低代码·机器学习·数据分析
知识分享小能手12 小时前
mysql学习教程,从入门到精通,SQL DISTINCT 子句 (16)
大数据·开发语言·sql·学习·mysql·数据分析·数据库开发
阡之尘埃15 小时前
Python数据分析案例59——基于图神经网络的反欺诈交易检测(GCN,GAT,GIN)
python·神经网络·数据挖掘·数据分析·图神经网络·反欺诈·风控大数据
环能jvav大师15 小时前
基于R语言的统计分析基础:使用dplyr包进行数据操作
大数据·开发语言·数据分析·r语言