解答 †
(1)
のとき、
(2)
のとき、上式の右辺第一項はやはりゼロになるが、第二項は積分内が
になって、
(1) と合わせれば、
(3)
したがって、
解説 †
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=200", "a=50", "a=10"}, PlotPoints -> 200,
PlotLabel -> "\!\(\*SubscriptBox[\(\[Delta]\), \(a\)]\)(k)"
]