物理量の固有関数/メモ の履歴(No.5)
更新ハミルトニアン†
演習:箱の中の自由粒子 = 実フーリエ級数†
解答†
(1) のとき、
&math( \int_0^a\varphi_n^*(x)\varphi_m(x)dx &=\frac{2}{\,a\,}\int_0^a\sin(n\pi x/a)\sin(m\pi x/a)dx\\ &=\frac{1}{\,a\,}\int_0^a-\cos\Big((n+m)\pi x/a\Big)+\cos\Big((n-m)\pi x/a\Big)dx\\ &=\frac{1}{\,a\,}\bigg[-\frac{a}{(n+m)\pi}\sin\Big((n+m)\pi x/a\Big)+\\ &\hspace{17.6mm}\frac{a}{(n-m)\pi}\sin\Big((n-m)\pi x/a\Big)\bigg]_0^a\\ &=0 );
(2) のとき、上式の右辺第一項はやはりゼロになるが、第二項は積分内が になって、
&math( \int_0^a\varphi_n^*(x)\varphi_m(x)dx=\frac{1}{\,a\,}\int_0^a 1\,dx=1 );
(1) と合わせれば、
&math( \int_0^a\varphi_n^*(x)\varphi_m(x)dx=\delta_{nm} );
(3)
&math(c_n&=\int_0^1\sqrt 2\sin(n\pi x)f(x)dx\\ &=\int_0^{1/2}\sqrt 2\sin(n\pi x)\,x\,dx+\int_{1/2}^1\sqrt 2\sin(n\pi x)\,(x-1)\,dx\\ &=\int_0^{1}\sqrt 2\sin(n\pi x)\,x\,dx-\int_{1/2}^1\sqrt 2\sin(n\pi x)\,dx\\ &=\Big[-\frac{\sqrt 2}{n\pi}\cos(n\pi x)x\Big]_0^1+\int_0^{1}\frac{\sqrt 2}{n\pi}\cos(n\pi x)\,dx-\Big[-\frac{\sqrt 2}{n\pi}\cos(n\pi x)\Big]_{1/2}^1\\ &=-\frac{\sqrt 2}{n\pi}\cos(n\pi)+\Big[\frac{\sqrt 2}{n^2\pi^2}\sin n\pi\Big]_0^1+ \frac{\sqrt 2}{n\pi}\cos(n\pi)-\frac{\sqrt 2}{n\pi}\cos(n\pi/2)\\ &=-\frac{\sqrt 2}{n\pi}\cos(n\pi/2)\\ &=\begin{cases} 0&(n=2m+1)\\ \displaystyle(-1)^m\frac{\sqrt 2}{n\pi}&(n=2m)\\ \end{cases});
したがって、
&math(f(x)&=-\sum_{n=1}^\infty\frac{2}{n\pi}\cos(n\pi/2)\sin(n\pi x)\\ &=\sum_{m=1}^\infty \frac{(-1)^m}{m\pi}\sin(2m\pi x)\\ &=-\frac{1}{\pi}\sin(2\pi x)+\frac{1}{2\pi}\sin(4\pi x)-\frac{1}{3\pi}\sin(6\pi x)+\dots);
解説†
Mathematica ソース
LANG:mathematica FourierSinCoefficient[ If[x < 1/2, x, x - 1], x, n, FourierParameters -> {1, Pi} ] c[n_Integer] = Integrate[ Sqrt[2] Sin[n Pi xx] If[xx < 1/2, xx, -1 + xx], {xx, 0, 1} ] approx = Table[ Sum[ c[n] Sqrt[2] Sin[n Pi x], {n, 1, nmax} ], {nmax, {4, 16, 64, 256}} ]; Plot[ {approx, If[x < 1/2, x, -1 + x]} // Flatten // Evaluate, {x, 0, 1}, ImageSize -> Large, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 20}, PlotLegends -> (Style[#, FontSize -> 20] & /@ { "n \[LessEqual] 4", "n \[LessEqual] 16", "n \[LessEqual] 64", "n \[LessEqual] 256", "Target"}) ]
LANG:mathematica Plot[ Table[Sin[a k]/(Pi k), {a, {200, 50, 10}}] // Evaluate, {k, -1, 1}, PlotRange -> {Full, {-15, 65}}, PlotStyle -> Thick, PlotLegends -> {"a=10", "a=50", "a=200"}, PlotPoints -> 200, PlotLabel -> "\!\(\*SubscriptBox[\(\[Delta]\), \(a\)]\)(k)" ]