傅里叶级数

傅里叶级数理论:周期为 2 π 2π 2π 的周期函数 f ( x ) f(x) f(x) ,可以写作一系列三角函数的线性组合:
f ( x ) = a 0 c o s 0 + b 0 s i n 0 + a 1 c o s x + b 1 s i n x + a 2 c o s 2 x + b 2 s i n 2 x + . . . + a n c o s n x + b n s i n n x f(x)=a_0cos0+b_0sin0+a_1cosx+b_1sinx+a_2cos2x+b_2sin2x+...+a_ncosnx+b_nsinnx f(x)=a0cos0+b0sin0+a1cosx+b1sinx+a2cos2x+b2sin2x+...+ancosnx+bnsinnx

从二维平面中,正交基谈起:

假定 a ⃗ \vec{a} a b ⃗ \vec{b} b 相互正交,它们的线性组合可以表示平面中任意一个向量 v ⃗ \vec{v} v
v ⃗ = n a ⃗ + m b ⃗ \vec{v}=n\vec{a}+m\vec{b} v =na +mb
对于系数 n , m n,m n,m 可以用如下方式求解:
v ⃗ ⋅ a ⃗ = n a ⃗ ⋅ a ⃗ + m b ⃗ ⋅ a ⃗ \vec{v} \cdot \vec{a}=n\vec{a}\cdot\vec{a}+m\vec{b}\cdot\vec{a} v a =na a +mb a
由于 a ⃗ , b ⃗ \vec{a},\vec{b} a b 相互正交,所以它们点乘的结果为0:
v ⃗ ⋅ a ⃗ = n a ⃗ ⋅ a ⃗ n = v ⃗ ⋅ a ⃗ a ⃗ ⋅ a ⃗ \vec{v} \cdot \vec{a}=n\vec{a}\cdot\vec{a}\\ n=\frac{\vec{v} \cdot \vec{a}}{\vec{a}\cdot\vec{a}} v a =na a n=a a v a
同理:
m = v ⃗ ⋅ b ⃗ b ⃗ ⋅ b ⃗ m=\frac{\vec{v} \cdot \vec{b}}{\vec{b}\cdot\vec{b}} m=b b v b
在这里插入图片描述
如果 ∫ a b f ( x ) g ( x ) d x = 0 \int_a^bf(x)g(x)dx=0 abf(x)g(x)dx=0,即点乘的结果为0,则认为两个函数 f ( x ) f(x) f(x) g ( x ) g(x) g(x)是正交的。

与向量的正交基类似,一组函数形式的正交基的线性组合,同样可以表示相同区间的任意一个函数。

一、 [ 0 , 2 π ] [0,2π] [0,2π]

而三角函数集合: { c o s 0 , s i n 0 , c o s x , s i n x , c o s 2 x , s i n 2 x , . . . . . . , c o s n x , s i n n x } \{{cos0,sin0,cosx,sinx,cos2x,sin2x,......,cosnx,sinnx\}} {cos0,sin0,cosx,sinx,cos2x,sin2x,......,cosnx,sinnx}中,由于任意两个不同的函数在区间 [ 0 , 2 π ] [0,2π] [0,2π] 内的点乘结果为0,每个函数与自己点乘的结果为 π π π,所以可认为是区间 [ 0 , 2 π ] [0,2π] [0,2π] 内的一组正交基。

因此,区间 [ 0 , 2 π ] [0,2π] [0,2π] 内的任意一个函数都可用这组基的线性组合表示:
f ( x ) = a 0 c o s 0 + b 0 s i n 0 + a 1 c o s x + b 1 s i n x . . . + a n c o s n x + b n s i n n x f(x)=a_0cos0+b_0sin0+a_1cosx+b_1sinx...+a_ncosnx+b_nsinnx f(x)=a0cos0+b0sin0+a1cosx+b1sinx...+ancosnx+bnsinnx
也就是文章一开始提到的傅里叶级数理论。

与上文中二维平面部分的系数求解方法类似,这里的系数同样可以类似的方式求解:
a n = ∫ 0 2 π f ( x )   c o s n x   d x ∫ 0 2 π c o s n x   c o s n x   d x = 1 π ∫ 0 2 π f ( x ) c o s n x   d x , n ∈ N a_n=\frac{\int_0^{2π}f(x)\,cosnx\,dx}{\int_0^{2π}cosnx\,cosnx\,dx}=\frac{1}{π}\int_0^{2π}f(x)cosnx\,dx,n\in N an=02πcosnxcosnxdx02πf(x)cosnxdx=π102πf(x)cosnxdx,nN
b n = ∫ 0 2 π f ( x )   s i n n x   d x ∫ 0 2 π s i n n x   s i n n x   d x = 1 π ∫ 0 2 π f ( x ) s i n n x   d x , n ∈ N b_n=\frac{\int_0^{2π}f(x)\,sinnx\,dx}{\int_0^{2π}sinnx\,sinnx\,dx}=\frac{1}{π}\int_0^{2π}f(x)sinnx\,dx,n\in N bn=02πsinnxsinnxdx02πf(x)sinnxdx=π102πf(x)sinnxdx,nN
式子最前面的两项:
a 0 c o s 0 + b 0 s i n 0 = a 0 c o s 0 + 0 = a 0 = ∫ 0 2 π f ( x )   c o s 0   d x ∫ 0 2 π c o s 0   c o s 0   d x = ∫ 0 2 π f ( x )   d x ∫ 0 2 π 1 d x = 1 2 π ∫ 0 2 π f ( x )   d x a_0cos0+b_0sin0=a_0cos0+0=a_0=\frac{\int_0^{2π}f(x)\,cos0\,dx}{\int_0^{2π}cos0\,cos0\,dx}=\frac{\int_0^{2π}f(x)\,dx}{\int_0^{2π}1dx}=\frac{1}{2π}\int_0^{2π}f(x)\,dx a0cos0+b0sin0=a0cos0+0=a0=02πcos0cos0dx02πf(x)cos0dx=02π1dx02πf(x)dx=2π102πf(x)dx

后面部分写成累加的形式:
f ( x ) = a 0 + ∑ n = 1 + ∞ ( a n   c o s n x + b n   s i n n x ) f(x)=a_0+\sum_{n=1}^{+∞}(a_n\,cosnx+b_n\,sinnx) f(x)=a0+n=1+(ancosnx+bnsinnx)

二、 [ 0 , 2 l ] [0,2l] [0,2l]

一中的区间局限在 [ 0 , 2 π ] [0,2π] [0,2π],可通过伸缩的方式使区间扩展到 [ 0 , 2 l ] [0,2l] [0,2l]

c o s x cosx cosx 的周期为 T = 2 π w = 2 π 1 = 2 π T=\frac{2π}{w}=\frac{2π}{1}=2π T=w2π=12π=2π 2 π 2π 2π 处会开始重复,想让它的周期变为 2 l 2l 2l,即在 2 l 2l 2l 处进入重复, 即 T = 2 π w = 2 l T=\frac{2π}{w}=2l T=w2π=2l,得: w = 2 π 2 l = π l w=\frac{2π}{2l}=\frac{π}{l} w=2l2π=lπ

c o s x cosx cosx 变为 c o s π l x cos \frac{π}{l}x coslπx 即可满足要求

另一方面,虽然 c o s 2 x cos2x cos2x 的周期为 π π π,但它仍会在 2 π 2π 2π 处开始重复,即 2 π 2π 2π 仍是 c o s 2 x cos2x cos2x 的一个周期,其他 c o s n x cosnx cosnx 同理

全部经过伸缩后:

{ c o s π l n x , s i n π l n x   ∣   n ∈ N } \{{cos\frac{π}{l}nx,sin\frac{π}{l}nx\,| \,n\in N\}} {coslπnx,sinlπnxnN}就同样都有一个最小公共周期 2 l 2l 2l,且由于它们仍然保持相互正交的关系,和自身的点乘结果为 l l l,因此该集合仍是一组基,此时它的线性组合可以表示 [ 0 , 2 l ] [0,2l] [0,2l] 内的任意一个函数。

f ( x ) = a 0 + ∑ n = 1 + ∞ ( a n   c o s π l n x + b n   s i n π l n x ) f(x)=a_0+\sum_{n=1}^{+∞}(a_n\,cos\frac{π}{l}nx+b_n\,sin\frac{π}{l}nx) f(x)=a0+n=1+(ancoslπnx+bnsinlπnx)
与一中同理, a 0 a_0 a0 是线性组合的前两项:
a 0 c o s π l 0 + b 0 s i n π l 0 = a 0 c o s 0 + b 0 s i n 0 = a 0 = ∫ 0 2 l f ( x )   c o s π l 0   d x ∫ 0 2 l c o s π l 0   c o s π l 0   d x = ∫ 0 2 l f ( x )   c o s 0   d x ∫ 0 2 l c o s 0   c o s 0   d x = 1 2 l ∫ 0 2 l f ( x ) d x a_0cos\frac{π}{l}0+b_0sin\frac{π}{l}0\\ =a_0cos0+b_0sin0\\ =a_0\\ =\frac{\int_0^{2l}f(x)\,cos\frac{π}{l}0\,dx}{\int_0^{2l}cos\frac{π}{l}0\,cos\frac{π}{l}0\,dx}\\ =\frac{\int_0^{2l}f(x)\,cos0\,dx}{\int_0^{2l}cos0\,cos0\,dx}\\ =\frac{1}{2l}\int_0^{2l}f(x)dx a0coslπ0+b0sinlπ0=a0cos0+b0sin0=a0=02lcoslπ0coslπ0dx02lf(x)coslπ0dx=02lcos0cos0dx02lf(x)cos0dx=2l102lf(x)dx
另外两个系数:
a n = ∫ 0 2 l f ( x ) c o s π l n x   d x ∫ 0 2 l c o s π l n x   c o s π l n x   d x = 1 l ∫ 0 2 l f ( x ) c o s π l n x   d x , n ∈ N a_n=\frac{\int_0^{2l}f(x)cos\frac{π}{l}nx\,dx}{\int_0^{2l}cos\frac{π}{l}nx\,cos\frac{π}{l}nx\,dx}=\frac{1}{l}\int_0^{2l}f(x)cos\frac{π}{l}nx\,dx,n\in N an=02lcoslπnxcoslπnxdx02lf(x)coslπnxdx=l102lf(x)coslπnxdx,nN
b n = ∫ 0 2 l f ( x ) s i n π l n x   d x ∫ 0 2 l s i n π l n x   s i n π l n x   d x = 1 l ∫ 0 2 l f ( x ) s i n π l n x   d x , n ∈ N b_n=\frac{\int_0^{2l}f(x)sin\frac{π}{l}nx\,dx}{\int_0^{2l}sin\frac{π}{l}nx\,sin\frac{π}{l}nx\,dx}=\frac{1}{l}\int_0^{2l}f(x)sin\frac{π}{l}nx\,dx,n\in N bn=02lsinlπnxsinlπnxdx02lf(x)sinlπnxdx=l102lf(x)sinlπnxdx,nN

三、借助欧拉公式进一步化简(另一组基)

π l = w \frac{π}{l}=w lπ=w,区间还是在 [ 0 , 2 l ] [0,2l] [0,2l]
f ( x ) = a 0 + ∑ n = 1 + ∞ ( a n   c o s ( n w x ) + b n   s i n ( n w x ) ) (1) f(x)=a_0+\sum_{n=1}^{+∞}(a_n\,cos(nwx)+b_n\,sin(nwx))\tag{1} f(x)=a0+n=1+(ancos(nwx)+bnsin(nwx))(1)

欧拉公式:
e i θ = c o s θ + i   s i n θ e − i θ = c o s θ − i   s i n θ e^{i\theta}=cos\theta+i\,sin\theta\\ e^{-i\theta}=cos\theta-i\,sin\theta eiθ=cosθ+isinθeiθ=cosθisinθ
即:
e i n w x = c o s ( n w x ) + i   s i n ( n w x ) e − i n w x = c o s ( n w x ) − i   s i n ( n w x ) e^{inwx}=cos(nwx)+i\,sin(nwx)\\ e^{-inwx}=cos(nwx)-i\,sin(nwx) einwx=cos(nwx)+isin(nwx)einwx=cos(nwx)isin(nwx)
于是:
c o s ( n w x ) = e i n w x + e − i n w x 2 s i n ( n w x ) = e i n w x − e − i n w x 2 i cos(nwx)=\frac{e^{inwx}+e^{-inwx}}{2}\\ sin(nwx)=\frac{e^{inwx}-e^{-inwx}}{2i} cos(nwx)=2einwx+einwxsin(nwx)=2ieinwxeinwx
将上面两式代入式(1),得:
f ( x ) = a 0 + ∑ n = 1 + ∞ ( a n   e i n w x + e − i n w x 2 + b n   e i n w x − e − i n w x 2 i ) f(x)=a_0+\sum_{n=1}^{+∞}(a_n\,\frac{e^{inwx}+e^{-inwx}}{2}+b_n\,\frac{e^{inwx}-e^{-inwx}}{2i}) f(x)=a0+n=1+(an2einwx+einwx+bn2ieinwxeinwx)
下面开始化简:
f ( x ) = a 0 + ∑ n = 1 + ∞ ( a n   e i n w x + e − i n w x 2 + i b n   e i n w x − e − i n w x 2 i 2 ) f(x)=a_0+\sum_{n=1}^{+∞}(a_n\,\frac{e^{inwx}+e^{-inwx}}{2}+ib_n\,\frac{e^{inwx}-e^{-inwx}}{2i^2}) f(x)=a0+n=1+(an2einwx+einwx+ibn2i2einwxeinwx)
由于 i 2 = − 1 i^2=-1 i2=1
f ( x ) = a 0 + ∑ n = 1 + ∞ ( a n   e i n w x + e − i n w x 2 − i b n   e i n w x − e − i n w x 2 ) f(x)=a_0+\sum_{n=1}^{+∞}(a_n\,\frac{e^{inwx}+e^{-inwx}}{2}-ib_n\,\frac{e^{inwx}-e^{-inwx}}{2}) f(x)=a0+n=1+(an2einwx+einwxibn2einwxeinwx)
f ( x ) = a 0 + ∑ n = 1 + ∞ ( a n e i n w x − i b n e i n w x 2 + a n e − i n w x + i b n e − i n w x 2 ) f(x)=a_0+\sum_{n=1}^{+∞}(\frac{a_ne^{inwx}-ib_ne^{inwx}}{2}+\frac{a_ne^{-inwx}+ib_ne^{-inwx}}{2}) f(x)=a0+n=1+(2aneinwxibneinwx+2aneinwx+ibneinwx)
f ( x ) = a 0 + ∑ n = 1 + ∞ ( a n − i b n 2 e i n w x + a n + i b n 2 e − i n w x ) (2) f(x)=a_0+\sum_{n=1}^{+∞}(\frac{a_n-ib_n}{2}e^{inwx}+\frac{a_n+ib_n}{2}e^{-inwx})\tag{2} f(x)=a0+n=1+(2anibneinwx+2an+ibneinwx)(2)
由于:
a n = 1 l ∫ 0 2 l f ( x ) c o s ( n w x )   d x b n = 1 l ∫ 0 2 l f ( x ) s i n ( n w x )   d x a_n=\frac{1}{l}\int_0^{2l}f(x)cos(nwx)\,dx\\ b_n=\frac{1}{l}\int_0^{2l}f(x)sin(nwx)\,dx an=l102lf(x)cos(nwx)dxbn=l102lf(x)sin(nwx)dx
a − n = 1 l ∫ 0 2 l f ( x ) c o s ( − n w x )   d x = a n a_{-n}=\frac{1}{l}\int_0^{2l}f(x)cos(-nwx)\,dx\\ =a_n an=l102lf(x)cos(nwx)dx=an
b − n = 1 l ∫ 0 2 l f ( x ) s i n ( − n w x )   d x = − b n b_{-n}=\frac{1}{l}\int_0^{2l}f(x)sin(-nwx)\,dx\\ =-b_n bn=l102lf(x)sin(nwx)dx=bn
于是式(2)可以整合:
f ( x ) = a 0 + ∑ n = 1 + ∞ ( a n − i b n 2 e i n w x + a n + i b n 2 e − i n w x ) f(x)=a_0+\sum_{n=1}^{+∞}(\frac{a_n-ib_n}{2}e^{inwx}+\frac{a_n+ib_n}{2}e^{-inwx}) f(x)=a0+n=1+(2anibneinwx+2an+ibneinwx)
f ( x ) = a 0 + ∑ n = 1 + ∞ a n − i b n 2 e i n w x + ∑ n = 1 + ∞ a − n − i b − n 2 e − i n w x f(x)=a_0+\sum_{n=1}^{+∞}\frac{a_n-ib_n}{2}e^{inwx}+\sum_{n=1}^{+∞}\frac{a_{-n}-ib_{-n}}{2}e^{-inwx} f(x)=a0+n=1+2anibneinwx+n=1+2anibneinwx
f ( x ) = a 0 + ∑ n = 1 + ∞ a n − i b n 2 e i n w x + ∑ n = − ∞ − 1 a n − i b n 2 e i n w x f(x)=a_0+\sum_{n=1}^{+∞}\frac{a_n-ib_n}{2}e^{inwx}+\sum_{n=-∞}^{-1}\frac{a_{n}-ib_{n}}{2}e^{inwx} f(x)=a0+n=1+2anibneinwx+n=12anibneinwx
f ( x ) = ∑ n = 0 0 a n e i n w x + ∑ n = 1 + ∞ a n − i b n 2 e i n w x + ∑ n = − ∞ − 1 a n − i b n 2 e i n w x f(x)=\sum_{n=0}^{0}a_ne^{inwx}+\sum_{n=1}^{+∞}\frac{a_n-ib_n}{2}e^{inwx}+\sum_{n=-∞}^{-1}\frac{a_{n}-ib_{n}}{2}e^{inwx} f(x)=n=00aneinwx+n=1+2anibneinwx+n=12anibneinwx
最终整合成一个累加符号:
f ( x ) = ∑ n = − ∞ + ∞ c n e i n w x (3) f(x)=\sum_{n=-∞}^{+∞}c_ne^{inwx}\tag{3} f(x)=n=+cneinwx(3)
n = 0 n=0 n=0 时,
c n = a 0 c_n=a_0 cn=a0
n ≠ 0 n≠0 n=0 时,
c n = a n − i b n 2 c_n=\frac{a_n-ib_n}{2} cn=2anibn
= 1 l ∫ 0 2 l f ( x ) c o s ( n w x )   d x − i 1 l ∫ 0 2 l f ( x ) s i n ( n w x )   d x 2 =\frac{\frac{1}{l}\int_0^{2l}f(x)cos(nwx)\,dx-i\frac{1}{l}\int_0^{2l}f(x)sin(nwx)\,dx}{2} =2l102lf(x)cos(nwx)dxil102lf(x)sin(nwx)dx
= 1 l ∫ 0 2 l f ( x ) c o s ( n w x )   d x − 1 l ∫ 0 2 l f ( x )   i   s i n ( n w x )   d x 2 =\frac{\frac{1}{l}\int_0^{2l}f(x)cos(nwx)\,dx-\frac{1}{l}\int_0^{2l}f(x)\,i\,sin(nwx)\,dx}{2} =2l102lf(x)cos(nwx)dxl102lf(x)isin(nwx)dx
= 1 2 l ∫ 0 2 l f ( x ) [ c o s ( n w x ) − i   s i n ( n w x ) ] d x =\frac{1}{2l}\int_0^{2l}f(x)[cos(nwx)-i\,sin(nwx)]dx =2l102lf(x)[cos(nwx)isin(nwx)]dx
= 1 2 l ∫ 0 2 l f ( x )   e − i n w x d x =\frac{1}{2l}\int_0^{2l}f(x)\,e^{-inwx}dx =2l102lf(x)einwxdx

f ( x ) = ∑ n = − ∞ + ∞ c n e i n w x (3) f(x)=\sum_{n=-∞}^{+∞}c_ne^{inwx}\tag{3} f(x)=n=+cneinwx(3)
式(3)意味着 f ( x ) f(x) f(x) 还能由另一组基的线性组合表示,该组基是复指数函数的集合:
{ . . .   , e − i 2 w x   , e − i w x   , e 0   , e i w x   , e i 2 w x   , . . . } \{{...\,,e^{-i2wx}\,,e^{-iwx}\,,e^{0}\,,e^{iwx}\,,e^{i2wx}\,,...\}} {...,ei2wx,eiwx,e0,eiwx,ei2wx,...}
{ e i n w x   ∣   n ∈ Z } \{{e^{inwx}\,|\,n\in Z\}} {einwxnZ}
总结一下,傅里叶级数最终可以写成另一组基 { e i n w x   ∣   n ∈ Z } \{{e^{inwx}\,|\,n\in Z\}} {einwxnZ} 的线性组合:
f ( x ) = ∑ n = − ∞ + ∞ c n e i n w x f(x)=\sum_{n=-∞}^{+∞}c_ne^{inwx} f(x)=n=+cneinwx
其中, c n c_n cn 是复数,

n = 0 n=0 n=0 时, c n = a 0 c_n=a_0 cn=a0

n ≠ 0 n≠0 n=0 时, c n = a n − i b n 2 = 1 2 l ∫ 0 2 l f ( x )   e − i n w x d x c_n=\frac{a_n-ib_n}{2}=\frac{1}{2l}\int_0^{2l}f(x)\,e^{-inwx}dx cn=2anibn=2l102lf(x)einwxdx

参考:
1.傅里叶变换推导详解
https://zhuanlan.zhihu.com/p/77345128
2.傅里叶级数与傅里叶变换
https://zhuanlan.zhihu.com/p/366974965
3.我理解的傅里叶变换
https://zhuanlan.zhihu.com/p/23739221
4.如果看了这篇文章你还不懂傅里叶变换,那就过来掐死我吧
https://zhuanlan.zhihu.com/p/19759362

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值