Theory
If a function f(x) is defined only on a half-period [0,L], it can be extended to [−L,L] as:
- an odd extension ⇒ Half-range Sine series,
- an even extension ⇒ Half-range Cosine series.
Exercises
Exercise 1
Question
Write the half-range Fourier sine series expansion for
f(x)={0,1,0≤x≤2π,2π≤x≤π.Show solution ↓Hide solution ↑
Solution
For a half-range sine series on [0,π], we use
f(x)=n=1∑∞bnsin(nx),where
bn=π2∫0πf(x)sin(nx)dx.Since f(x)=0 on [0,2π] and f(x)=1 on [2π,π],
bn=π2∫2ππsin(nx)dx.bn=π2[−ncos(nx)]2ππ=nπ2(cos2nπ−cosnπ).Since cosnπ=(−1)n, we obtain
bn=nπ2(cos2nπ−(−1)n).Hence, the half-range sine series is
f(x)=\sum_{n=1}^{\infty}
\frac{2}{n\pi}\left(\cos\frac{n\pi}{2}-(-1)^n\right)\sin(nx),
\quad 0<x<\pi.
Exercise 2
Question
Write the half-range cosine series expansion of
f(x)=x,\quad 0<x<4.Show solution ↓Hide solution ↑
Solution
For a half-range cosine series on [0,L] with L=4,
f(x)=2a0+n=1∑∞ancos4nπx,where
a0=42∫04xdx,an=42∫04xcos4nπxdx.First,
a0=21[2x2]04=4.Next, using integration by parts,
an=21∫04xcos4nπxdx=n2π28(−1)n.Thus, the half-range cosine series is
f(x)=2+\sum_{n=1}^{\infty}\frac{8(-1)^n}{n^2\pi^2}
\cos\frac{n\pi x}{4},
\quad 0<x<4.