(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
= − l²cos nπ+ l²sin nπ+ l²n( cos nπ− cos nπ )
2nπ 2n²π² 2nπ 2
+ l²cos nπ − l²cos nπ+ l²sin nπ= 2l²sin nπ
nπ 2nπ2 n²π²2 n²π²2

hence the sine series is

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

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