Fourier Series 傅立叶级数 学习笔记Part 1

Numerical Methods and Modeling in Science数值方法建模这门课最近进入到了一个 我完全不会的区域,傅立叶变换。
傅立叶变换的历史就是让人胆颤的历史。学渣如我,闻之色变。
最近的三周课应该都是讲傅立叶变换,写一遍博客也许就记住了----美好的愿望。

引例

Orthonormal标准正交

Orthonormal=Orthogonal+Unit length
在三维空间中,我们有x,y,z\vec{x},\vec{y},\vec{z}满足

xx=yy=zz=0\vec{x} \cdot\vec{x}= \vec{y} \cdot\vec{y}= \vec{z} \cdot\vec{z}= 0

xy=yz=zx=1\vec{x} \cdot\vec{y}= \vec{y} \cdot\vec{z}= \vec{z} \cdot\vec{x}= 1
那么任意向量V=ax+by+cz\vec{V}=a\vec{x}+b\vec{y}+c\vec{z}

在区间[π,π][-\pi,\pi]中函数g和h的点乘可以表示为

g,h=ππg(x)h(x)dx\left \langle g,h \right \rangle=\int_{-\pi}^{\pi} g(x)h(x)dx

一些函数
12π\frac{1}{\sqrt{2\pi}}
1πcosx\frac{1}{\sqrt{\pi}}\cos x, 1πcos2x\frac{1}{\sqrt{\pi}}\cos 2x ,1πcos3x\frac{1}{\sqrt{\pi}}\cos 3x
1πsinx\frac{1}{\sqrt{\pi}}\sin x ,1πsin2x\frac{1}{\sqrt{\pi}}\sin 2x ,1πsin3x\frac{1}{\sqrt{\pi}}\sin 3x
可以被证明是orthonormal的
12π,12π=1\left \langle \frac{1}{\sqrt{2\pi}},\frac{1}{\sqrt{2\pi}} \right \rangle=1
1πcos2x,1πcos2x=1\left \langle \frac{1}{\sqrt{\pi}}\cos 2x,\frac{1}{\sqrt{\pi}}\cos 2x \right \rangle=1
1πsin2x,1πsin2x=1\left \langle \frac{1}{\sqrt{\pi}}\sin 2x,\frac{1}{\sqrt{\pi}}\sin 2x \right \rangle=1

12π,1πcos2x=0\left \langle \frac{1}{\sqrt{2\pi}},\frac{1}{\sqrt{\pi}}\cos 2x \right \rangle=0

那么类似于V\vec{V}
函数f(x)=c012π+c11πcosx+c21πcos2x+...+d11πsinx+d21πsin2x+...f(x)=c_{0}\frac{1}{\sqrt{2\pi}}+c_{1}\frac{1}{\sqrt{\pi}}\cos x+c_{2}\frac{1}{\sqrt{\pi}}\cos 2x+...\\+d_{1}\frac{1}{\sqrt{\pi}}\sin x+d_{2}\frac{1}{\sqrt{\pi}}\sin 2x+...

我们可以利用上面的orthonormal关系计算得到系数

c0=f(x),12π=ππ12πf(x)dxc_{0}=\left \langle f(x),\frac{1}{\sqrt{2\pi}} \right \rangle=\int_{-\pi}^{\pi}\frac{1}{\sqrt{2\pi}}f(x)dx

cn=f(x),1πcosnx=ππ1πf(x)cosnxdxc_{n}=\left \langle f(x),\frac{1}{\sqrt{\pi}} \cos nx \right \rangle=\int_{-\pi}^{\pi}\frac{1}{\sqrt{\pi}}f(x) \cos nxdx

dn=f(x),1πsinnx=ππ1πf(x)sinnxdxd_{n}=\left \langle f(x),\frac{1}{\sqrt{\pi}} \sin nx \right \rangle=\int_{-\pi}^{\pi}\frac{1}{\sqrt{\pi}}f(x) \sin nxdx

因此

f(x)=(ππ1πf(x)cosnxdx)12π+n=1(ππ1πf(x)cosnxdx)1πcosnx+n=1(ππ1πf(x)sinnxdx)1πsinnxf(x)=(\int_{-\pi}^{\pi}\frac{1}{\sqrt{\pi}}f(x) \cos nxdx )\frac{1}{\sqrt{2\pi}}+\sum_{n=1}^{\infty}(\int_{-\pi}^{\pi}\frac{1}{\sqrt{\pi}}f(x) \cos nxdx)\frac{1}{\sqrt{\pi}}\cos nx+\sum_{n=1}^{\infty}(\int_{-\pi}^{\pi}\frac{1}{\sqrt{\pi}}f(x) \sin nxdx)\frac{1}{\sqrt{\pi}}\sin nx

化简

f(x)=(1πππf(x)cosnxdx)12+n=1(1πππf(x)cosnxdx)cosnx+n=1(1πππf(x)sinnxdx)sinnxf(x)=(\frac{1}{\pi}\int_{-\pi}^{\pi}f(x) \cos nxdx )\frac{1}{2}+\sum_{n=1}^{\infty}(\frac{1}{\pi}\int_{-\pi}^{\pi}f(x) \cos nxdx)\cos nx+\sum_{n=1}^{\infty}(\frac{1}{\pi}\int_{-\pi}^{\pi}f(x) \sin nxdx)\sin nx

此处有狄利克雷定理,但是我看了好几个版本,看了好久也没太懂,但是仿佛也不重要

Fourier Series 傅立叶级数 学习笔记Part 1

然后就是一个小例子

Fourier Series 傅立叶级数 学习笔记Part 1

下面的演示是随着使用的term的增多我们会看到多个三角函数叠加在一起的效果,趋近于原函数

1个
Fourier Series 傅立叶级数 学习笔记Part 1

2个
Fourier Series 傅立叶级数 学习笔记Part 1

3个
Fourier Series 傅立叶级数 学习笔记Part 1

12个
Fourier Series 傅立叶级数 学习笔记Part 1

个人认为,学习傅立叶变换的思路就是我要用三角函数去模拟原来的函数。为什么要用三角函数呢?我猜是为了后面转换为复变函数。

目前这一部分内容还不是很懂。
留下王一教授给我的朋友圈评论作为激励。

“量子力学告诉我们,位置空间越不apart,Fourier空间越apart。”