(b) Let ƒ(x) = x from 0 to ½ l, and f(x) = l − x, from ½ l to l; then

∫ l 0 ƒ(x) sin nπxdx = ∫ ½ l 0 x sin nπxdx + ∫ l ½ l (l − x) sin nπxdx
l l l
= − cos + sin + l²n( cos − cos nπ )
2nπ 2n²π² 2 2
+ cos nπ − cos + sin = 2l²sin
2nπ2 n²π²2 n²π²2

hence the sine series is

4l( sin nx 1sin 3πx+ 1sin 5πx− ... )
π² l ll

For general values of x, the series represents the ordinates of the row of broken lines in fig. 3.

Fig. 3.

The cosine series, which represents the same function for the interval 0 to l, may be found to be