THE COSINE SERIES 383 



and all the integrals on the right-hand side vanish except 



r i 



B B I cos 2 nx dx, which becomes -7cB B . 

 Jo 2 



Hence p:7rB,. I ;/ cos nx dx 



2 J 



2 f * 

 and B n =- I y cos nx dx 



7C Jo 



If y is known in terms of x, the integral can be determined 

 and by giving n the values 1, 2, 3, etc., the values of Bj, B 2 , B 3 , etc., 

 can be found. 



Example. Expand the function y = mx as a cosine series, 

 knowing that y = c when x = TV. 



C C 



Then m = -, and y = -x 



7t 71 



y = B + Bj cos a? + B 2 cos 2a? + . . . B n cos nx + . . . 



and I y dx = B I dx = 7cB 



Jo Jo 



Then 7rB = - I x dx 



" 'o 



c f* 



= - I x 



7C Jo 



C 7C 



and 



Also I y cos nx dx = B n I cos 2 nx dx - 7cB r 



Jo Jo " 



Now I y cos nx dx =--- \ x cos nx dx 



Jo' "rcJo 



c Vx sin 



TcL n 



cos nx~\ l 

 n z I 



= - T (COS W7T 1) 



7m 2 



and B_ = 5 r (cos nn 1) 



^ 2 v 



When n is even, cos nn = 1, and B n = 0. 

 Hence B 2 , B 4 , B 6 , etc., all become zero. 



When n is odd, cos WTC = 1, and B_ = 



4c 1 4c 1 _ 4c 1 



andB,- - T2 p B 8 = -^^ B 6 = - - - etc. 



